Author Topic: [Lua] Tactical Wars CX  (Read 22594 times)

0 Members and 1 Guest are viewing this topic.

Offline hoffa

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
[Lua] Tactical Wars CX
« on: November 04, 2011, 01:37:03 pm »
I've been working for some time on a game I named "Tactical Wars CX" (CX as in TI-Nspire CX, as it is targeted for colored displays), a two-player turn-based strategy game. Frankly, it is still missing quite a few things and there are stuff that needs to be changed. There is no AI for the moment, and although I cannot promise you anything, I'll see if I can add some sort of AI in a later version (and considering the fact it's a field I find interesting, there might very well be one in the future), as soon as I have dealt with more important issues. You may find it is lacking in features and everything might not be well-balanced, and I fully agree, and as I said earlier, I'm going to work on them later.

The first thing each player does is choose his or her military units, and then places those units on the map. Right after the units have been placed, the HQ (that spiky tower you can see on one of the screenshots) needs to be built somewhere. If during the game the HQ is destroyed, the player who destroyed it automatically wins. If all of the soldiers of an army are killed, the remaining army (i.e., player) wins. Each army has a certain morale, and that morale evolves during the game based on different actions and variables. The said morale can affect the amount of damage each unit inflict. Every unit--along with an attack, defense, and range value--also has a certain fatigue- or fuel-level, which both replenish if the unit is let to rest (tanks and helicopters get more fuel thanks to the magical Fuel Fairy™), which affects the range of that unit. Special units ("Spetsnaz Team" or "SAS Team") are not visible by the enemy as long as they do not shoot or are not shot. Just to make it clear, that "0 +0" thing you can see in the primitive HUD on the right, shows how much damage you've done during the game and the amount of damage you did on your last hit.

You can download the current version here, but be aware that it's an early version that requires some further developing:


Changelog:
  • 0.2
    • Fixed a typo in the code that might have caused issues at the end of a game
    • Fixed an issue that caused the game to crash at the end, if the user had returned from the unit selection screen to the menu before playing
    • Fixed total damage & previous damage sometimes showing wrong values
    • Fixed an issue with Blue special units disappearing when placing them
    • Added a simple in-game menu
    • Added a proper victory screen
    • Added a help screen
    • Implemented a proper algorithm that generates a list of cells within a certain range (rather than being hard coded)
    • If the player presses the "0" key, circles are drawn around the units for more visibility
    • The fuel/fatigue now decreases/increases based on the distance moved
    • Changed the attributes of different units for more balance
    • The initial available area (on the only map) for placing units has been reduced
    • Only one loop is now used to draw the units, rather than two
    • Units now face the correct direction when the y-coordinate doesn't change while moving
    • After placing the units, the cursor goes to the last unit placed rather than the HQ
    • When attacking, only attackable units are drawn over
    • If a move or an attack is canceled, the cursor returns to the unit
    • Blue units now initially face left
    • Some minor code & UI changes
  • 0.1
    • First release

And finally, a few screenshots: (if you're as anal as me about stuff not being aligned perfectly, well every drawn string is actually one pixel too low on the emulator)





If you want to know how to return to the menu after a game, read this: http://ourl.ca/13814/260412
« Last Edit: January 29, 2013, 09:44:26 am by hoffa »

Offline Stefan Bauwens

  • Creator of Myst 89 - סטיבן
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1799
  • Rating: +162/-24
  • 68k programmer
    • View Profile
    • Portfolio
Re: [Lua] Tactical Wars CX
« Reply #1 on: November 04, 2011, 01:42:37 pm »
Wow, these screenshots are amazing. I don't know this game but it looks awesome.


Very proud Ticalc.org POTY winner (2011 68k) with Myst 89!
Very proud TI-Planet.org DBZ winner(2013)

Interview with me

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: [Lua] Tactical Wars CX
« Reply #2 on: November 04, 2011, 02:02:04 pm »
They indeed look awesome, but I am scared in advance at the .tns size, since these are all TI.Images .... :o

Good Luck :D
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline hoffa

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Re: [Lua] Tactical Wars CX
« Reply #3 on: November 04, 2011, 02:05:49 pm »
They indeed look awesome, but I am scared in advance at the .tns size, since these are all TI.Images .... :o

Good Luck :D
Yes it will be bigger than usual, but I don't feel like settling for a dull white background, especially when I'm targeting it for machine that has a color screen.

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: [Lua] Tactical Wars CX
« Reply #4 on: November 04, 2011, 02:14:04 pm »
Oh, I perfectly understand you you're probably right :D
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: [Lua] Tactical Wars CX
« Reply #5 on: November 04, 2011, 02:44:02 pm »
:O
Those screenies look awesome :thumbsup:
This is going right into my CX CAS when it's done :P
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Yeong

  • Not a bridge
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3739
  • Rating: +278/-12
  • Survivor of Apocalypse
    • View Profile
Re: [Lua] Tactical Wars CX
« Reply #6 on: November 04, 2011, 03:02:10 pm »
holy crap it's epic! O.O
Now all we need is StarCraft
Sig wipe!

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: [Lua] Tactical Wars CX
« Reply #7 on: November 04, 2011, 03:05:31 pm »
Wow the graphics. O.O O.O
I'm not a nerd but I pretend:

Offline Eiyeron

  • Urist McEiyolobster
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1430
  • Rating: +130/-10
  • (-_(//));
    • View Profile
    • Rétro-Actif : Rétro/Prog/Blog
Re: [Lua] Tactical Wars CX
« Reply #8 on: November 04, 2011, 03:08:20 pm »
Why didn't you used the AW2 sprites? I give you using the animated tileset like a challenge!
« Last Edit: November 04, 2011, 03:09:49 pm by Eiyeron »

Offline hoffa

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Re: [Lua] Tactical Wars CX
« Reply #9 on: November 04, 2011, 03:20:20 pm »
Why didn't you used the AW2 sprites? I give you using the animated tileset like a challenge!
Because they are too big and I wanted the user to be able to see the whole map at once.

Offline Chockosta

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 447
  • Rating: +169/-6
    • View Profile
Re: [Lua] Tactical Wars CX
« Reply #10 on: November 05, 2011, 08:22:01 am »
This looks nice, but the memory consumption... ><
And it is quite slow to open isn't it ?

Offline hoffa

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Re: [Lua] Tactical Wars CX
« Reply #11 on: November 05, 2011, 09:22:35 am »
This looks nice, but the memory consumption... ><
And it is quite slow to open isn't it ?
Haven't looked at the memory consumption nor have I had any issues with it yet (EDIT: of course if it becomes or is a bigger issue, I'll look into and deal with it). To open it, it takes about two seconds, but it's understandable considering the number of images there are. Oh, and those few seconds won't kill anyone; it's no issue as far as I can see.
« Last Edit: November 05, 2011, 09:25:20 am by hoffa »

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: [Lua] Tactical Wars CX
« Reply #12 on: November 05, 2011, 10:19:55 am »
do you have to load the images yourself or does the prog do that (if yourself, you can display something before loading it)
I'm not a nerd but I pretend:

Offline hoffa

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Re: [Lua] Tactical Wars CX
« Reply #13 on: November 05, 2011, 10:27:47 am »
do you have to load the images yourself or does the prog do that (if yourself, you can display something before loading it)
What do you mean by "load the images yourself"? What images? I'm only talking about the visual stuff the game is made of.

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: [Lua] Tactical Wars CX
« Reply #14 on: November 05, 2011, 10:33:13 am »
I think he doesn't know about TI-Image.
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua