Author Topic: [contest 2013 / BASIC] Toy Wars - Willrandship  (Read 5270 times)

0 Members and 1 Guest are viewing this topic.

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
[contest 2013 / BASIC] Toy Wars - Willrandship
« on: October 16, 2013, 10:49:14 pm »
Here's my contest entry so far.

Toy Wars
A simple, easy to play turn based strategy game.

I've been working on the map system. The plans right now are up to 5 players, with each being selectable as AI or a player. Teams cannot be allies. If you want to be allies, then be the same team. ;)

Each unit can move one square, attack, or use an item. An order is in the form of a direction only. Teams move all their units simultaneously, so a turn may have you making upwards of 20 actions.

Each unit represents six soldiers, each with their own health bar and attack. Attacks are non-random in terms of damage, but random in terms of which soldier they hit. Thus, battles, while predictable and fair, are still never quite the same. (One team loses a soldier early, dealing less damage)

Shelters restore each soldier left in the unit by 1 HP, consuming one use in the process.

There will also be various forms of ranged weapons including lasers (straight line away from user), cannons (explosion away from user), and other items.

Other non-unit items include breakable and non-breakable barricades, one-time health packs, etc. (I am taking suggestions as long as they're reasonable)

The editor is already mostly finished. Changing a unit type takes some time, unfortunately, but I can't think of a way to make it any faster than it is. (it already does dirty unit checks so it doesn't redraw the whole map) Changing health is much faster.

The map generator is extremely simple right now. It generates random numbers and places them in the map if they're valid. Health is always 999999 (full) for soldiers, and a random int from 5 to 15 for houses.

I figure with 5 teams and a fair amount of terrain, the replay value should be quite high.

The screenie is a little slow, since it's running in an 83+ on the emu. On an 84+ it runs a fair amount faster (but never as fast as I'd like: The cursor is reasonable instead of unbearable, but not really fast)

Offline ElementCoder

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 611
  • Rating: +42/-2
    • View Profile
Re: [contest 2013 / BASIC] Toy Wars - Willrandship
« Reply #1 on: October 17, 2013, 04:43:46 am »
That's looking pretty good :)

Some people need a high five in the face... with a chair.
~EC

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: [contest 2013 / BASIC] Toy Wars - Willrandship
« Reply #2 on: October 17, 2013, 11:26:50 am »
I thought of another optimization for my "dirty" redraws. If I keep a count of how many tiles are dirty, then redrawing tiles at the top will be faster. (since it will exit the draw loop earlier)

I'm also considering releasing a non dual-layer version for the 83+. It's so much slower than I expected.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [contest 2013 / BASIC] Toy Wars - Willrandship
« Reply #3 on: October 17, 2013, 01:46:54 pm »
Looks interesting, and I like how you use dual layer ASCII with small fonts. Most people used that technique with large ones before.

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: [contest 2013 / BASIC] Toy Wars - Willrandship
« Reply #4 on: October 17, 2013, 02:01:52 pm »
By using small fonts I preserve compatibility with custom fonts, too! (The variable width font isn't part of that, at least in zstart)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [contest 2013 / BASIC] Toy Wars - Willrandship
« Reply #5 on: October 17, 2013, 02:09:09 pm »
Yeah true, if someone uses custom fonts that can be a problem for certain games if they need the default fonts to display normally.

However with Omnicalc that isn't a problem, because on the graph screen, even if you have custom fonts enabled it will still use the default TI fonts. Omnicalc custom fonts only works on the homescreen.

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: [contest 2013 / BASIC] Toy Wars - Willrandship
« Reply #6 on: October 17, 2013, 02:09:47 pm »
On zStart it actually patches the old fonts out. Even asm programs use the new font, if they use the system font.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [contest 2013 / BASIC] Toy Wars - Willrandship
« Reply #7 on: October 17, 2013, 02:48:04 pm »
Oh wow I didn't know about that. >.<

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: [contest 2013 / BASIC] Toy Wars - Willrandship
« Reply #8 on: October 18, 2013, 05:59:35 pm »
This is looking insane O.O
How am i supposed to compete against that :P

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: [contest 2013 / BASIC] Toy Wars - Willrandship
« Reply #9 on: October 20, 2013, 07:49:38 pm »
So, the todo list on this so far is:

Write the order menu for player input
Write the order processing subsystem (ie make a turn happen)
Add in the other field items, often with their own subprograms.
Write the AI, which is called for each unit to determine its orders
Write the "effect" program, which is run by the order processing subsystem.

I'm running out of time. x.x I hope I can finish it in 2 weeks.

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: [contest 2013 / BASIC] Toy Wars - Willrandship
« Reply #10 on: October 22, 2013, 12:25:30 am »
That's looking quite nice will! At least make sure it's in a playable state by the deadline. Even if it's not finished, you can still submit it. :)

Offline Streetwalrus

  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3821
  • Rating: +80/-8
    • View Profile
Re: [contest 2013 / BASIC] Toy Wars - Willrandship
« Reply #11 on: October 22, 2013, 10:50:22 am »
Yup, really nice. ;)

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: [contest 2013 / BASIC] Toy Wars - Willrandship
« Reply #12 on: October 26, 2013, 04:36:36 am »
The part I'm working on atm is the most important part: The turn processor. It takes the orders for any given tile and processes them to a buffer matrix, writing the result back when done. It also calls the effects engine, which is done but has no actual effects in it XD

I made the editor significantly faster on tile changes, assuming you're editing the upper part of the map. It will also make turn changes faster.

Why doesn't BASIC have a mod function? fpart is all well and good, but I need it so often that it would be far more convenient.

BTW, currently all the subprograms come to about 3400 bytes. However, the game uses matrices A-E at 1226 bytes each, so running the program takes more memory than storing it.

A map consists of A and B. C is the current orders for each tile, and D and E are the buffers for type and HP.

In other words, to run the game takes a little over 10K of RAM.
« Last Edit: October 26, 2013, 04:37:54 am by willrandship »

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: [contest 2013 / BASIC] Toy Wars - Willrandship
« Reply #13 on: October 26, 2013, 07:31:06 am »
Screenshot update! This shows off the order system, turns between players, and the animation subsystem. (the current animations are pretty mild, mostly text, but CAN be anything you want, including short, nonlooping animations.)

There's a new bug in my combat code: Now units don't take damage >.<

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: [contest 2013 / BASIC] Toy Wars - Willrandship
« Reply #14 on: October 26, 2013, 04:37:36 pm »
that is looking cool! :D

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!