Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI-Nspire => Topic started by: aeTIos on July 03, 2014, 03:43:19 pm

Title: [WIP] Unnamed Tetris clone
Post by: aeTIos on July 03, 2014, 03:43:19 pm
Over the past week, Streetwalrus and I have been working hard on a Tetris clone for Nspire. At the moment, it is far from finished, but playable, so we decided to post a demo here.
You can cheat, find out how! ;D
Video over here (https://www.dropbox.com/s/te1x9kyioqc1x8r/tetris.mp4)
Known quirks:
-No position checking yet. Yup, this means lines aren't removed yet.
-Rotating a piece is waay too fast.
-Moving a piece is finicky.
-No dropping yet.

Have fun playing this half-finished game.

edit: We use Matrefeytiontias, Hayleia and pierrotdu18's n2DLib. No source yet, but once we post it, MIT licence.
Title: Re: [WIP] Unnamed Tetris clone
Post by: Streetwalrus on July 03, 2014, 04:06:07 pm
I just finished fixing the rotation set to be the same as the GameBoy version.
Title: Re: [WIP] Unnamed Tetris clone
Post by: Sorunome on July 03, 2014, 04:06:46 pm
Looking nice guys! :D
Title: Re: [WIP] Unnamed Tetris clone
Post by: Matrefeytontias on July 03, 2014, 06:23:35 pm
So that's what you two were doing :P nice work, looks awesome ! (although Tetris isn't really my thing to be honest)

Also, n2DLib has no license, mainly because we were too lazy to put one in place.
Title: Re: [WIP] Unnamed Tetris clone
Post by: DJ Omnimaga on July 03, 2014, 07:35:56 pm
Looks nice so far :D
Title: Re: [WIP] Unnamed Tetris clone
Post by: Streetwalrus on July 03, 2014, 07:36:28 pm
Ok so I worked some more and I'm bringing an update ! :D
Changes :
- Rotation set from the GameBoy version. This means the pieces spawn and rotate the same way as the most widely know version. \o/
- Breaking lines works. So now you can actually play.
- Control the pieces with the numpad too (4/6 for L/R, 8 for up (rotate) and 5 and 2 for down).
- You can make pieces drop faster with down or 5 or 2.

Known issue : the game runs at non constant speed. This is under investigation but will probably be ignored anyway because we will change the way we time it.
Title: Re: [WIP] Unnamed Tetris clone
Post by: Hayleia on July 03, 2014, 11:44:17 pm
edit: We use Matrefeytiontias's n2DLib. @matref: what is the licence for your lib?
He's not the only author D:

Anyway, that's looking nice indeed, I didn't like how GameBoy (Advance) Tetris games had story modes or weird things like that, I just want to play Tetris :P
Title: Re: [WIP] Unnamed Tetris clone
Post by: aeTIos on July 04, 2014, 12:34:34 am
edit: We use Matrefeytiontias's n2DLib. @matref: what is the licence for your lib?
He's not the only author D:

Anyway, that's looking nice indeed, I didn't like how GameBoy (Advance) Tetris games had story modes or weird things like that, I just want to play Tetris :P
Woops, you're right. But Matref is most notorious for it :P
Title: Re: [WIP] Unnamed Tetris clone
Post by: Matrefeytontias on July 04, 2014, 04:06:09 am
It's pierrotdu18, Hayleia and me' n2DLib :|
Title: Re: [WIP] Unnamed Tetris clone
Post by: aeTIos on July 04, 2014, 04:32:16 am
It's pierrotdu18, Hayleia and me' n2DLib :|
Fixed.
Title: Re: [WIP] Unnamed Tetris clone
Post by: tifreak on July 04, 2014, 10:14:15 am
This looks fantastic! Once I get to exploring my CX to add things to it, this one will no doubt have to be there :D
Title: Re: [WIP] Unnamed Tetris clone
Post by: aeTIos on July 04, 2014, 10:33:08 am
Why thanks ^^ and it isn't even close to being finished yet!
Title: Re: [WIP] Unnamed Tetris clone
Post by: Streetwalrus on July 04, 2014, 10:53:03 am
Thanks tifreak !
/me blushes
Title: Re: [WIP] Unnamed Tetris clone
Post by: Hayleia on July 04, 2014, 03:23:02 pm
edit: We use Matrefeytiontias's n2DLib. @matref: what is the licence for your lib?
He's not the only author D:

Anyway, that's looking nice indeed, I didn't like how GameBoy (Advance) Tetris games had story modes or weird things like that, I just want to play Tetris :P
Woops, you're right. But Matref is most notorious for it :P
Let me correct that : he's notorious for having problems with a program using that lib while the other two developpers didn't have any.
/me runs :P
Title: Re: [WIP] Unnamed Tetris clone
Post by: Streetwalrus on July 04, 2014, 03:38:07 pm
But didn't he start the lib ?

(Also this is getting off topic so please let's move to the n2DLib topic for that)
Title: Re: [WIP] Unnamed Tetris clone
Post by: Streetwalrus on July 04, 2014, 06:47:54 pm
OK I got hardware timers figured out. Still need to add non CX support for that (first model specific code introduced) but otherwise it works. I'm trying to debug a crash and then I'll upload a new version.

Also pro tip : remove the battery when testing on hardware. It makes resetting and accessing the diagnostics menu easier (replug the USB cable instead of pushing reset).
Title: Re: [WIP] Unnamed Tetris clone
Post by: Hayleia on July 05, 2014, 03:00:56 am
But didn't he start the lib ?
On the contrary, he was the last one to join the team. Pierrotdu18 and I were the first to talk about making it because of his Flappy Bird being slow on non-CXes. He found a starting point in nClock, I wrote the first routines, he optimized them, I wrote the first game with it, he wrote other routines and then Matref appeared, and they worked on supporting buffers.
Title: Re: [WIP] Unnamed Tetris clone
Post by: Streetwalrus on July 05, 2014, 04:12:23 am
Ah ok.
Title: Re: [WIP] Unnamed Tetris clone
Post by: Matrefeytontias on July 05, 2014, 04:40:11 am
Well see I'm more famous than you :E

Seriously though x) yeah I arrived last, but hey, don't make it look like I only worked on buffer support or you're still working on it --' with pierrotdu18 we're working on many routines and we're still harassing you for you to dev with us <_<
Title: Re: [WIP] Unnamed Tetris clone
Post by: aeTIos on July 05, 2014, 05:48:05 am
This is getting kinda off-topic <_< Let's keep this thread for updates on Tetris.
Title: Re: [WIP] Unnamed Tetris clone
Post by: Streetwalrus on July 05, 2014, 09:49:40 am
Aaaaand here goes an update !
Matref fixed a bug in n2DLib so the game should no longer crash. The base engine should be complete now. We are working on extending that to make a full game.
Changes :
-Uses hardware timers
-Improve the color scheme
-Fix the rotation set so that pieces spawn with the flat side down
-Pieces spawn above the screen now

Warning ! The attached version will NOT work on non CX calculators. Support for these will be back in a future version.
Title: Re: [WIP] Unnamed Tetris clone
Post by: aeTIos on July 05, 2014, 09:56:48 am
For those wondering why only CX is supported atm: We use CX-specific flags for controlling the timers.
Title: Re: [WIP] Unnamed Tetris clone
Post by: DJ Omnimaga on July 06, 2014, 07:06:52 pm
Well see I'm more famous than you :E

Seriously though x) yeah I arrived last, but hey, don't make it look like I only worked on buffer support or you're still working on it --' with pierrotdu18 we're working on many routines and we're still harassing you for you to dev with us <_<
It doesn't mean he is forced to dev with you, though. People will contribute if they feel like it. Besides, if Hayleia works on that stuff then this means it will take even longer before we get Pokémon Topaze Nspire Remake :P


Also I need to try that Tetris clone on-calc. The only thing, though, is will it run on Ndless 3.1?

EDIT Nvm it does. Looks nice so far, but:

-It needs key delay for when you start pressing arrows down, because keys are too sensitive right now, making it next to impossible to control blocks.
-Calculator reboots when you die.
Title: Re: [WIP] Unnamed Tetris clone
Post by: Hayleia on July 07, 2014, 01:36:51 am
Besides, if Hayleia works on that stuff then this means it will take even longer before we get Pokémon Topaze Nspire Remake :P
Lol, it is kind of useless to port Topaze to Nspires with gbc4nspire and gpSP out :P
But it's not the same for Tetris since Tetris games for Gameboys were weird.
Title: Re: [WIP] Unnamed Tetris clone
Post by: willrandship on July 07, 2014, 01:57:35 am
NESpire can give you a decent tetris, but there's already ntris.

Not that that's any excuse to avoid the project, mind you!
Title: Re: [WIP] Unnamed Tetris clone
Post by: aeTIos on July 07, 2014, 01:59:47 am
Besides, if Hayleia works on that stuff then this means it will take even longer before we get Pokémon Topaze Nspire Remake :P
Lol, it is kind of useless to port Topaze to Nspires with gbc4nspire and gpSP out :P
But it's not the same for Tetris since Tetris games for Gameboys were weird.
Native > emulated at any rate, tho.

We're getting off-topic again, tho <_<
Title: Re: [WIP] Unnamed Tetris clone
Post by: DJ Omnimaga on July 07, 2014, 10:16:53 am
Besides, if Hayleia works on that stuff then this means it will take even longer before we get Pokémon Topaze Nspire Remake :P
Lol, it is kind of useless to port Topaze to Nspires with gbc4nspire and gpSP out :P
But it's not the same for Tetris since Tetris games for Gameboys were weird.
true, but the Nspire needs some "original" games. All we have besides the FPS ports are emulators. D:
Title: Re: [WIP] Unnamed Tetris clone
Post by: Streetwalrus on July 07, 2014, 10:18:06 am
Well see I'm more famous than you :E

Seriously though x) yeah I arrived last, but hey, don't make it look like I only worked on buffer support or you're still working on it --' with pierrotdu18 we're working on many routines and we're still harassing you for you to dev with us <_<
It doesn't mean he is forced to dev with you, though. People will contribute if they feel like it. Besides, if Hayleia works on that stuff then this means it will take even longer before we get Pokémon Topaze Nspire Remake :P


Also I need to try that Tetris clone on-calc. The only thing, though, is will it run on Ndless 3.1?

EDIT Nvm it does. Looks nice so far, but:

-It needs key delay for when you start pressing arrows down, because keys are too sensitive right now, making it next to impossible to control blocks.
-Calculator reboots when you die.
Yes both are fixed already. Just need to upload a new tns.
Title: Re: [WIP] Unnamed Tetris clone
Post by: DJ Omnimaga on July 07, 2014, 10:29:38 am
Cool to hear. By the way, will there be some sort of tiled backgrounds? I know people tend to not like the non-GB Tetris games as much but I felt that Tetris DX looked cool :P
Title: Re: [WIP] Unnamed Tetris clone
Post by: aeTIos on July 07, 2014, 10:50:24 am
Besides, if Hayleia works on that stuff then this means it will take even longer before we get Pokémon Topaze Nspire Remake :P
Lol, it is kind of useless to port Topaze to Nspires with gbc4nspire and gpSP out :P
But it's not the same for Tetris since Tetris games for Gameboys were weird.
true, but the Nspire needs some "original" games. All we have besides the FPS ports are emulators. D:
Like I said, native > emulated. Also you might have noticed that pimathbrainiac, Streetwalrus, daniils and I have something in the works >:D
And no, it isn't a tetris clone :P
Title: Re: [WIP] Unnamed Tetris clone
Post by: Streetwalrus on July 07, 2014, 02:14:35 pm
So as I said, I fixed the problems. The game is fully playable now (you still can't lose though).

I need grayscale calcs owners to test it out, I just added the driver for the timer in these.

Edit : I just realized I forgot to recompile it so this tns doesn't have the classic driver. :P Hold on a sec while I fix the compile error.
Edit 2 : Here we go, this one is correct.
Title: Re: [WIP] Unnamed Tetris clone
Post by: Princetonlion.tibd on July 07, 2014, 03:16:39 pm
Makes me want to enter cemetech contest #12 for a nspire... No motivation though. I'm slightly slowing down on 83+ BASIC and focusing on my V200 now. And I have 1 year (barely) in programming experiance.
Title: Re: [WIP] Unnamed Tetris clone
Post by: Streetwalrus on July 07, 2014, 04:35:05 pm
I programmed for about seven years on three different calcs. It was time for me to move on (although I'm not giving up on the 8x+ line :P).
Title: Re: [WIP] Unnamed Tetris clone
Post by: Streetwalrus on July 08, 2014, 10:02:31 am
Critical fix time ! :D I just fixed a very annoying bug that involved illegal memory writes (the crash issue, which was previously worked around and not actually fixed), and some pieces not spawning as well as lag upon spawn. Now it works a lot better.

So new version attached, and I still need someone to test it on grayscale calcs. :P

Oh, and not that it's necessary but the whole thing (including n2DLib) is now compiled with -Ofast.
Title: Re: [WIP] Unnamed Tetris clone
Post by: DJ Omnimaga on July 11, 2014, 10:50:39 pm
Very good so far, although for some reasons key repeat rate seems a bit low. Maybe I,m too used to TetriZM though :P
Title: Re: [WIP] Unnamed Tetris clone
Post by: Streetwalrus on July 12, 2014, 06:45:05 am
No this was fixed too, just not uploaded. If you're talking about repeatedly tapping keys that is. :P I need to fix up the Classic timer driver and then I can upload that (yes Classic support is back).
Title: Re: [WIP] Unnamed Tetris clone
Post by: DJ Omnimaga on July 12, 2014, 12:09:50 pm
Oh I meant when holding down keys to make blocks fall down for example. It seemed slower than in other Tetris games.
Title: Re: [WIP] Unnamed Tetris clone
Post by: Streetwalrus on July 12, 2014, 02:22:16 pm
Oh that can be tweaked don't worry. :P
Title: Re: [WIP] Unnamed Tetris clone
Post by: Streetwalrus on July 17, 2014, 08:54:52 pm
This is what LSD mode looks like. (https://mediacru.sh/oW7BjpfnA_Sr) *.*
Title: Re: [WIP] Unnamed Tetris clone
Post by: DJ Omnimaga on July 17, 2014, 08:57:38 pm
I hope this doesn't make it into the final game :P

Also I was expecting Hoffa's plasma animation in the background :P
Title: Re: [WIP] Unnamed Tetris clone
Post by: aeTIos on November 19, 2014, 12:10:26 pm
Last week, I decided to pick this up again and add some much-needed features such as scoring and a bag algorithm (which prevents pieces from appearing too often)
Still far from finished, but at least I have something playable now!
Download link:
https://dl.dropboxusercontent.com/u/64788231/tetris001.tns

Source is on GitHub (https://github.com/Streetwalrus/tetris)!

For developing, we use the n2DLib library, which sadly has a bug which prevents timers from working on grayscale models. This will hopefully be fixed in a next version, but till then, you can't run Tetris on a grayscale Nspire. Sorry!

Controls:
Up[8]: rotate piece
Left[4]/Right[6]: move piece left/right
Down[5/2]: Drop piece
Esc: quit
Just ignore the values on the right, except the top one. They're used for debugging and I just uploaded the latest stable debug version to my Dropbox ;)
Title: Re: [WIP] Unnamed Tetris clone
Post by: Streetwalrus on November 19, 2014, 12:14:50 pm
For developing, we use the n2DLib library by matrefeytontias, which sadly has a bug which prevents timers from working on grayscale models. This will hopefully be fixed in a next version, but till then, you can't run Tetris on a grayscale Nspire. Sorry!
Lol said bug is my fault actually since matref copied my timer driver and I left the bug in there. :P
Title: Re: [WIP] Unnamed Tetris clone
Post by: Hayleia on November 19, 2014, 05:09:27 pm
n2DLib library by matrefeytontias
Still thinking that lib is from matref, eh ?
Ok, he's the one who wrote the most interesting parts and probably most code too, and is probably the only one to still be working on it, but he was the third one to join the "team".
And Ok, saying "n2Dlib by Hayleia, pierrotdu18 and matref" might be a bit erroneous since I only worked on it at the very beginning (and I don't know about pierrotdu18 and about potential other contributors), but why not just say "n2Dlib" ?
Title: Re: [WIP] Unnamed Tetris clone
Post by: Sorunome on November 20, 2014, 12:47:23 am
Is this the one I saw yesterday on hcwp? If so, then it is looking sweet ^.^
Title: Re: [WIP] Unnamed Tetris clone
Post by: Streetwalrus on November 20, 2014, 05:39:25 am
Yes it's this one. We kind of started the project together, I ended up writing most of it and then aeTIos took it over since we'd kinda dropped it and he needs to sharpen his C skills. :P
Title: Re: [WIP] Unnamed Tetris clone
Post by: Sorunome on November 20, 2014, 09:36:37 am
good thing he doesn't use c# then.....you see what i did there ? :P
Title: Re: [WIP] Unnamed Tetris clone
Post by: aeTIos on November 20, 2014, 02:01:55 pm
n2DLib library by matrefeytontias
Still thinking that lib is from matref, eh ?
Ok, he's the one who wrote the most interesting parts and probably most code too, and is probably the only one to still be working on it, but he was the third one to join the "team".
And Ok, saying "n2Dlib by Hayleia, pierrotdu18 and matref" might be a bit erroneous since I only worked on it at the very beginning (and I don't know about pierrotdu18 and about potential other contributors), but why not just say "n2Dlib" ?
Welp, sorry ^^ '''' made the same silly mistake. Please don't hate me D:


Edit: I plan to add piece previewing today. Maybe I'll do a graphics overhaul tomorrow, but I can't guarantee that because I also want to add the flipped mode. I'll see what I'll do first.
Title: Re: [WIP] Unnamed Tetris clone
Post by: aeTIos on December 01, 2014, 09:31:48 am
So yeah, been very busy with school, I have a pretty important test tonight and I've been studying for it last week, so no progress. I'll try to get stuff done this week as I'm taking 2 nights off from homework :P