Tetroid (Free)

Community Forums/Showcase/Tetroid (Free)

Grey Alien(Posted 2005) [#1]
OK I have finished a quick Blitz Plus game which may seem familiar ...



It's free and you can download it here:
http://www.jbcomputersolutions.com/tetroid.shtml

The cheesy music is original too.

Let me know what you think.
Thanks


VIP3R(Posted 2005) [#2]
Nice little tetris clone, good work :)

It needs a windowed mode though ;)


Grey Alien(Posted 2005) [#3]
windowed mode is on my to do.


Orgull(Posted 2005) [#4]
Very nice...

Music is interesting too, what software did you use to create it?


Grey Alien(Posted 2005) [#5]
Orgull: Thanks, even though it is a basic concept I wanted it to have a professional and polished feel including the sound effects and music. I made the music in Fasttracker 2.08 for DOS, some of the tracks are years old. Fasttracker no longer works on my XP PC with a Creative Audigy2 so I have upgraded to MadTracker (which can emulate FastTracker) but I haven't used it properly yet. I used to use the Amiga to write modules years ago, it was great at the time but only 4 channels of 8 bit sound!


xlsior(Posted 2005) [#6]
Looks nice, good music... but (there's always a but ;-)
It feels 'wrong'. I think mostly because of the following:

1) Your blocks don't appear to rotate along the standard tetris conventions -- for example, the L shaped blocks normally align the long side around the edge of an imaginary 3x3 square, while yours puts the long side in the center of this square in certain positions. This adds some 'wobble', and unexpected block positioning when you're rotating it.

I'm not entirely sure if that is everything or if they also rotate in an opposite direction of 'normal'. I several of the Tetris clones I've used in the past allow you to specify the direction the block can rotate in, which may be a feature you want to look in to.

Lastly, the 'drop the block fast' feature seems to be a lot slower than I personally prefer it to be... For smoother gameplay I think it could easily go 3-4 times the current speed for that feature.

Don't get me wrong, it's a nice little game -- but a couple of fairly small improvements could make it much more addictive to play.


Grey Alien(Posted 2005) [#7]
xlsior: thanks. I had considered a rotate both ways and I checked out about 20 tetris clones after I made mine. Originally my L did rotate around a 3x3 grid but I checked the C64 version of Tetris (one of the originals) and realised that the shape rotated around a 3x2 grid (which looked weird) and because it was the standard, I went with that. Also originally my "S" shape rotated around a 3x3 grid but this was naff as it could have 4 positions instead of the standard 2 (same with the 4 block bar actually). I noticed that a lot of clones had failed to spot this. Maybe the drop speed could be set in the .ini file. I didn't want an instant drop as that normally pees me off if I hit it by mistake. To be honest, I probably won't make any more changes now as it was just a little exercise for me to see how long it would take. It took 6 days (including a weekend) alongside a regular job and looking after kids etc. Oh yeah, that includes making a mini web page to release it on.


WolRon(Posted 2005) [#8]
My tetris clone (on my programming tutorial) follows the 'official' tetris rules in Tetris Worlds where some of the shapes actually have 4 rotated positions. They are actually rotating on a 4x4 grid.

Note, that I only say the 'official' ones, because the Tetris Worlds game is endorsed by the actual creator of Tetris (Alexey Pajitnov). Whether or not some, or none of the 'original' Tetris games used the 4x4 rotation method, I don't know.

My tetris clone actually took me a considerable amount of time as well, much more than I thought it would have. I don't remember the actual amount of 'days' that it took though. However, a lot of that time was writing and rewriting it to make the source code more understandable as a learning tool.

If I really wanted to make a tetris game as fast as possible, I think I could do it in an hour (depending on how graphical/accurate it is...). It's a little more complex than one at first thinks...


Grey Alien(Posted 2005) [#9]
Wolron: I notice in your example you define the rotated shape with data at all 4 angles. What I did was make a single shape and then made a rotation function. Originally this rotated around a 4x4 or 3x3 grid depending on the shape size, but although logical, this didn't play like the C64 version, which I was using as a benchmark. So it now rotates non square shapes (e.g. 2x3) which wasn't as easy and the bar rotates from the 2nd block along it which means its coordinates need to be offset.

btw, did you like my clone?


WolRon(Posted 2005) [#10]
btw, did you like my clone?
Well, since you asked:

- I liked the user interface. Very polished.
- I didn't like the way your pieces rotated. They don't seem to follow the 'official' piece rotations* and so just didn't feel right (at least to me).
*This is why my clone uses data statements to represent each of the pieces rotations, because some (like the bar) rotate around a 4x4 grid, and some (like the T) rotate around a 3x3 grid, and some others (like the S's) just flip back and forth.
- The music was good.
- I noticed that the backdrop changed when you leveled up. Very nice effect.
- I noticed some flicker when the pieces dropped quickly. Perhaps you aren't syncing to the vsync very well?
- I also noticed that when the pieces drop quickly, they didn't drop very smoothly (timewise). Your frame-limiting code (if any) must not be doing a very good job.
- If I wanted to split hairs, I would say that your pieces should not be randomly colored (each piece should have it's own color). This is actually important in some variations of Tetris (like Sticky-Tetris).
- I liked some of the new piece shapes offered in the Enhanced version. They reminded me of some of the ones I made in one of my own Tetris clones I made back when I was an early teen...


Grey Alien(Posted 2005) [#11]
Wolron thanks (some positive stuff sounds good!):

- Maybe the rotation is a personal preference thing. Tetris worlds obviously does it differently from the original home computer versions which you are not used to. I found a computer science paper on the web that analysed the rotation in the same way that I am doing it, so for now, I'm sticking with it. I found it interesting that your example used a long 16 part data statement. I too used a 4x4 grid but declared it like this so I could see the actual shape:
Data 1,1,1,0
Data 0,1,0,0
Data 0,0,0,0
Data 0,0,0,0

- The flicker is odd as I am using plain old flip, there is an option in the ini file to use flip false as well.
- My frame limiting code is not syncronised with VSync otherwise the game would run at different speeds on different PCs (which I'm sure you know). Instead it runs at a 200 frames per sec game loop and outputs a vsync frame when it feels like using some code Anthony Flack posted a long time ago.
- I think the issue is that because the blocks move by 16 pixels, to look smooth it would HAVE to be in sync with Vsync, which we all know you shouldn't do on PCs (bummer, bring back the Amiga). Thus the blocks stay on one position fractionally more than another. Having said all that it looks fine on my PC (3.2GHz), maybe your PC is actually skipping frames, is it fast (I know it shouldn't have to be to play tetris)?
- I actually considered having all the shapes the same colour, but I checked the C64 version (again) and noted they were random so...
- Actually I'm about to release a V1.1 with a few tweaks such as windowed mode and making sure that the big shapes in enhanced mode don't appear so often. Maybe you can help by checking out my recent topic about Windowed mode in the BlitzPlus programming section.
- Do you have a favourite piece of frame limiting code? I'll just go and check your programming tuorial. [EDIT] Ok, a delta time thing, fine. [/EDIT]
- Thanks for testing it.


WolRon(Posted 2005) [#12]
- Do you have a favourite piece of frame limiting code? I'll just go and check your programming tuorial.

I do, and it's on my tutorial site, but since my Tetris clone is intended to be simplified for learning purposes, the example Tetris code isn't using it.

Nonetheless, in the fashion that I wrote my version, it still appears to drop smoothly on my system even though it's vsync'ed...


Grey Alien(Posted 2005) [#13]
Wolron: Cracked it. The fast downwards flicker wasn't anything to do with the frame timing code (luckily) it was simply that the block was still dropping naturally at the same time as when you held the down key. Every so often this resulted in a double jump which looked bad. Sorted it now. Thanks for making me look at it.