Author Topic: nTris - Tetris for nSpire -  (Read 92965 times)

0 Members and 1 Guest are viewing this topic.

Offline AzNg0d1030

  • LV7 Elite (Next: 700)
  • *******
  • Posts: 522
  • Rating: +45/-4
  • Hardcore anime watcher.
    • View Profile
Re: nTris - Tetris for nSpire -
« Reply #75 on: September 20, 2012, 06:23:23 pm »
Continuing with my ndless explorations, i've decided to ressurrect this popular and funny project, because it brings me back some of my almost forgotten memories. I guess the author 'wRieden' has gone on vacation. Hope he doesn't mind. :)
So, i've decided to try to make it ready for Nspire CX (gray-color!). I think i did it in some way. Try it out and tell if it works and if you can manage to make some points (cx is a bit faster). Please find attached the source and .tns. Maybe some game experts want to add some color. The cx 'pain' was mostly due to the timers having different addresses. nTrisCX should also run in non-cx systems. Have fun.
Could you make it a zip file by any chance? I'm having trouble opening it on a Mac
You just lost the game.



Offline SpiroH

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +153/-23
    • View Profile
Re: nTris - Tetris for nSpire -
« Reply #76 on: September 20, 2012, 06:31:49 pm »
Could you make it a zip file by any chance? I'm having trouble opening it on a Mac
Sure!

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: nTris - Tetris for nSpire -
« Reply #77 on: September 21, 2012, 09:44:39 am »
The author might actually have quit the community. This happens more often with Nspire coders since 2011 due to what TI did to Ndless a few times. Glad someone is picking this up again, though. :D

Offline SpiroH

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +153/-23
    • View Profile
Re: nTris - Tetris for nSpire - SDL implementation
« Reply #78 on: September 22, 2012, 11:45:04 am »
The author might actually have quit the community. This happens more often with Nspire coders since 2011 due to what TI did to Ndless a few times. Glad someone is picking this up again, though. :D
Thanks DJ_O. Yeah, i was following the hardware clues. Of course, nowadays we have the abstract software overlays all around the place (some are quite slow mind you, does .net ring the bell?). OTOH, some are quite cute and really ease the programmer's life after the initial jargon overhead. Short, i'm changing the initial project almost completely, i'm keeping the name tho. :P Have been reading a little about hoffa's SDL port effort, and decided to port yet another simple tetris clone from here: http://code.google.com/p/simple-tetris-clone/. I dunno if we can motivate young students to do some programming, but this is the basic idea. ndless is a good opportunity and i'm positive ExtendeD will find some fix someday to TI's nag!
Here is the simple sdl example:
  
For the moment, i'm just showing it off. Next i'll provide the source code after i've removed some ugly comments. ;)
Limitation: atm the program's 3 bitmaps MUST be installed at a fixed location: "ndless/nTris" folder. So, make sure all 3 bitmaps files are transferred to that folder. This is due to the fact that, to my surprise, the SDL_loadBMP nspire implementation appears to take only absolute paths. The program itself ('nTris-sdl.tns') can be placed anywhere. I know we can later replace the smaller bitmaps by a bitmap description in software. Maybe i'll do it later... Oh, this only works on the CX models! Please visit the original site for instructions, but they're trivial as usual. Have fun.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: nTris - Tetris for nSpire -
« Reply #79 on: September 22, 2012, 12:11:56 pm »
Awesome, I really like those graphics :D
However, could you add the 8,4,5,6 keys as arrow keys ? I really don't like to use the touchpad as buttons (if I put more than one finger on the touchpad, it detects a random direction) :)

edit I noticed that those bmps are real bmps, so if I don't like graphics, I can change them ? O.O
« Last Edit: September 22, 2012, 12:13:44 pm by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline Wayne

  • LV3 Member (Next: 100)
  • ***
  • Posts: 72
  • Rating: +3/-3
    • View Profile
Re: nTris - Tetris for nSpire -
« Reply #80 on: September 22, 2012, 02:58:48 pm »
Nice work.

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: nTris - Tetris for nSpire -
« Reply #81 on: September 22, 2012, 03:01:18 pm »
Nice I like the graphics too. :)

Offline cyanophycean314

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 363
  • Rating: +43/-1
  • It's You!
    • View Profile
Re: nTris - Tetris for nSpire -
« Reply #82 on: September 22, 2012, 05:21:38 pm »
It looks pretty nice, but now the screenie disappeared.  D:

Offline SpiroH

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +153/-23
    • View Profile
Re: nTris - Tetris for nSpire -
« Reply #83 on: September 22, 2012, 05:35:29 pm »
I noticed that those bmps are real bmps, so if I don't like graphics, I can change them ? O.O
Yeah! Well, shortly (tomorrow?) you'll be able to change a lot of things.

Nice work.
Thanks! Btw, you should remove the double post. That's the reason (i think?) someone has given you a negative point.

It looks pretty nice, but now the screenie disappeared.  D:
What do you mean by screenie? I'm not sure i understand what you mean. Is it screenshot (F7)? If it is, well it works fine by me!?

Offline lkj

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 485
  • Rating: +58/-1
    • View Profile
Re: nTris - Tetris for nSpire -
« Reply #84 on: September 22, 2012, 06:28:52 pm »
Limitation: atm the program's 3 bitmaps MUST be installed at a fixed location: "ndless/nTris" folder. So, make sure all 3 bitmaps files are transferred to that folder. This is due to the fact that, to my surprise, the SDL_loadBMP nspire implementation appears to take only absolute paths. The program itself ('nTris-sdl.tns') can be placed anywhere. I know we can later replace the smaller bitmaps by a bitmap description in software. Maybe i'll do it later... Oh, this only works on the CX models! Please visit the original site for instructions, but they're trivial as usual. Have fun.
Couldn't you just use argv for relative paths?

It looks nice, but I hope you will make it work also on non-CX.

Offline SpiroH

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +153/-23
    • View Profile
Re: nTris - Tetris for nSpire -
« Reply #85 on: September 22, 2012, 06:51:12 pm »
Couldn't you just use argv for relative paths?
Thanks for your comments. I think so, possibly using argv[0] and getcwd() we could work it out. I simply didn't bother yet. I'll see it.
Quote
It looks nice, but I hope you will make it work also on non-CX.
Well, in non-CX certainly it will loose a lot of color(s) but for the sake of completeness it would be nice to try it out and see how the colors scale into gray levels.


Offline SpiroH

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 729
  • Rating: +153/-23
    • View Profile
Re: nTris - Tetris for nSpire -
« Reply #86 on: September 23, 2012, 01:02:58 pm »
Here goes another take on nTris-sdl with the following improvements:
1. Reduced the nbr of bitmap files to only one: the background bitmap. The other two were converted into data (thanks hoffa!).
2. Now we can place both files: 'nTri-sdl.tns' and 'back.bmp.tns' anywhere inside the same folder.
3. Non-cx models are also supported although a bit crippled atm, because the functions 'srand() and 'rand' work fine in CX models but cause a reset in non-cx models ??? ? I guess it will be easy to sort out at a later stage.
I've implemented some work around 'randomn' function. I guess it's ok, but not optimal.
4. Have added also the keys: 8, 4, 6 and 2 to move the pieces, as requested by Hayleia, what makes perfect sense to me too. :)
5. Have added some keys to replace the function keys, as follows: key 'p' - pause/continue; key 'n' - toggle 'show next piece'.
6. Finally, i'm also adding the source. Here, i didn't have (yet) enough time to make it clean. well, you can do it.
BW view:
 
Hope is more functional this time and that it will motivate some todo likewise porting other nice sdl-games/demos to the calc. Please keep me informed of bugs or corrections.
 
Cheers,

Offline cyanophycean314

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 363
  • Rating: +43/-1
  • It's You!
    • View Profile
Re: nTris - Tetris for nSpire -
« Reply #87 on: September 23, 2012, 04:59:27 pm »
It looks pretty nice, but now the screenie disappeared.  D:
What do you mean by screenie? I'm not sure i understand what you mean. Is it screenshot (F7)? If it is, well it works fine by me!?
Yeah, the screenshot disappeared when I saw it, but now it's back. Nice progress!

Offline Sorunome

  • Fox Fox Fox Fox Fox Fox Fox!
  • Support Staff
  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 7920
  • Rating: +374/-13
  • Derpy Hooves
    • View Profile
    • My website! (You might lose the game)
Re: nTris - Tetris for nSpire -
« Reply #88 on: September 23, 2012, 10:51:46 pm »
Looking cool! Is there then also color on the cx, coz that would be awesome :D

THE GAME
Also, check out my website
If OmnomIRC is screwed up, blame me!
Click here to give me an internet!

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: nTris - Tetris for nSpire -
« Reply #89 on: September 24, 2012, 01:57:31 am »
2. Now we can place both files: 'nTri-sdl.tns' and 'back.bmp.tns' anywhere inside the same folder.
3. Non-cx models are also supported although a bit crippled atm, because the functions 'srand() and 'rand' work fine in CX models but cause a reset in non-cx models ??? ? I guess it will be easy to sort out at a later stage.
I've implemented some work around 'randomn' function. I guess it's ok, but not optimal.
4. Have added also the keys: 8, 4, 6 and 2 to move the pieces, as requested by Hayleia, what makes perfect sense to me too. :)
5. Have added some keys to replace the function keys, as follows: key 'p' - pause/continue; key 'n' - toggle 'show next piece'.
6. Finally, i'm also adding the source. Here, i didn't have (yet) enough time to make it clean. well, you can do it.
Those changes are great, and thanks for the keys :D

1. Reduced the nbr of bitmap files to only one: the background bitmap. The other two were converted into data (thanks hoffa!).
This one is less great, I liked how the game was customizable by the user :(
There was something too that I found annoying with the game: pressing the down key makes the piece fall but holding down the key does nothing (I mean it gets down by one case then stops instead of keeping falling)

Looking cool! Is there then also color on the cx, coz that would be awesome :D
Yes, there is color on CX as this post shows :)
And you have 1000 posts *.*
(only 24 more posts to a round number, would say Eiyeron :P)
« Last Edit: September 24, 2012, 02:54:15 am by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s