See what's going on with flipcode!




 


Submitted by , posted on 19 January 2005



Image Description, by


Here are some screenshots of my particle system, along with windows from the GUI system.Those are all part of the 2D game engine I'm working on, that'll be used for a commercial online game, but is made as a separate library to prevent any commercial restrictions.

This is the emitter designer (an emitter is the object that emits the particles). It allows you to create and tweak emitters for the 2D game by setting it's parameters in realtime. It also acts as a demo of what the game engine can do. The engine is developed in DevC++, and uses SDL and OpenGL.

The particle system works like this: the emitter creates particles with random initial parameters. Every frame, newtonian physics are applied to each particle to make them move around, their age is increased, and parameters like size and color are updated as they get older. When a particle reaches it's maximum age, it dies and the emitter can make a new one. With the right settings, this allows you to create effects like fire, snow, fountains, ... You can also set a target that all particles will fly towards, which is useful for magical spells.

The GUI system is pretty complex and has tons of classes including a container that handles the mouse access for all gui elements, a window that can be dragged around, a button, a text input area, a console, a scrollbar, a grid useful for tile game map editors, etc... Everything can be skinned with textures of any size and shape. There's also a font system that can draw text with bitmap fonts.

Also included in the engine are an image loader (using SDL_image), mouse and keyboard input, timing, a texture class, color classes for different color models, etc...

I'm not releasing the source because it's not done yet.

You can download the demo here (http://www.student.kuleuven.ac.be/~m0216922/brol/emitters.zip). A manual pops up if you press the "help" button. If you don't want to read this long text and still want to see some effects, you can try some premade effects by pressing the buttons of the "Presets" window. The "R" button generates a new random effect every time you press it. The "hide windows" checkbox makes all those scrollbar windows invisible to be able to see the effect better.

A few people reported they got an OpenGL error and some had an abnormal low FPS, but for most people it worked with 100+ FPS. If the program "matlabserver.exe" is running in the background, you have to close that one because it prevents OpenGL from working.



[prev]
Image of the Day Gallery
www.flipcode.com

[next]


 


Copyright 1999-2008 (C) FLIPCODE.COM and/or the original content author(s). All rights reserved.
Please read our Terms, Conditions, and Privacy information.