Page 1 of 1

Battle of Shapes

Posted: Thu Dec 22, 2016 1:46 pm
by Rado1
During experiments with ZgeNano library I created a simple game called Battle of Shapes ("bos" in short).

Player's goal is to destroy all flying shapes by "shooting" from other specially marked shapes (I call them shooters) and to keep high score. Shooting is similar to Angry Birds, dragging the shape of shooter creates a "bullet". The further you drag, the faster the bullet it. Shooters are static in lower levels, but will move in upper levels. Each successful shot gives points. Each new level gives points. If a bullet touches the same shape, points are decreased. If two bullets are touched, points are decreased. Time also decreases points slowly; maybe not so slowly - you should be fast in shooting. Shooting itself decreases points little bit. In advanced levels, more than 70, there's a lot of shapes and you can come to blind corner. For this situation you can zoom in (with MMB dragging or mouse wheel) to achieve precise aiming and also the simulation time goes slower - shapes are moving slower. You can jump to any level from 1 to 100 on the Settings page, but if you do so, the achieved score is nullified.

Shooters are usually drawn as shapes with white center or shapes in different color (red in Horror skin); bullets are usually hollow shapes. I say "usually", because the game is skinnable. I created initial 5 skins, see picture below.
scr_mix1.png
scr_mix1.png (177.26 KiB) Viewed 19801 times
Skin config file skins\skins\skins.txt is text file with the following format:

Code: Select all

"<dir name>" "<skin name>" <font size ratio> <text R> <text G> <text B> <highlighted text R> <highlighted text G> <highlighted text B>
It's recommended to place each skin definition on a separate line. RGB color items are integers 0-255. Font size ratio is also an integer in range 0-255; 255 means normal size, lower number is proportionally smaller font. Skin files are usual SVGZ (compressed SVG) files and TTF for fonts. You can add new skins or modify existing ones with vector editors supporting SVGZ; I used Inkscape. You can modify SVGZ files of a skin on the fly, just change the file and reselect the skin on the Settings page - the game will reflect it in runtime. Set of skins is not modifiable in runtime.

Download the bos v0.8 from here.

Now, it is a very simple game, but I have an idea of adding more mini-games to it. Any comments and ideas for further improvements and additions (e.g., additional mini-games) are welcome. Thanks.

Have fun!

Re: Battle of Shapes

Posted: Fri Dec 23, 2016 1:54 pm
by VilleK
Hi Rado1, I had a quick go at this between Christmas preparations, and it works great here! The skins are cool and the lib really paints smooth graphics. Nice job!

Re: Battle of Shapes

Posted: Fri Dec 23, 2016 5:45 pm
by Rado1
Thanks Ville.

Here's a short gameplay video:

[youtube]youtube.com/watch?v=Ap_HeHfaqJc[/youtube]

Re: Battle of Shapes

Posted: Mon Jan 09, 2017 3:18 pm
by Rado1
Version 0.9 with 2 different games having independent levels but sharing one score is available here.

The game "Slingshot" is what you could see previously. New game "Selection" is slightly different - you must click on an object to become "shooter" producing "bullets". Think twice which one to select before ending a level to eliminate all free shapes. If you want to maximize score, it's recommended to combine playing levels from both games. Enjoy!

BTW if you have some ideas of new games with existing shapes, just tell me. I'll consider to add them.

Re: Battle of Shapes

Posted: Wed Jan 11, 2017 11:54 am
by Imerion
Cool! Looks very smooth - the library seems to be working fine!