This cap is an example of an elaborate mini game of skill, complete with sounds, music, persistent hiscore and more.
It started as an example for the Color Fusion (Masked) effect, but I soon thought this could become a good example for many of a beginners questions and issues. That's why every single event is explicitly commented. By looking at the cap you will learn a lot of the basics, including organizing your events in sheets and groups, using object groups for a better overview in the wizard, a lot of math, or reusing graphics. Many of Construct's objects are used.
There is just one aspect that isn't covered and that's behaviors. There's nothing wrong with them, you should use them whenever possible, they are a bit faster than events and make use of timedelta. But sometimes you will not get what you need from behaviors, and that's the moment when you should remember, that there was that wierd tulamide telling you, that almost anything can be done with events. You shouldn't be scared of doing something on your own, using events and your imagination. Therefore, many things in this cap are unnecessarily realized with events instead of behaviors, and it may sometimes feel elaborate. But it's worth following my thoughts, and if you later need to find your own solutions based on events, you might remember.
<img src="http://img443.imageshack.us/img443/5620/verve1.th.jpg%5d%5b/URL%5d%20%5bURL=http://img152.imageshack.us/i/verve2.jpg/" border="0">
Verve! features:
Layout
An animated start screen
A complex game screen with restart and hiscore table
Objects
Mouse&Keyboard
Just the basics, like checking the player controls
XAudio2
In detail. Loading files to channels, autoplaying files, fading the volume of music, setting the frequency of a channel relative to certain events, looping sounds, trigger sounds by functions.
Function
In detail. Setting up functions, calling them, calling functions while passing their parameters directly, interaction between the function object and other objects.
ID3
Just the basics. Loading ID3 tags from a file, releasing a file to be accessible for other objects and displaying ID3 tags.
Array
In detail. Creating, resizing, inserting, loading, saving, sorting(!)
Tiled Background
Just the basics. Scaling the image of a tb and reusing tb to effectively create a game layout.
Panel
In detail. Using panels as a repair indicator and for special animated effects.
Behaviors
Sine
Car
Events
*A complete "divide & conquer" sort algorithm
*Sound and music management with interaction to certain game events
*Conditional expression
*Menu handling by keys, including aborting, scrolling through the hiscore, retry and exiting the game
*User independent creation, deletion and altering of sprites to form complex shapes
*Lots of lerp, qarp, modulo, sin, cos, min, max, int, round, abs
*Accessing and altering layer effect parameters
*Including event sheets
*A workaround to stay time-based even if the time scale is set to 0.0
*A bit of math to get real world values like km/h for the speed or meter for the distance
Verve! is completely time-based (frame independent) and is therefore using timedelta almost everywhere (there are just two or three situations, where "every x milliseconds" is used instead). You will need the Color Fusion (Masked) effect, just follow the link to download and install it.
The archive contains the cap, all sounds, the music and a hiscore of some of my attempts (but not the effect, see above). You may safely delete the content of the folder "hiscore", a new hiscore will then be created.
The sounds, the music and the textures used in Verve! are free for commercial and non-commercial use, either cc or my own work (look for the ugly graphics - that's my work for sure <!-- s;) --><img src="SMILIES_PATH/icon_wink.gif" border="0" alt=";)" title="Wink"><!-- s;) --> )
Download
Verve! (game of skill example).rar