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

0 Members and 1 Guest are viewing this topic.

Offline Chockosta

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 447
  • Rating: +169/-6
    • View Profile
Re: [Lua] Tactical Wars CX
« Reply #15 on: November 05, 2011, 10:35:37 am »
I suppose you put ti.images at the top/bottom of your code.
But you could do something like that :
Code: [Select]
imagesLoaded=false

function on.paint(gc)
 if not imagesLoaded then
  gc:drawString("Loading",0,0,"top")
  loadImages()
 else
  --Game displaying
 end
end

function loadImages()
 img1=image.new("...")
 imagesLoaded=true
end

I don't know if this trick would work...
« Last Edit: November 05, 2011, 10:36:10 am by Chockosta »

Offline Levak

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1002
  • Rating: +208/-39
    • View Profile
    • My website
Re: [Lua] Tactical Wars CX
« Reply #16 on: November 05, 2011, 12:08:11 pm »
+platform.window:invalidate()
I do not get mad at people, I just want them to learn the way I learnt.
My website - TI-Planet - iNspired-Lua

Offline hoffa

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Re: [Lua] Tactical Wars CX
« Reply #17 on: November 05, 2011, 12:22:40 pm »
I suppose you put ti.images at the top/bottom of your code.
But you could do something like that :
Code: [Select]
imagesLoaded=false

function on.paint(gc)
 if not imagesLoaded then
  gc:drawString("Loading",0,0,"top")
  loadImages()
 else
  --Game displaying
 end
end

function loadImages()
 img1=image.new("...")
 imagesLoaded=true
end

I don't know if this trick would work...
Well all the images are loaded when the game is started (or more precisely, as soon as an instance of the game class is created), and TI's own little loading thingy is good enough.

BTW, I added two screenshots, both are from the info windows of two units.

Offline AzNg0d1030

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 522
  • Rating: +45/-4
  • Hardcore anime watcher.
    • View Profile
Re: [Lua] Tactical Wars CX
« Reply #18 on: November 05, 2011, 06:37:25 pm »
Wow I can't wait for this!  Best graphics for a TI game yet!  (I NOMINATE YOUUUU!)

Who cares if the .tns file is too big?  It may take longer to save and open, but the CX has so much memory it doesn't even matter  ;D
You just lost the game.



Offline AzNg0d1030

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 522
  • Rating: +45/-4
  • Hardcore anime watcher.
    • View Profile
Re: [Lua] Tactical Wars CX
« Reply #19 on: November 05, 2011, 06:38:24 pm »
About how big is it currently with the percent you have finished?

And

About how big do you think it might end up to be?


Oohh, and might I suggest that tanks have a range of 4 or 5 instead of a measly 3... even soldiers have a 2! :P
« Last Edit: November 05, 2011, 07:06:34 pm by AzNg0d1030 »
You just lost the game.



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: [Lua] Tactical Wars CX
« Reply #20 on: November 06, 2011, 02:14:41 am »
Wow that looks great. I hope it's not too complicated to code (seeing it's a strategy game). Does the CX calculates fast in Lua?

I really hope this gets finished.

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.
Yeah I agree. Almost every Nspire CX game so far simply uses white/black background with squares or very simple sprites (no offense intended to the authors. The Lua language for the Nspire series was still very new at the time and many games were limited by contest deadlines), so it's great to finally see some more complex stuff. That might show what Lua is capable of even more.

Also glad to see you're still around Hoffa :)
Now active at https://discord.gg/cuZcfcF (CodeWalrus server)

Offline annoyingcalc

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1953
  • Rating: +140/-72
  • Found in Eclipse.exe
    • View Profile
Re: [Lua] Tactical Wars CX
« Reply #21 on: November 06, 2011, 02:16:18 am »
wow but how is your fps for the cx?
This used to contain a signature.

Offline Alex

  • LV2 Member (Next: 40)
  • **
  • Posts: 32
  • Rating: +3/-0
    • View Profile
Re: [Lua] Tactical Wars CX
« Reply #22 on: November 06, 2011, 08:06:17 am »
have you a .tns file?

Offline annoyingcalc

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1953
  • Rating: +140/-72
  • Found in Eclipse.exe
    • View Profile
Re: [Lua] Tactical Wars CX
« Reply #23 on: November 06, 2011, 10:39:52 am »
yes he does but you should pm him if you want a demo
This used to contain a signature.

Offline mdr1

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 303
  • Rating: +21/-2
    • View Profile
Re: [Lua] Tactical Wars CX
« Reply #24 on: November 07, 2011, 10:44:06 am »
Wow, it looks awesome !
I hope this game to be coded fastly, since it looks great !



Offline annoyingcalc

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1953
  • Rating: +140/-72
  • Found in Eclipse.exe
    • View Profile
Re: [Lua] Tactical Wars CX
« Reply #25 on: November 07, 2011, 10:53:36 am »
yeah it is looking great
This used to contain a signature.

Offline hoffa

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 322
  • Rating: +131/-13
    • View Profile
Re: [Lua] Tactical Wars CX
« Reply #26 on: November 07, 2011, 02:23:25 pm »
I've changed the layout and sprites slightly:


Wow, it looks awesome !
I hope this game to be coded fastly, since it looks great !
Yeah, I will have to code like there was no tomorrow if I want to have a playable version tonight. I need to have finished something by midnight and I still have loads to do.
« Last Edit: November 07, 2011, 02:23:36 pm by hoffa »

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: [Lua] Tactical Wars CX
« Reply #27 on: November 07, 2011, 02:32:10 pm »
You still have ≈ 3.4 hours, so make sure you do the most important things :)

Also, don't worry about speding too much time for the translation, use google translate for the often used words ;)
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 #28 on: November 07, 2011, 02:43:17 pm »
You still have ≈ 3.4 hours, so make sure you do the most important things :)

Also, don't worry about speding too much time for the translation, use google translate for the often used words ;)
Yeah, I'm pretty sure I'll have the time. What translation are you talking about? Have I missed something?
EDIT: Shit, just reread the rules. I'll  translate what I can, then.
« Last Edit: November 07, 2011, 02:46:05 pm by hoffa »

Offline Jim Bauwens

  • Lua! Nspire! Linux!
  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1881
  • Rating: +206/-7
  • Linux!
    • View Profile
    • nothing...
Re: [Lua] Tactical Wars CX
« Reply #29 on: November 07, 2011, 02:46:21 pm »
Quote
The only requirement is that your program is suitable for a French user. If your program displays text, use single common words in a foreign language is tolerated.

Thats what you need to do :)