Battle of Shapes

Post screenshots, binaries and projectfiles of the projects you have made with ZGE that you want to share!

Moderator: Moderators

Post Reply
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Battle of Shapes

Post 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 18361 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!
User avatar
VilleK
Site Admin
Posts: 2274
Joined: Mon Jan 15, 2007 4:50 pm
Location: Stockholm, Sweden
Contact:

Re: Battle of Shapes

Post 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!
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Re: Battle of Shapes

Post by Rado1 »

Thanks Ville.

Here's a short gameplay video:

[youtube]youtube.com/watch?v=Ap_HeHfaqJc[/youtube]
User avatar
Rado1
Posts: 775
Joined: Wed May 05, 2010 12:16 pm

Re: Battle of Shapes

Post 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.
Imerion
Posts: 200
Joined: Sun Feb 09, 2014 4:42 pm

Re: Battle of Shapes

Post by Imerion »

Cool! Looks very smooth - the library seems to be working fine!
Post Reply