SFML community forums

General => SFML projects => Topic started by: Arcade on January 13, 2015, 08:24:46 am

Title: Native Blocks - Finished!
Post by: Arcade on January 13, 2015, 08:24:46 am
Hello everyone

I recently started working on my first game, and I think I've gotten it to a point where I can demo my progress so far! I'm not very creative with coming up with a good name, so I'm just calling it Native Blocks. It was inspired by the Puyo Puyo series of games, specifically the Sega Genesis game called "Dr. Robotnik's Mean Bean Machine". For those who aren't familiar with those games, the premise is that you have a playing area where blocks fall, similar to the style of Tetris, but only 2 blocks at a time. You try to make 4 blocks of the same color touch each other to make them disappear. This is a 2 player competitive game, so when you make blocks disappear, there is a good chance of a garbage grey block falling on the other player's side. The only way to get rid of the grey blocks on your side is by making a match that touches it. If you make a chain of more than 4 blocks then a larger number of grey blocks will fall on your opponent. If you make a combo, such that one chain disappearing causes the blocks to fall and make another chain disappear, it multiplies how many grey blocks get sent to your opponent.

Hopefully all of that made sense. Here is a video demoing it. Note that my screen capturing software makes the frame rate look worse than it really is:
http://www.youtube.com/watch?v=Xk2z2yu0WaM

I currently have 3 AIs implemented (easy, medium, and hard). You can either play against one of the AIs or you can simply watch the AIs play against each other, which is shown in the video. There are a lot more things I want to implement eventually, assuming I don't lose my motivation and move on to another project  :P.

Anyways hope you guys like it. Let me know what you think!
Title: Re: [WIP] Native Blocks
Post by: eXpl0it3r on January 13, 2015, 10:21:08 am
This looks quite cool! :)

I wonder though, the Medium AI seems quite strong already, can it be still be beaten? ;D
Title: Re: [WIP] Native Blocks
Post by: Hapax on January 13, 2015, 02:35:18 pm
This looks like a lot of fun!

I do wonder, though, if the slow-down that occurs when the blocks split apart is intentional. It seems like it may distract slightly. Might just be me though ;D
Title: Re: [WIP] Native Blocks
Post by: Arcade on January 13, 2015, 04:59:32 pm
This looks quite cool! :)

I wonder though, the Medium AI seems quite strong already, can it be still be beaten? ;D
Thanks! Heh to be honest, even the Easy AI is a bit too hard. I've played the game tons of times while testing and I can only beat Easy every now and then. I plan on adding several more AI personalities, so I'll be sure make a least a few on the low end of the difficulty spectrum.

I do wonder, though, if the slow-down that occurs when the blocks split apart is intentional. It seems like it may distract slightly. Might just be me though ;D
Thanks for the feedback! It actually is an intentional delay. It kind of felt weird to me without it, probably because the game I modeled this after also has that delay and I'm used to it. I plan on eventually making the blocks have a crumbling animation instead of simply disappearing, so maybe the delay due to the crumbling block animation will feel less distracting.

Edit: I originally thought Hapax was talking about when the blocks disappear, but I realized he might have been talking about when the blocks split due to one block falling further than the other. That is also intentional for similar reasons. It is due to the block transitioning from player control to gravity controlled.
Title: Re: [WIP] Native Blocks
Post by: Hapax on January 15, 2015, 12:46:43 am
[Hapax] might have been talking about when the blocks split due to one block falling further than the other. That is also intentional for similar reasons. It is due to the block transitioning from player control to gravity controlled.
This is indeed what I meant. I was thinking that maybe it would continue at the speed its already moving when its partner lands. However, if it's intentional to be this way, fair enough!  :)
Thinking about the reason it does slow down, I decided that the explanation is that is has to break away from the other block  ;D
Title: Re: [WIP] Native Blocks
Post by: Arcade on January 19, 2015, 03:25:17 am
I finally got around uploading the game to dropbox so others can try it out  :). Right now I only have a 64-bit Linux build, but my next goal is to get it compiled on Windows as well.

Anyway, You can download the 64-bit linux build from the following link: Edit: Link removed due to being out of date.

How to run
Extract the zip file and run NativeBlocks.sh within the Export folder. I don't know if this is the best way to distribute my game for now, but I included the SFML libraries inside the zip file so that computers without SFML installed can still run it. That bash script simply sets up the included library paths and then runs the game.

How to play
Right now the controls aren't configurable or explained anywhere in the game, so to navigate the menus simply use the mouse. When playing, use the arrow keys to move the blocks and 'z' or 'x' to rotate them.

I hope someone has the chance to test it out and let me know what you think  :D.  Let me know if you're able to beat any of the AIs  ;D. Also let me know if you find any obvious bugs.
Title: Re: [WIP] Native Blocks
Post by: Arcade on January 22, 2015, 07:13:01 am
Windows 64-bit build now available! Download from the following link and launch NativeBlocks.exe to play (and see previous post for how to play)
Edit: Link removed due to being out of date.

I don't often develop on Windows, but needless to say it was... quite an adventure trying to get everything set up and building. When I finally got everything installed (mingw32, make, cmake, git, and who knows what else), I went through the process of learning how to build SFML, and all of my other dependencies. Luckily I eventually figured it out and got everything to compile and link! It was a (not very) fun surprise, however, to find that ming32w doesn't implement std::random_device on windows (well it's implemented, but it doesn't seem... well... very random  >:(). Anyways, long story short, I think I got all my Windows-specific problems worked out now. I guess it was a good learning experience.

I hope someone has a chance to test it out!
Title: Re: Native Blocks Game (Download Available)
Post by: Arcade on February 26, 2015, 01:04:23 am
Sorry to keep bumping my thread, but after taking a short break I came back and made some updates. The new major additions include:

Here is a video showing some of the progress. Not a whole lot has changed visually since the last video, so it might not be super interesting, but you can at least hear the sounds and see the new Beginner AI. Note that my screen recording software shows my mouse slightly lower than where it really is, so it looks like I'm not clicking buttons when I really am.

http://youtu.be/KiGZPwR67YE

This time I didn't package up the new updates to distribute. I decided to wait and only do it if anyone is interested in trying it out, so the links I provided in previous posts are not up to date.
Title: Re: Native Blocks Game
Post by: Mario on February 27, 2015, 06:30:23 pm
Nothing wrong in bumping your own thread if there's indeed something new you're posting about. :) If it's content (and you're not doing it too often), noone will complain, just don't start doing things like "Bump!".
Title: Re: Native Blocks Game
Post by: eXpl0it3r on February 28, 2015, 11:34:35 am
It's really nice to see this project progress! :)

You might want to consider updating the first post (you can edit it), so if anyone gets to this thread the first time, they don't have to dig through the thread to find the most recent news.
And yes, as Mario said, bumping your own thread for updates it totally fine.
Title: Re: Native Blocks Game
Post by: Arcade on March 28, 2015, 07:20:23 am
I'm slowly but surely still making progress as I find the time. This time around I focused on making minor graphical improvements to try and give it a more polished look (though there is still a long ways to go). The changes include:


The video shows two Hard AIs playing against each other. You can see how good the Hard AI is at making chain reactions.

http://www.youtube.com/watch?v=H_eRqXTRTqI
Title: Re: Native Blocks Game
Post by: Arcade on April 02, 2015, 06:50:09 am
I have begun implementing a "Challenge" mode. I know I have had a Challenge button on the main menu visible in my last couple of videos, but it didn't do anything until now. The idea of the challenge mode is that you try to beat each of the AIs one by one. Eventually I would like to implement High Scores which list how many AIs you beat and how many attempts it took, but for now it is pretty basic.

The video shows what I have so far. The relevant parts of the video are at the beginning of the video where I select to play the Challenge mode, and then again at around 1:15 where I beat the first AI and it transitions me to the next.

http://www.youtube.com/watch?v=UemCY2Ppxpo
Title: Re: Native Blocks Game
Post by: Arcade on April 20, 2015, 06:24:54 am
I've begun implementing the beginnings of an options menu. Right now the major feature in the options menu is a way remap the game controls. The short video below shows me remapping the controls to use my gamepad/joystick.

http://www.youtube.com/watch?v=LcrC1-kNLDU
Title: AW: Native Blocks Game
Post by: eXpl0it3r on April 20, 2015, 11:46:11 am
Looking better and better. Keep it up! :)
Title: Re: Native Blocks Game
Post by: Arcade on May 29, 2015, 08:36:04 am
Thanks eXpl0it3r. I know this game isn't as exciting as some of the others posted on these forums, but I'm trying to stick with it and actually complete a game for once :).

I decided to try something new with the graphics this time, as shown in the picture below. I'm also in the process of giving names and pictures to the (now 10) AI players to give the game a little bit of a personality. I only wish I was a better artist. Trying to make decent looking art is taking up a lot of my time.

One other major change that I've done is make the gameplay speed increase as you go through the AIs in Challenge mode. It gets quite fast by the time you get to the last AI. Unfortunately though, the last AI being the smartest, also uses the most CPU time so it has a hard time finding someplace to go before it runs out of time to move. I'll need to either spend some time optimizing it or perhaps just make it less smart and simply rely on the fast game speed to make it a difficult opponent. I may need to do the latter anyway because I'm not sure if the last AI would even be beatable in its current form if it could think fast enough  ::)

(http://i.imgur.com/vEnHLNl.png)
Title: Re: Native Blocks Game
Post by: Arcade on June 20, 2015, 09:12:59 am
I'm back for another update. The major new features this time include:
I'm getting fairly close to a point where I can say the game is feature complete. After that I will mostly just focus on polish. Instead of posting screenshots this time I have prepared a 64-bit Linux build (https://www.dropbox.com/s/ej8nkar3uj1j4em/NativeBlocks_Linux64.zip?dl=0) if anyone cares to give it a try (I can also make a Windows build on request if there is any interest).

If you give it a try please let me know what you think  :) !
Title: Re: Native Blocks Game
Post by: AndreSparvolli on July 06, 2015, 07:32:46 am
Awesome work man! I'm a big fan of this kind of falling bricks puzzle game, and i'm very interested in trying this game! I would need a windows build to play it.

Congratulations on what you've already done and keep up the good work!  :)
Title: Re: Native Blocks Game
Post by: Arcade on July 07, 2015, 02:04:25 am
Thanks AndreSparvolli. I really like these types of games too, so I thought it would be fun to try and make one myself. With my next update I'll be sure to include a Windows build. Right now I'm ironing out a few bugs first. For example, with the last build I provided, if you beat the Challenge mode you will likely be rewarded with the game crashing due to a segfault  ;D. Luckily I think the last couple of AIs are hard enough that no one has run into that bug yet (if anyone has tried playing at all, that is).
Title: Re: Native Blocks Game
Post by: AndreSparvolli on July 26, 2015, 11:05:32 pm
Ok man, looking forward to play it!  :D
Title: Re: Native Blocks Game
Post by: Arcade on July 27, 2015, 01:40:07 am
I guess it is time for me to deliver. Here is a new Windows 32-bit build (https://www.dropbox.com/s/34679l6jve5dhso/NativeBlocks_Win32.zip?dl=0) of the game.

I first made the Windows build a few weeks ago, but for some reason the performance was pretty poor when I ran it on my computer compared to when I ran it under Linux. I was getting random FPS dips which would make the game stutter every now and then. I decided this was a good excuse to have some fun trying to optimize a few things. It still stutters a bit every now and then, but I don't think it is too noticeable or distracting. I'll have to get out a profiler and figure out when the slowdown is really coming from.

Anyway, here are the changes since my last post:
Title: Re: Native Blocks Game
Post by: Arcade on August 06, 2015, 06:25:46 am
Native Blocks is now finished  :)

I've decided it's time for me to move on to other projects. There are still tons of things I would like to do with this one, such as more animations, more game modes, perhaps add multiplayer, etc etc. I realized I'll never truly feel like the game is done. Oh well. I think I've accomplished most of the goals I made for myself in the beginning and I think at this point it has the feel of a completed game (menus, music, high scores, options, and of course the core gameplay with AIs).

 64-bit Linux build (https://www.dropbox.com/s/ej8nkar3uj1j4em/NativeBlocks_Linux64.zip?dl=0)

Sorry, no Windows build again. I hardly ever use Windows, so it is a bit inconvenient for me, though I'm sure I'll stop being lazy someday soon and get around to it. The Windows build from my last post will still be available until then. This most recent build just fixes some bugs, the worst being that the Challenge mode wouldn't let you progress to the last AI.

Anyway, this will likely be my last update except for maybe some minor maintenance if anyone finds any glaring issues with it. Even though not much has changed aesthetically since the last time I posted a picture, I decided I should post some screen shots again since it is now finished.

(http://i.imgur.com/Xgg5vCc.png)

(http://i.imgur.com/DsThP68.png)
Title: Re: Native Blocks - Finished!
Post by: eXpl0it3r on August 06, 2015, 09:11:37 am
I really hope you'll get around to a Windows build at some point as well (or let someone else build it for you). ;)

Anyways, I suggest to put it on itch.io or similar. It seems like a great little game that many more might enjoy as well.
Title: Re: Native Blocks - Finished!
Post by: SeriousITGuy on August 07, 2015, 01:35:26 pm
And congrats to call your game "Finished". The biggest feat in my opinion.
Title: Re: Native Blocks - Finished!
Post by: AndreSparvolli on August 14, 2015, 01:09:23 am
I tried the win32x build and i must say you've done a great job! The gameplay is really smooth, clean and fun graphics, i really had fun completing the challenge mode  ;D
Congratulations for finishing your project!  :D
Title: Re: Native Blocks - Finished!
Post by: Arcade on August 17, 2015, 12:38:33 am
Thanks everyone, and thanks AndreSparvolli for giving it a play through. I may take eXpl0it3r's advice and maybe try putting it up on itch.io or perhaps github if nothing else. First I want to polish up the build process and make it easier to do both Windows and Linux builds. Perhaps I'll migrate to CMake. Anyway, it will have to wait until I get some time/motivation to do so  ::)

@AndreSparvolli: The Windows build actually has a bug where the challenge mode ends one AI early  :-[. I fixed it in the latest Linux build, but haven't gotten around to updating the Windows one as well. If you want to try and beat the last AI, you can play against it in the free mode for the time being until I get around to making an updated Windows build.
Title: Re: Native Blocks - Finished!
Post by: AlexAUT on August 17, 2015, 11:31:43 am
Really nice job!

Can't you get back to menu from ingame? The only thing which annoyed me, besides from that great game.

I guess you got your idea from this game?
https://www.youtube.com/watch?v=H4DeR9uey8Q
;D Loved it back in the time



AlexAUT