Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI-Nspire => Topic started by: ajorians on May 03, 2013, 05:02:39 pm

Title: nFalldown for NSpire
Post by: ajorians on May 03, 2013, 05:02:39 pm
Hey Guys,

I had a tad amount of time and decided to see if I could make Falldown for the NSpire!  I always liked playing that on the other calculators and since the NSpire didn't have one; I created one!

I currently have an embarrassing bug where sometimes the ball can go through the line!  I'll see if I can find and fix that one!

This had only been tried on the NSpire CX CAS.  Testing on the various calculators is one thing I certainly need to do more of!

But here it is such that you can play it over the weekend!  Let me know what you think!

I wasn't thinking of working on this one for too long; mainly because I want to get to some really fun games! :)  There are so many cool ideas with Falldown such as power-ups and breaking away lines and much more; but I think I'll keep it simple.  I might add ability to choose difficulty when starting out for beginners to this game!  I included all my sources if somebody ever wanted to add to it!

Well I hope you like it!
Title: Re: nFalldown for NSpire
Post by: TheNlightenedOne on May 03, 2013, 09:43:22 pm
Very nice! I'll try this soon.
Title: Re: nFalldown for NSpire
Post by: DJ Omnimaga on May 03, 2013, 10:59:44 pm
Looks very great! :D
Title: Re: nFalldown for NSpire
Post by: ExtendeD on May 04, 2013, 02:44:44 am
Nice :)

Interesting to see it's written in C++. Did you use tangrs's technique (http://blog.tangrs.id.au/?p=712)? But I can't see where the new, delete, ... operators are being defined.
Title: Re: nFalldown for NSpire
Post by: ElementCoder on May 04, 2013, 06:02:18 am
Actually there has been another falldown game for the nspire. Though it had the same bug with going through the platforms sometimes. On topic: looking good :) this'll help when I'm bored in class :P
Title: Re: nFalldown for NSpire
Post by: aeTIos on May 04, 2013, 06:15:34 am
Nice! Will try it.
although you could maybe use less exclamation marks?
as for the falling through I think I know what causes it. you are probably only checking a few pixels under the ball for collision. I don't know if you actually accelerate while falling but you should check as many pixels as you fall every frame to make sure you don't miss collisions. I had this bug too much to overlook it anymore :P
Title: Re: nFalldown for NSpire
Post by: Adriweb on May 04, 2013, 06:19:01 am
Very nice :)

Reminds me of my Lua equivalent from two years ago :P

(http://i.imgur.com/GSxPCNNm.jpg) (http://tiplanet.org/forum/archives_voir.php?id=3502)

An idea for you : in my version, I added a "bonus" every 500 points IIRC, that lets the player dig through the lines when pressing enter :)
Title: Re: nFalldown for NSpire
Post by: Stefan Bauwens on May 04, 2013, 07:11:10 am
Haha! That falling man was my avatar once. XD(Comes from Myst).

It looks nice. Hope it runs fine too. :)
Title: Re: nFalldown for NSpire
Post by: ajorians on May 04, 2013, 11:14:45 am
Hi Guys,

Thank you for all of your replies!

ExtendeD: Yes; I did use tangrs's technique.  But I didn't use new/delete.  On a C++ branch of his (https://github.com/tangrs/ndless-bflt-toolchain/tree/c%2B%2B/tools) he did make it so new/delete/new[]/delete[] are built-in so you wouldn't need to add them in each program you use.  I did set that up; but I've been alright with just using malloc/free.  And it actually works well for me.  I like the separation of view (UI) code and the data.  I like object orientated programming; so even when I use C; I am thinking encapsulation!  Holler if you have any questions!  I love the work you (and others) have been doing!

aeTIos: I was pretty excited yesterday so I might have gotten a little carried away with a certain punctuation symbol! :)  I am betting it might be needing a <= instead of just a < in one of the for loops.  Or something else rather small.  I know it seems so simple.  I'll find it!

ElementCoder & adriweb:  You both are right there have been Falldown for the Nspire!  Whoops!  Upon actually doing some searching (http://ourl.ca/17270) there have been a few for the Nspire already (http://tiplanet.org/forum/archives_voir.php?id=3520).  I'll still fix up some bugs and then go onto more projects! :)  ardiweb: Your Lua equivalent from two years ago looks good!

Stefan Bauwens: I know it makes the program larger; but I like the idea of having a small menu.  For the images; I used image search for terms like Falldown.  I never knew it was your avatar before or came from Myst.

Thank you all very much and have an amazing day!

Title: Re: nFalldown for NSpire
Post by: ExtendeD on May 05, 2013, 04:55:25 am
Not being able to use the bFLT loader with nSDL doesn't cause you any problem when using C++?
Title: Re: nFalldown for NSpire
Post by: ajorians on May 05, 2013, 09:39:02 am
Hi ExtendeD,

Correct.  One reason I was really interested in using bFLT is an example showed loading up a "dynamic library" (that is what I call it).  So I eventually would like to make programs that have A.I. players in them and come with some number of A.I. players and have the ability to add some more later.  Not being able to use bFLT loader and nSDL had no bearing with C++ for me; the C++ I used worked perfectly fine with bFLT loader and C++ worked fine with nSDL.  I'd be perfectly okay using C and bFLT loader and nSDL.

Hope that helps!  Have a great day! :)
Title: Re: nFalldown for NSpire
Post by: ajorians on May 09, 2013, 02:18:41 pm
Hey Guys,

I updated my Falldown game.  I added in the ability to hit the 'p' key to pause/unpause.  As well as I tested it on a non-CX Nspire (TI-Nspire Touchpad) and made it work better on that.  Such as with the game over/highscore message, on a classic Nspire it'll have a white background instead of a blue one (which isn't blue when you don't have colors).  Also I fixed my bug I wanted to from earlier.

So I'm happy with it and will try to get to more interesting games/programs!

Download it if you'd like and let me know what you think!

Have a wonderful day!
Title: Re: nFalldown for NSpire
Post by: ExtendeD on May 09, 2013, 02:20:46 pm
Great :)

Why is it so fast on nspire_emu?
Title: Re: nFalldown for NSpire
Post by: CalebHansberry on May 09, 2013, 03:05:32 pm
Good looking program, ajorians.
Title: Re: nFalldown for NSpire
Post by: ajorians on May 09, 2013, 05:19:11 pm
Hi,

ExtendeD: It is probably because I don't have any SDL_Delay in the code.  When I test in nspire_emu I uncomment Game.cpp line 51 where there is a SDL_Delay.  So it just runs the loop; I didn't put any timer code in there.  I test on the actual calculator before releasing though!

CalebHansberry: Thanks buddy! :)
Title: Re: nFalldown for NSpire
Post by: superloach on November 19, 2017, 09:15:00 pm
From what I've heard (and noticed), Firebird runs much faster than a real calc if it can.
Title: Re: nFalldown for NSpire
Post by: ajorians on December 28, 2017, 08:08:20 pm
Hi superloach,

I use it to do my testing and you are right.  I should have put in a delay in the code.  Sorry.  This way it would be possible to play on the emulator.