Latest Tweets

Programming for Kids: a trivial Explossion sample using graphics_in_fpg() addition

The old way of doing so

In case we store different FPG files for our game project, each of them focussed on one concrete goal, we do need something like the graphics_in_fpg() function. In the early years, when using DIV language, the only way to reproduce the effect of an explosion was coding something like this:

Coding an explosion animation using FROM graph code aid.

So, we had to know the start and end graph code inside the FPG to be sure our explosion effect would not be make-believe. But, if you prefer to keep a FPG file for the explosion effect, another one for, let’s say, a human-being based movements, and so on, it is quite uncomfortable to be coding like this.

The new way of doing so

Below, a trivial code sample showing how we can use the graphics_in_fpg() to show an explosion without knowing the total amount of graphics inside the loaded FPG file, but still assuming the first one is gonna be id=1, obviously!

Replacing FROM graph code aid in order to use graphics_in_fpg() language addition.

Some screen-shot about this code sample:

Rendering an explosion animation thanks to graphics_in_fpg() aid

Finally, there’s a video available HERE: explosion_animation.