SFML community forums
General => SFML projects => Topic started by: Tank on July 03, 2008, 11:34:13 am
-
Hello,
I've written a small Tetris clone called "Tanktris" for university using SFML, which is indeed a very great library.
The game texts are in German, but I think the most things are self-explanatory. To start a new game in the menu, choose "Neues Spiel".
All sound effects and musics are CC-licensed, the graphics were done by a good friend of mine. It took me about 20 hours to finish the game.
I hope you like the game, feedback is always appreciated.
- SFML wiki page (http://sfml-dev.org/wiki/en/projects/tanktris)
-
Impressive! I never knew 20hrs of work could result in something like this :)
And it works very well, too ^^
Great for v1.0, congratz and thank you!
Only thing I'd like to be added is a Volume-Control and a key that drops a block immediately *gg*
P.S.: How about a tutorial? ;)
-
Thank you very much for your feedback.
Well, I hope I'm right with 20 hrs -- don't blame me if I needed more. ;)
Yes, I originally had the idea of providing at least a volume control for the music (to turn it off for example, if it's getting annoying after a while), and I'm still unhappy with the fact, that there's still the disabled "Options" menu entry. So I guess it's more a version 1.0 RC than final 1.0.
Your idea for dropping the blocks immediately by pressing a key is now on my Todo list, thanks for that. I think that'll speed up the gameplay a lot.
What do you mean by a tutorial? Describing how to write a Tetris-like game with SFML? I kinda thought about this some days before by myself, since I'm so thankful that Laurent wrote such a great library, that I want to give something back to him and of course to the community in general.
But I got a better idea. ;) I have started to develop a library called "SFMLGame", which will provide useful mechanisms for programming games, like I used them in my Tetris game. This library will be built on top of SFML. When getting to a usable state of development, I hope to make Tanktris available as some kind of tutorial project for SFMLGame. My primary plans for SFMLGame are to provide the developer with common classes like menus, automated animations, config/savegame loaders and writers etc. But this is still heavily in the pipeline and needs a lot of time and work to accomplish.
Oops, a lot of "Blah blah" in my posting not really thread-related. ;) Again, thanks for your motivating and constructive feedback. I thing I'll implement both of your ideas.
Greets
-
Wow, very good job, I'm impressed :)
If you want you can add it to the Projects category on the wiki, so that binaries and sources will be available to other people.
-
Thank you. :) I've added it to the wiki (http://www.sfml-dev.org/wiki/en/projects) and hope, that the "long form" is okay.
-
Nice game, the blocks are really starting to fall quickly after a while, I thought I had everything under control and then 1 minute later "Game Over" :D
-
Thank you. :) I've added it to the wiki (http://www.sfml-dev.org/wiki/en/projects) and hope, that the "long form" is okay.
It's ok, but you should have created a new page; the Projects page is just the index ;)
I did it for you.
-
What do you mean by a tutorial? Describing how to write a Tetris-like game with SFML?
exactly :)
But I got a better idea. ;) I have started to develop a library called "SFMLGame", which will provide useful mechanisms for programming games, like I used them in my Tetris game.
But that sound's great, as well :D
However, it'd be kind of "teaching", having a tutorial that explains the steps in building a Tetris-like game "from bottom to top" using SFML rather than providing another library on top of SFML (which is a good idea nevertheless, in my oppinion!)
Well, back2topic ^^
I just realized the speed in TankTris is increasing by time rather than by cleared lines. Interesting new concept for a Tetris, indeed!
-
Nice game, the blocks are really starting to fall quickly after a while, I thought I had everything under control and then 1 minute later "Game Over" :D
Hehe. Do you think the difficulty is too high? I did some balancing before and decided to make Tanktris a "quick game". This of course results in fast game overs.
@Laurent:
Thanks for moving the Wiki article.
I just realized the speed in TankTris is increasing by time rather than by cleared lines. Interesting new concept for a Tetris, indeed!
Yes exactly. ;) My plan was to make the game more "hectic", so I chose to do level-ups depending on time, instead of score/lines. So a good strategy is to build a huge "tower" in the first levels and throw in the line blocks (4x1) in higher levels, because you get a lot more points then. Anybody broke my highscore of 126000, yet? ;)
-
Nice game, the blocks are really starting to fall quickly after a while, I thought I had everything under control and then 1 minute later "Game Over" :D
Hehe. Do you think the difficulty is too high? I did some balancing before and decided to make Tanktris a "quick game". This of course results in fast game overs.
No I think it's good the way it is, I just wasn't ready for it, next time I am.
-
Anybody broke my highscore of 126000, yet? ;)
Just got 134800 :D
-
Beat this one:
Highscore (http://pitload.org/file/1212)
To be honest: I'm playing with the implemented "drop block" feature, which makes getting points a lot faster. :)
-
lolz..."cheated" out by developer ;)
But yes, I imagined this new feature to make making points faster *g*
...Operation gelungen, Patient tot ;) (sry, don't know an english expression for that)
-
lolz..."cheated" out by developer ;)
There's a reason I always have the top score for my games :D
-
There is my highscore (http://mindiell.free.fr/perso/highscore.gif)
And I did not use a "drop block" feature... I just played... with an hex editor :oops:
Therefore, your game is very sympathic :)
-
lolz..."cheated" out by developer ;)
But yes, I imagined this new feature to make making points faster *g*
...Operation gelungen, Patient tot ;) (sry, don't know an english expression for that)
I never cheat, like Mindiell. ;) I was just able to keep a fair amount of time at level 12, had a big tower and two 4-liners. ;)
@dabo:
Absolutely true! If you want to become a master at a game, program it yourself. ;)
-
the dl link seems to be down
-
True...
-
I'm sorry, I've accidently deleted the files from my server. I uploaded the new release candidate, namely 1.0RC2. Included are a pause feature, instant drop[tm] and rotating blocks counter-clockwise. Also some changes have been made in gameplay, mostly the delays between dropping and getting new blocks.
Be sure to take a look at the included README file to find out about the controls.
Download
Tanktris 1.0RC2 Win32 (http://boxbox.org/~stefan/pub/tanktris-1.0rc2-win32.exe) (12.6 MB)
The link in the initial post has also been corrected. Included in the self-extracing archive are the SFML 1.3 runtime libraries together with the OpenAL runtime libraries setup program. Hopefully this works on mostly every system without the need for other libraries.
The Options menu has been dropped, since I'm currently working on the SFMLGame lib to get some more generic menu functionality. Up to then, there'll be no in-game menu for configuring controls etc.
-
Just got 73500, looks like I need to practise :)
EDIT: 112800 is my best now :)
Is the "block dropping"-speed based on score or time?
-
112800 is very good, I'll check mine when I'm at home and post it. ;)
The falling speed changes at each level.
-
Since the game is nearly (except options & key configuration) complete, and I'm not planning to do any more coding on it, I've finally released the sourcecode. I've also packed a Linux binary archive.
Visit the Tanktris Wiki page (http://www.sfml-dev.org/wiki/en/projects/tanktris) for downloads.
-
I'm gonna check it out.
-
It would be very nice if someone using Linux Debian (or derivates, like Ubuntu) and the SFML libraries from the repositories could compile from the sources and try to start a new game.
Someone's experiencing problems with a floating point error when choosing New Game.
-
This someone is right:
Floating point exception
This might help you to fix the problem:
==10696== Process terminating with default action of signal 8 (SIGFPE)
==10696== Integer divide by zero at address 0x63655045
==10696== at 0x4040FA7: sf::Randomizer::Random(int, int) (in /usr/lib/libsfml-system.so.1.3)
==10696== by 0x805F4D0: MoverProvider::applyRandomTemplate(Mover&) (moverprovider.cc:77)
==10696== by 0x8056CB2: InGame::createNext() (ingame.cc:402)
==10696== by 0x8058E99: InGame::onEnter() (ingame.cc:249)
==10696== by 0x8061CC0: Tetris::setState(State*) (tetris.cc:119)
==10696== by 0x8061EFB: Tetris::startGameState() (tetris.cc:143)
==10696== by 0x80624FE: Tetris::run() (tetris.cc:73)
==10696== by 0x805B146: main (main.cc:7)
-
Also there is no offical 1.3 in any current Ubuntu Repos (as Intrepix was frozen too early) there are the exact packages that will enter Ubuntu from the debian side after 8.10 is out on my launchpad ppa:
deb http://ppa.launchpad.net/christoph-egger/ubuntu hardy main
deb-src http://ppa.launchpad.net/christoph-egger/ubuntu hardy main
https://launchpad.net/~christoph-egger/+archive
@Avecy:
This someone is me ;)
Are you debian? Debian SFML or selfmade?
-
Are you debian? Debian SFML or selfmade?
Ubuntu, SFML is compiled from the repository.
-
That's really strange. I've just compiled SFML myself (when 1.3 was released, there were no Debian package) and it builds fine (I hope it still does, I've done a system upgrade some days before (Debian Lenny) and did not recompile since then).
To be honest I can't see any reason why there should be a floating point exception. The game crashes when using Random() -- with integers. Also, up to the point where it crashes, no "serious" floating point operations take place. I'm just wondering what causes that exception.
Also it crashes in the initialization part of the game. Everything gets loaded in InGame:onEnter(), then this method calls InGame::createNext() to create the next block -- which utilizes applyRandomTemplate() to get a random block type with random graphics, using sf::Randomizer::Random. I really can't see anything from up to that point.
I'll be at home tomorrow and will recompile the whole code under my Debian Lenny, which got updated the last days. If I'll get that exception too, I highly suggest that there's something wrong with other libraries (after some googling, I found out that newer versions of the libc6 are making trouble; but also ATI graphics cards seem to not work together with some programs under special circumstances)
What graphics card do you have, Avency? And thanks for your bug report.
-
Bah, okay, I should open my eyes a bit more:
Integer divide by zero at address 0x63655045
I think this is something to be able to start with. :)
-
Alright, before uploading packages, they should really be double-checked.. The problem was that the "data" directory was missing in both the Linux and sourcecode archive.
I'm sorry for the inconveniences and thanks again for the bug reports. I hope everyting's working now, the archives have been re-uploaded.
Edit: Laurent, would it be a good idea to implement division by zero checks for Random()?
-
Works great!
-
Edit: Laurent, would it be a good idea to implement division by zero checks for Random()?
And then return what ?
In my opinion, getting a system exception is more obvious than a possible incorrect value, for the programer to fix his error.
-
Works great!
Great. :)
Laurent:
You're obviously right. I didn't thought about that a C++ exception is thrown. Nevermind. :)
-
It's not a C++ exception, it's a system interruption (unless you've turned on a compiler specific option to convert it to a C++ exception).