Author Topic: nFalldown for NSpire  (Read 16873 times)

0 Members and 1 Guest are viewing this topic.

Offline ajorians

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 105
  • Rating: +47/-0
    • View Profile
nFalldown for NSpire
« 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!

Offline TheNlightenedOne

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 427
  • Rating: +16/-1
    • View Profile
Re: nFalldown for NSpire
« Reply #1 on: May 03, 2013, 09:43:22 pm »
Very nice! I'll try this soon.
"Eris" (Ndless 3.1)
"Keto" (Ndless 3.1)
"Luna" (AMS 3.10, HW4)
"Aurora" (2.55MP)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: nFalldown for NSpire
« Reply #2 on: May 03, 2013, 10:59:44 pm »
Looks very great! :D

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: nFalldown for NSpire
« Reply #3 on: May 04, 2013, 02:44:44 am »
Nice :)

Interesting to see it's written in C++. Did you use tangrs's technique? But I can't see where the new, delete, ... operators are being defined.
Ndless.me with the finest TI-Nspire programs

Offline ElementCoder

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 611
  • Rating: +42/-2
    • View Profile
Re: nFalldown for NSpire
« Reply #4 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

Some people need a high five in the face... with a chair.
~EC

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: nFalldown for NSpire
« Reply #5 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
« Last Edit: May 04, 2013, 06:17:00 am by aeTIos »
I'm not a nerd but I pretend:

Offline Adriweb

  • Editor
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1708
  • Rating: +229/-17
    • View Profile
    • TI-Planet.org
Re: nFalldown for NSpire
« Reply #6 on: May 04, 2013, 06:19:01 am »
Very nice :)

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



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 :)
My calculator programs
TI-Planet.org co-admin.
TI-Nspire Lua programming : Tutorials  |  API Documentation

Offline Stefan Bauwens

  • Creator of Myst 89 - סטיבן
  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1799
  • Rating: +162/-24
  • 68k programmer
    • View Profile
    • Portfolio
Re: nFalldown for NSpire
« Reply #7 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. :)


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

Interview with me

Offline ajorians

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 105
  • Rating: +47/-0
    • View Profile
Re: nFalldown for NSpire
« Reply #8 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!


Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: nFalldown for NSpire
« Reply #9 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++?
« Last Edit: May 05, 2013, 04:56:36 am by ExtendeD »
Ndless.me with the finest TI-Nspire programs

Offline ajorians

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 105
  • Rating: +47/-0
    • View Profile
Re: nFalldown for NSpire
« Reply #10 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! :)

Offline ajorians

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 105
  • Rating: +47/-0
    • View Profile
Re: nFalldown for NSpire
« Reply #11 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!

Offline ExtendeD

  • CoT Emeritus
  • LV8 Addict (Next: 1000)
  • *
  • Posts: 825
  • Rating: +167/-2
    • View Profile
Re: nFalldown for NSpire
« Reply #12 on: May 09, 2013, 02:20:46 pm »
Great :)

Why is it so fast on nspire_emu?
Ndless.me with the finest TI-Nspire programs

Offline CalebHansberry

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 135
  • Rating: +14/-0
  • This is my personal text
    • View Profile
    • Skylites Computers
Re: nFalldown for NSpire
« Reply #13 on: May 09, 2013, 03:05:32 pm »
Good looking program, ajorians.
You should know, I am a Christian.

Offline ajorians

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 105
  • Rating: +47/-0
    • View Profile
Re: nFalldown for NSpire
« Reply #14 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! :)