Freeplaytech Forum

Full Version: Tetris?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Has anyone made a Tetris clone for the NGPC? It seems like an obvious thing to want to port to the system.
(04-29-2015, 11:21 PM)wiegraf Wrote: [ -> ]Has anyone made a Tetris clone for the NGPC? It seems like an obvious thing to want to port to the system.

I did, though controls ain't really good...

you can find it here : http://www.planetemu.net/rom/snk-neo-geo...leipnir-pd
(04-30-2015, 05:11 PM)Loïc Wrote: [ -> ]
(04-29-2015, 11:21 PM)wiegraf Wrote: [ -> ]Has anyone made a Tetris clone for the NGPC? It seems like an obvious thing to want to port to the system.

I did, though controls ain't really good...

you can find it here : http://www.planetemu.net/rom/snk-neo-geo...leipnir-pd

I'll check it out once my flash cart arrives! What was the biggest obstacle you ran into in terms of trying to refine the controls?
(04-30-2015, 05:17 PM)wiegraf Wrote: [ -> ]I'll check it out once my flash cart arrives! What was the biggest obstacle you ran into in terms of trying to refine the controls?

I didn't really tried to refine them ^^
I should have reworked the main loop, changing the way I handle the falling speed, and cleaning code, but... that was long ago...

I did this port mostly to see if the ngpc could handle background animation during play, and wel... because a tetris game was missing too !
(04-30-2015, 05:39 PM)Loïc Wrote: [ -> ]
(04-30-2015, 05:17 PM)wiegraf Wrote: [ -> ]I'll check it out once my flash cart arrives! What was the biggest obstacle you ran into in terms of trying to refine the controls?

I didn't really tried to refine them ^^
I should have reworked the main loop, changing the way I handle the falling speed, and cleaning code, but... that was long ago...

I did this port mostly to see if the ngpc could handle background animation during play, and wel... because a tetris game was missing too !

Any chance of putting the code up on Github? I'd be interested to see how you implemented the game on the NGPC.
(04-30-2015, 05:42 PM)wiegraf Wrote: [ -> ]Any chance of putting the code up on Github? I'd be interested to see how you implemented the game on the NGPC.

I'll see what can be done, I could also mail them.
.
It's assembly only.

The playfield is represented by a bit table (each line is a word), collision detection is done for each line of a filling block using a logical and function. If result is not zero, then pieces collides, so the move cannot be done.

The main issue is the way I handle falling speed.
When I started the developpement, I had no idea of the maximum falling speed I could achieve using vsync, the result was too slow to provide challenge, so I used a lazy way... Slower speed are achieved by waiting for 1 or more vsync, as fastest speed is achieved by moving a block 2 pixels downward instead of only one.
(04-30-2015, 06:00 PM)Loïc Wrote: [ -> ]
(04-30-2015, 05:42 PM)wiegraf Wrote: [ -> ]Any chance of putting the code up on Github? I'd be interested to see how you implemented the game on the NGPC.

I'll see what can be done, I could also mail them.
.
It's assembly only.

The playfield is represented by a bit table (each line is a word), collision detection is done for each line of a filling block using a logical and function. If result is not zero, then pieces collides, so the move cannot be done.

The main issue is the way I handle falling speed.
When I started the developpement, I had no idea of the maximum falling speed I could achieve using vsync, the result was too slow to provide challenge, so I used a lazy way... Slower speed are achieved by waiting for 1 or more vsync, as fastest speed is achieved by moving a block 2 pixels downward instead of only one.

I see! That's quite interesting. Well, I'm afraid assembly coding is far beyond me so I wouldn't be able to do much with it anyways. I really only have experience with much higher level languages like Javascript, Python, Haskell, and Scala.
(04-30-2015, 06:03 PM)wiegraf Wrote: [ -> ]I see! That's quite interesting. Well, I'm afraid assembly coding is far beyond me so I wouldn't be able to do much with it anyways. I really only have experience with much higher level languages like Javascript, Python, Haskell, and Scala.

NGPC homebrew are mostly C or Assembly.
(04-30-2015, 06:33 PM)Loïc Wrote: [ -> ]
(04-30-2015, 06:03 PM)wiegraf Wrote: [ -> ]I see! That's quite interesting. Well, I'm afraid assembly coding is far beyond me so I wouldn't be able to do much with it anyways. I really only have experience with much higher level languages like Javascript, Python, Haskell, and Scala.

NGPC homebrew are mostly C or Assembly.

I actually have done a little bit of C programming in the past, so I was thinking I could maybe jump into that. What is the advantage of going with assembly instead? Is it simply faster at runtime, or is dealing with compilation for the NGPC a hassle that makes going with assembly more convenient?
(04-30-2015, 10:44 PM)wiegraf Wrote: [ -> ]I actually have done a little bit of C programming in the past, so I was thinking I could maybe jump into that. What is the advantage of going with assembly instead? Is it simply faster at runtime, or is dealing with compilation for the NGPC a hassle that makes going with assembly more convenient?

When I got my Bung flash unit, I was only aware of a free assembly cross compiler that produced TLCS-900/H, that's why I picked assembly.

I know there's a C compiler, but I never tried to use it.

Moreover, I thought Assembly to be more instructive regarding hardware functions.
Pages: 1 2