Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI-Nspire => Topic started by: Chockosta on December 15, 2011, 03:47:57 pm

Title: [Lua] Gravity guy
Post by: Chockosta on December 15, 2011, 03:47:57 pm
FINAL UPDATE : 14/04/2012
Spoiler For Spoiler:
Download (http://www.omnimaga.org/index.php?action=dlattach;topic=11907.0;attach=12493)

(http://www.omnimaga.org/index.php?action=dlattach;topic=11907.0;attach=11701;image)(http://www.omnimaga.org/index.php?action=dlattach;topic=11907.0;attach=11702;image)(http://www.omnimaga.org/index.php?action=dlattach;topic=11907.0;attach=11703;image)
(http://www.omnimaga.org/index.php?action=dlattach;topic=11907.0;attach=12494;image)(http://www.omnimaga.org/index.php?action=dlattach;topic=11907.0;attach=12495;image)(http://www.omnimaga.org/index.php?action=dlattach;topic=11907.0;attach=12496;image)

Moving screenshot (thanks to Jonius7). The actual game is slower...
(http://www.omnimaga.org/index.php?action=dlattach;topic=11907.0;attach=11903;image)


Hi there !

Sorry if I may seem inactive, but I am in a 'non-motivation' period.
But I'm not dead (even if I only program 2 hours a week).
So my latest project is a Gravity Guy (http://armorgames.com/play/7508/gravity-guy) clone. It is quite fast (and really blurry on grayscale nspires)

Some screenies are attached to my post.

Note that I will change the player sprite.
And, by the way, I used linear gravity (like the original game). Should I use more realistic calculations ?
Title: Re: [Lua] Gravity guy
Post by: Adriweb on December 15, 2011, 04:31:24 pm
Nice !!

By linear gravity, I'm not sure what you mean ...

If it looks good ingame, it's ... good enough ? :D

Approimating real gravity shouldn't be really difficult...
It could just use more cpu if calculations get called rather often...

Do you have an animated screenshot ? ;)
Title: Re: [Lua] Gravity guy
Post by: Chockosta on December 15, 2011, 04:37:42 pm
By linear gravity, I mean that the character doesn't accelerate while falling.
It is more arcade-like, but less realistic.

I'll do an animated screenshot when my collision engine will be finished...
Title: Re: [Lua] Gravity guy
Post by: Jim Bauwens on December 15, 2011, 05:10:47 pm
Evil, I wanted to make this :P

Looks nice :)
Title: Re: [Lua] Gravity guy
Post by: Chockosta on December 22, 2011, 09:05:20 am
I finished the collision engine, and everything else.
Now I just have to create 50 levels :(
(And I haven't created the random mode)

If you want to try it, there is the current file attached. It contains 8 test levels (which are very short and not funny).
Oh, and I still haven't choosen a better sprite.
Title: Re: [Lua] Gravity guy
Post by: Nick on December 22, 2011, 09:11:21 am
well, it look nice, and the levels are basic, but are a good example of the possibilities..
if you need help making the levels, we could help
Title: Re: [Lua] Gravity guy
Post by: Adriweb on December 22, 2011, 09:12:11 am
awesome, I just finished the whole thing, it's really a good game :D
Title: Re: [Lua] Gravity guy
Post by: Stefan Bauwens on December 22, 2011, 10:28:30 am
Can't you use the levels from the original game and slightly edit them if neccesary?
Looks nice but a moving screenie would be even better :P
Title: Re: [Lua] Gravity guy
Post by: Nick on December 22, 2011, 12:51:56 pm
here it i:
it runs smoother on calc (as always xp)
(http://img.removedfromgame.com/imgs/GravityGuy.gif)
Title: Re: [Lua] Gravity guy
Post by: yunhua98 on December 22, 2011, 01:27:28 pm
nice.  I like it with linear gravity as the original.  Other wise it's too hard to judge when to jump.
Title: Re: [Lua] Gravity guy
Post by: Adriweb on December 22, 2011, 01:29:38 pm
Chokosta ->  When are you going to upload it on TI-Planet ? :D
Title: Re: [Lua] Gravity guy
Post by: Levak on December 22, 2011, 02:01:50 pm
Chockosta : alpha exists in TI-Image :o
Title: Re: [Lua] Gravity guy
Post by: Lionel Debroux on December 23, 2011, 08:49:52 am
Interesting project, as usual.
It reminds me of a game I liked on TI-68k calculators, many years ago, even if the levels of the final version were too hard for my taste (I kept the beta version): bobti89's "grav", http://j.petitjean.perso.neuf.fr/bobti89/programmes_ti.php .
Title: Re: [Lua] Gravity guy
Post by: Chockosta on December 23, 2011, 09:40:43 am
Adriweb :
I'll upload it when at least 20 levels will be done.

Levak :
I know, the grey square is just here for developpement purposes (collision box)

By the way, I'm now at my grandparent's for christmas, and I didn't bring any of my Nspires. So no more updates during this week...
Title: Re: [Lua] Gravity guy
Post by: DJ Omnimaga on December 25, 2011, 10:24:10 pm
Looks very nice. You should make the player sprite transparent.
Title: Re: [Lua] Gravity guy
Post by: annoyingcalc on December 25, 2011, 10:34:03 pm
I love this game
Title: Re: [Lua] Gravity guy
Post by: AzNg0d1030 on January 12, 2012, 10:00:31 pm
Any way to make the character transparent without a gray box around him :O
Title: Re: [Lua] Gravity guy
Post by: Jim Bauwens on January 13, 2012, 03:20:02 am
Yes, but as Chockosta noted; its there for debug purposes.
I assume his final version will not have this :)
Title: Re: [Lua] Gravity guy
Post by: Chockosta on January 13, 2012, 11:25:35 am
That's right, final version won't have this.

Right now there is 12 definitive levels.
When I will have 20 of them, I'll release a new version.
Title: Re: [Lua] Gravity guy
Post by: AzNg0d1030 on January 14, 2012, 11:40:18 am
Ok awesome.  I think it is kind of funny how the first level is harder than the second and third XD
Don't make the levels too easy!
Or else no fun...
Title: Re: [Lua] Gravity guy
Post by: Chockosta on January 15, 2012, 08:15:39 am
You should'nt think they will be too easy... or else you will have a nice surprise.
The ones that you tried were just test levels, and the new ones are much better.
Title: Re: [Lua] Gravity guy
Post by: AzNg0d1030 on January 15, 2012, 06:58:22 pm
You should'nt think they will be too easy... or else you will have a nice surprise.
The ones that you tried were just test levels, and the new ones are much better.
:O Good, challenges are more fun (and death-bringing)
Title: Re: [Lua] Gravity guy
Post by: Chockosta on January 17, 2012, 01:43:08 pm
By the way, does someone have a nice idea for the guy's sprite ?
Or if someone would like to draw it for me, it would be even more awesome...
Title: Re: [Lua] Gravity guy
Post by: Hayleia on January 18, 2012, 12:05:37 pm
By the way, does someone have a nice idea for the guy's sprite ?
Or if someone would like to draw it for me, it would be even more awesome...
What would the dimension be ? What are the allowed colors ?
(note that I am not proposing myself because if I do it, it might take a while :P)
Title: Re: [Lua] Gravity guy
Post by: Chockosta on January 18, 2012, 02:38:40 pm
Colors are all allowed, and it should be 20*30
Title: Re: [Lua] Gravity guy
Post by: Chockosta on February 09, 2012, 11:57:00 am
It's time for a beta release !
I'm really sorry for the very slow developpement of this project.
Anyway, there are 20 nice levels, and I changed the player sprite (I know, I'm not an artist at all :( ).
See attachment for the TNS file and screenies.

PS : Do you think I should upload this beta version on ticalc.org and TI-Planet ?
Title: Re: [Lua] Gravity guy
Post by: hellninjas on February 15, 2012, 03:19:06 pm
GOD DANGIT!! IM ADDICTED!
Very cool game! I cant wait for the full release!
Title: Re: [Lua] Gravity guy
Post by: DJ Omnimaga on February 15, 2012, 11:51:57 pm
I think this will go to news as soon as I have time to make one O.O
Title: Re: [Lua] Gravity guy
Post by: DJ Omnimaga on February 19, 2012, 03:03:42 am
I tried it on-calc and it's really great. Some levels are really hard though O.O

Also you should change controls so we can use enter to switch gravity, to remain consistent with the key used to choose levels. Otherwise, Up and Down plus 8 and 2 would work. It might be good to also include controls in the first post so people won't take 15 minutes like me to figure out the key is Tab. :P
Title: Re: [Lua] Gravity guy
Post by: Jonius7 on February 25, 2012, 01:21:01 am
This is turning out to be a great game Chockosta! btw did you want a moving screenshot? I can make one, as I did for 3d Cubefield.
And I'll have to put up a proper tutorial for making moving screenshots somewhere...
Title: Re: [Lua] Gravity guy
Post by: Chockosta on February 25, 2012, 07:24:39 am
I'm back from my one-week ski holidays. (BTW, sorry, I didn't warn anyone about this)

First, thank you for putting this game in the news, DJ!
And yes, I should allow users to switch gravity with enter. But I'm not sure about 8, 2, up and down, because in my opinion, it's more convenient if the same key is used for both directions...

@Jonius7 : Yes, I would like a moving screenshot, if you don't mind.
Title: Re: [Lua] Gravity guy
Post by: DJ Omnimaga on February 25, 2012, 09:44:45 am
Yeah I guess the same key is OK. Just make sure to use the same for both the menu and jumping, and that it's a standard key used in most games. On the PRIZM I notice that several people use F1 for confirming in  the main menu then afterward we must use 2nd. Another example is Dying Eyes RPG on the 83+ where we have to go back and forth from 2nd to the number keys 1 and 2. X.x It's best to stay consistent.
Title: Re: [Lua] Gravity guy
Post by: Jonius7 on February 25, 2012, 08:57:22 pm
I don't know if I'll be able to get a color screenshot though of your game as I don't have a boot1 of the CX to run on nspire_emu. But here's a nice fps flowing moving screenshot of levels 1-3 in greyscale.
PS: I think it is moving too fast, however if i set it to true Greyscale (256colors) it is waaay too slow and laggy (and takes up more space)
Title: Re: [Lua] Gravity guy
Post by: Chockosta on February 26, 2012, 08:15:28 am
Thanks a lot !
I'm going to add it to the first post...
Title: Re: [Lua] Gravity guy
Post by: Jonius7 on February 26, 2012, 08:17:39 am
Sorry I can't get a colour screenshot atm. The only solution I can think of is to download TI-nspire Computer Software and use that as I don't own a CX.
Also if you want to make your own moving screenshots you can now follow my tutorial which I updated.
http://ourl.ca/6943
Title: Re: [Lua] Gravity guy
Post by: Chockosta on February 26, 2012, 08:25:07 am
Actually, I didn't dump the boot1 of my CX (I don't have installed ndless, I wait for a stable release)...
But thanks for the tutorial, I'll give it a try soon.
Title: Re: [Lua] Gravity guy
Post by: Jonius7 on February 26, 2012, 08:26:50 am
W8 but you still have nspire_emu working without boot1? It didn't seem to work for me unfortunately.
Title: Re: [Lua] Gravity guy
Post by: Chockosta on February 26, 2012, 08:27:49 am
I can't emulate a CX, I have to use a grayscale model...
Title: Re: [Lua] Gravity guy
Post by: Jonius7 on February 26, 2012, 08:29:05 am
Ye same. But you own a CX, so dumping a boot1 is possible. there was something on ti-planet called polydumper or something.
Title: Re: [Lua] Gravity guy
Post by: Chockosta on February 26, 2012, 08:31:29 am
I know, but it needs ndless, and I don't have it installed on my CX.
But that's something I should do as soon as possible.
Title: Re: [Lua] Gravity guy
Post by: Jonius7 on February 26, 2012, 08:34:27 am
It's not terribly difficult to get ndlesss I guess. Back in the old days of ndless 1.1, that was tricky.
Good luck with that, and all your projects too!
Title: Re: [Lua] Gravity guy
Post by: Chockosta on April 15, 2012, 01:07:41 pm
This game is finished !

I added 30 levels, the random mode and some others nice things.
So now there are 50 levels! (A lot of thanks to my friend Dorian, who created 10 levels)
All the levels >30 are really hard, and the last 10 are absolutely insane :D
But don't worry, the first ones are easy.
I you manage to finish them all, you will unlock 3 bonus levels (which are not real levels)
The random mode is supposed to be challenging even for people who finished all the levels, so it's really hard too. (My highscore is around 15,000)

Have fun !  ;D

DOWNLOAD (http://www.omnimaga.org/index.php?action=dlattach;topic=11907.0;attach=12493)
Title: Re: [Lua] Gravity guy
Post by: AzNg0d1030 on April 17, 2012, 09:04:44 pm
This game is finished !

I added 30 levels, the random mode and some others nice things.
So now there are 50 levels! (A lot of thanks to my friend Dorian, who created 10 levels)
All the levels >30 are really hard, and the last 10 are absolutely insane :D
But don't worry, the first ones are easy.
I you manage to finish them all, you will unlock 3 bonus levels (which are not real levels)
The random mode is supposed to be challenging even for people who finished all the levels, so it's really hard too. (My highscore is around 15,000)

Have fun !  ;D

DOWNLOAD (http://www.omnimaga.org/index.php?action=dlattach;topic=11907.0;attach=12493)
Wow the first 20 were pretty hard.  But now.../me dies from addictiveness
Title: Re: [Lua] Gravity guy
Post by: DJ Omnimaga on April 17, 2012, 09:09:38 pm
Btw I think I beat a bunch of the levels in the other version posted in news recently. Some are really hard, but fun O.O
Title: Re: [Lua] Gravity guy
Post by: Munchor on April 18, 2012, 04:24:23 pm
Just tried the game on my calc, looking good, nice job!
Title: Re: [Lua] Gravity guy
Post by: Loulou 54 on April 18, 2012, 05:15:23 pm
Wow really cool to play ! And colors are pretty beautiful ! ;)
Title: Re: [Lua] Gravity guy
Post by: apcalc on April 29, 2012, 07:40:13 pm
This game is very fun!  Thanks for your great effort! :)
Title: Re: [Lua] Gravity guy
Post by: Jonius7 on May 01, 2012, 06:46:58 am
Spoiler For Quoted Post:
This game is finished !

I added 30 levels, the random mode and some others nice things.
So now there are 50 levels! (A lot of thanks to my friend Dorian, who created 10 levels)
All the levels >30 are really hard, and the last 10 are absolutely insane :D
But don't worry, the first ones are easy.
I you manage to finish them all, you will unlock 3 bonus levels (which are not real levels)
The random mode is supposed to be challenging even for people who finished all the levels, so it's really hard too. (My highscore is around 15,000)

Have fun !  ;D

DOWNLOAD (http://www.omnimaga.org/index.php?action=dlattach;topic=11907.0;attach=12493)

Oh wow. How could I have not noticed the final release! I was addicted to this game a lot and finished all levels except for 19. Can't do it sob ;( when the platforms become incredibly short at fast speed and there is a slight delay when I press the tab button.
Title: Re: [Lua] Gravity guy
Post by: hellninjas on May 07, 2012, 12:20:58 pm
I must try when I get home :D +1
Title: Re: [Lua] Gravity guy
Post by: Yeong on May 07, 2012, 06:39:46 pm
i don't know why, but whenever I hear "Gravity Guy", I always think of "Gravity Man"
Title: Re: [Lua] Gravity guy
Post by: brucej847 on January 21, 2013, 11:34:58 am
Chockosta, me and my app development team really like your game.  We would like to use your program for an iPhone app.  May we have your permission to do this?
Title: Re: [Lua] Gravity guy
Post by: Chockosta on January 21, 2013, 12:56:45 pm
Sure ! My programs aren't under any license.

You can use them, and even get all the credit for it. (But I'd appreciate if you mention my name)
The source code is attached to this post.
Title: Re: [Lua] Gravity guy
Post by: lkj on February 20, 2013, 10:01:39 am
Is there a workaround or a simple fix for the bug that the document is sometimes just blank when I open it and will never work again, so I have to re-send it to the calc? Or am I the only one with that problem...

Apart from that, a really nice game. Cubefield and Gravity Guy are definitely the games I like the most on my nspire so far.
Title: Re: [Lua] Gravity guy
Post by: Chockosta on February 20, 2013, 10:10:23 am
I never saw this bug, this is very strange.
Which OS are you using ?
And what do you mean by "the document is sometimes just blank" ? Is the document totally empty or is it the Lua script app which is blank ?
Title: Re: [Lua] Gravity guy
Post by: lkj on February 20, 2013, 10:16:40 am
3.1 CAS touchpad. When I close the document (automatically when I open another document) and reopen it later, it doesn't work anymore. By that I mean the document gets opened, but the Lua page is just blank.
Title: Re: [Lua] Gravity guy
Post by: Adriweb on February 20, 2013, 11:10:24 am
What I do when Lua script crashes on the handhelds, when possible (it's not when they are storing external data...), it's that when it gets all blank, I just delete the tab when in thumbnail mode, and Ctrl-Z that. It reloads the original lua script, then.
Title: Re: [Lua] Gravity guy
Post by: DJ Omnimaga on February 20, 2013, 02:16:29 pm
Is that an OS bug?
Title: Re: [Lua] Gravity guy
Post by: ElementCoder on February 20, 2013, 03:04:31 pm
I doubt it is a bug, I never had this problem but I might be wrong.
Title: Re: [Lua] Gravity guy
Post by: Levak on February 20, 2013, 10:23:35 pm
3.1 CAS touchpad. When I close the document (automatically when I open another document) and reopen it later, it doesn't work anymore. By that I mean the document gets opened, but the Lua page is just blank.
Are you trying to open a Lua script that has a consequent size (like hundreds of KB) ?
Do you have ClickPad or TouchPad Nspire ?

If so, it is an OS bug. Literally : not enough RAM.
Title: Re: [Lua] Gravity guy
Post by: Adriweb on February 21, 2013, 06:06:04 am
However, if it's not a memory issue, it's not an OS bug, but actually a bug in the script itself. Contrary to TINCS where the bug can be displayed in the SDK, on the handheld nothing happens, and a blank page takes the place of the script.

(which is why deleting the widget and Ctrl+Z-ing it restores it.)
Title: Re: [Lua] Gravity guy
Post by: DJ Omnimaga on February 21, 2013, 09:19:08 am
It depends what does Levak mean, though. When he says "not enough RAM", does he mean false low RAM reports like when you try to launch old TI CDs on newer computers?
Title: Re: [Lua] Gravity guy
Post by: Levak on February 21, 2013, 10:54:46 am
There is no error message when the Lua script is too big (Beside there is one for too large images in the script).
The behavior is to leave the page blank without error and if you resave the document you will lose the script.
This happens more often on ClickPad and TouchPad since the RAM is lower than the CX.
Title: Re: [Lua] Gravity guy
Post by: lkj on February 21, 2013, 11:41:25 am
Is the document totally empty or is it the Lua script app which is blank ?
Sorry, I looked again today and saw that it's really empty. I have a TouchPad Nspire, so Levak is probably right that there's too little RAM. That means it should only be a problem if I save the document while I'm for example in the document browser, because the script isn't blank before I save it, only when I open it again later.
Are you trying to open a Lua script that has a consequent size (like hundreds of KB) ?
The tns is only 23KB, but its Lua code Chockosta posted is 250KB.
Is there any way to reduce the RAM usage of the OS or something?