Author Topic: [Contest] LuaTowerDefense  (Read 11719 times)

0 Members and 1 Guest are viewing this topic.

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
[Contest] LuaTowerDefense
« on: June 24, 2012, 11:33:07 am »
Hi there,

I've decided that I should try (only try...) to participate with the game I'm writing right now, a Tower Defense one :)

People that know my GitHub may have noticed there some bits of it already, but if you look closely, it's only the Screen Manager library, not a single line for the game itself :)
(So it's good according to the rules :P)

The GamePlay should be "basic", like a simple TD you can find anywhere in Flash...
I hope I have some time to make it work well before the contest ends... but it should be good enough at least if I dont make everything I would have wanted, for some entry-level game.

Here are some alpha-version screenshots...



As you can see, I have also focused on "quality" dialogs (I mean, like native), thanks to ETK (EEPro ToolKit, a GUI lib by Jim Bauwens), maybe to try to popularize GUI libs among the un-standardized Nspire-Lua programs :P

But don't worry about the design of towers (circles) and enemies, that's just for debugging :P)

The game grid is "active", meaning, you can mouse over the cells to get info, as well as interact with the keyboard (arrows) to move the selected cell.
There are 4 types of towers and enemy types : water, earth, fire, and air. The towers will do more damage to the corresponding enemy, obviously.
I haven't programmed yet the attacking part (:P) but I plan to make it so that you get points for each kill, which makes you also earn money to buy/upgrade towers.
I haven't really decided yet but the wave system will probably be something like ...  "more difficult each time because of the health increase of the enemies". Maybe more enemies too, each wave, idk :P
The AI part is probably the one handling enemies' moves : they auto adapt to the map, not with a hardcoded path :) While it's not much of an advanced AI (idk exactly :P), I still find that part pretty cool :D

I make it with the 3.2 SDK but I think it should work with 3.x if I just "compile" it with Luna :)

More soon !

Also, if you have any ideas for a feature etc... :)

Byebye :)


EDIT : Update (30/06/12) :
Some update(s) :

- Path algorithm/AI fort he enemies optimized and complete ! (works with any map, and with some "flawed" ones  (thanks to AI ))
- Wave system completely done and quite optimized I think
- Attacking done but not animated (no shooting animations for example... will see later)
- Range of a tower displayed on mouseover
- I still need to do :
   -- money system
   -- better menu(s)
   -- score + stats management
   -- level selection (more maps)
   -- multilanguage


Anyway, I won't have much time (at all ?) until the end of the contest, sadly, because TI-India is giving me an enormous amount to do x)
I'll see what I can do.
But after the 15th anyway (it's a deadline), I can improve it, even if it's too late
« Last Edit: July 01, 2012, 09:56:03 am by adriweb »
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline cyanophycean314

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 363
  • Rating: +43/-1
  • It's You!
    • View Profile
Re: [Contest] LuaTowerDefense
« Reply #1 on: June 24, 2012, 11:38:32 am »
This will be an awesome game when you finish it! Good luck. Now there are two Nspire Lua entries.  :)

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: [Contest] LuaTowerDefense
« Reply #2 on: June 24, 2012, 11:42:18 am »
Nice Adriweb ! Looks like it will be a fun game :D
(Also, cool that you are using ETK)


Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: [Contest] LuaTowerDefense
« Reply #3 on: July 01, 2012, 09:55:15 am »
Some update(s) :

- Path algorithm/AI fort he enemies optimized and complete ! (works with any map, and with some "flawed" ones :D (thanks to AI :P))
- Wave system completely done and quite optimized I think :P
- Attacking done but not animated (no shooting animations for example... will see later)
- Range of a tower displayed on mouseover
- I still need to do :
   -- money system
   -- better menu(s)
   -- score + stats management
   -- level selection (more maps)
   -- multilanguage


Anyway, I won't have much time (at all ?) until the end of the contest, sadly, because TI-India is giving me an enormous amount to do x)
I'll see what I can do.
But after the 15th anyway (it's a deadline), I can improve it, even if it's too late :P
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline cyanophycean314

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 363
  • Rating: +43/-1
  • It's You!
    • View Profile
Re: [Contest] LuaTowerDefense
« Reply #4 on: July 01, 2012, 03:53:46 pm »
Nice job. At least you got the AI done.  :D

Offline annoyingcalc

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1953
  • Rating: +140/-72
  • Found in Eclipse.exe
    • View Profile
Re: [Contest] LuaTowerDefense
« Reply #5 on: July 01, 2012, 04:23:27 pm »
:w00t: I can not wait to see the final result, Great job so far
This used to contain a signature.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55942
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: [Contest] LuaTowerDefense
« Reply #6 on: July 01, 2012, 11:15:54 pm »
Looks pretty nice so far. Will you update the graphics to use actual sprites in the future or is it out of the question (or Lua capabilities for that kind of game)?

Also is this the only Omni Nspire contest project? If so, then you win by default. O.O

EDIT Nvm there appears to be others, although one is in Ndless or BASIC.
« Last Edit: July 01, 2012, 11:17:03 pm by DJ_O »
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: [Contest] LuaTowerDefense
« Reply #7 on: July 02, 2012, 03:46:03 am »
Looks pretty nice so far. Will you update the graphics to use actual sprites in the future or is it out of the question (or Lua capabilities for that kind of game)?
Thanks.
Also yes, I plan to add real sprites. If its not too heavy/slow (it might be good) with images I'll do with images, but if it is, I'll do pixel art :P

Also is this the only Omni Nspire contest project? If so, then you win by default. O.O
EDIT Nvm there appears to be others, although one is in Ndless or BASIC.
Nick has done a Lua game too :)
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: [Contest] LuaTowerDefense
« Reply #8 on: July 06, 2012, 02:08:00 am »
Little Update before last day ! (:o)

So, the game is almost finished for its core, but I haven't found the time to make a more beautiful GUI than right now... I wonder if I'll just go with an image or something, for the menu :P

Anyway, the game should be crash-safe, and now has a save ability (but since you're supposed to finish/lose the game in one time (no multiple gaming sessions for a single map, I mean, as I've seen on flash TD), your game will resume (if wanted) with the same money you had and at the same level, but you'll have to re-place your towers muhahaha).

Anyway, I may have time to add another map (but then I'd have to code a lvl selection thing...) and to spice if the difficulty / decrease money earnings as it's a bit easy right now.

I also made the tower upgrades (improves its range) and improved the gamescreen's statusbar.

Screenshots in a few hours.
« Last Edit: July 06, 2012, 02:09:49 am by adriweb »
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: [Contest] LuaTowerDefense
« Reply #9 on: July 07, 2012, 04:48:57 pm »
Latest (and last before contest) update :

I fixed a few bugs, finished some stuff etc. made it 3.x compatible (:D), wrote the french&english docs etc.
And also made the whole thing a bit prettier overall... I didn't have time to put a new map / lvl selector ... :(
Will be done after the contest though.

Also, it runs on PCSpire :P

Some GUI screenshots :


« Last Edit: July 07, 2012, 04:49:31 pm by adriweb »
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline annoyingcalc

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1953
  • Rating: +140/-72
  • Found in Eclipse.exe
    • View Profile
Re: [Contest] LuaTowerDefense
« Reply #10 on: July 07, 2012, 04:57:21 pm »
Cool!, this is looking awesome!


and btw the one on githhub it only says Hallo! and nothing else
« Last Edit: July 07, 2012, 04:58:01 pm by annoyingcalc »
This used to contain a signature.

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: [Contest] LuaTowerDefense
« Reply #11 on: July 07, 2012, 04:58:06 pm »
Cool!, and btw the one on githhub it only says Hallo! and nothing else
yes, because we can't publish the source code :P

I'll put the latest version on GitHub as soon as we are allowed to :)
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline annoyingcalc

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1953
  • Rating: +140/-72
  • Found in Eclipse.exe
    • View Profile
Re: [Contest] LuaTowerDefense
« Reply #12 on: July 07, 2012, 04:58:44 pm »
Ah, thats right this is for the contest
This used to contain a signature.

Offline lkj

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +58/-1
    • View Profile
Re: [Contest] LuaTowerDefense
« Reply #13 on: July 08, 2012, 05:41:41 pm »
It's a bit easy because you get much money and the difficulty doesn't increase very much. Also I think there's a bug, because sometimes there doesn't come a new wave if you click, just nothing happens, even if you save, quit and load again.
It's a bit strange that in the pop-up to buy a tower you can only navigate with the up/down arrow keys and in the tower upgrade pop-up only with left/right arrow keys.

You could probably make the towers a bit weaker and more levels of upgrade.

Apart from that it's quite addictive ;)
« Last Edit: July 08, 2012, 05:46:26 pm by lkj »

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: [Contest] LuaTowerDefense
« Reply #14 on: July 09, 2012, 05:04:44 am »
It's a bit easy because you get much money and the difficulty doesn't increase very much.
Yes, I didnt have time to think about a nice difficulty-increase formula, but I will change that soon.

Also I think there's a bug, because sometimes there doesn't come a new wave if you click, just nothing happens, even if you save, quit and load again.
This happened to me a while ago but I thought I fixed it... I never got it since :o
Any condition on making it do that again ?

It's a bit strange that in the pop-up to buy a tower you can only navigate with the up/down arrow keys and in the tower upgrade pop-up only with left/right arrow keys.
Weird, will fix that, thanks.

You could probably make the towers a bit weaker and more levels of upgrade.
Yes. For now, the update improves the range. I will think about something else to improve.

Apart from that it's quite addictive ;)
Thanks :) It will be even more with the more maps I'll include soon and the map editor too ;)


BTW : I could only test recently on 3.2, so maybe I couldn't have some bugs only in 3.1....
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation