Kind of Shoot’em Up for testing Entity / Component data driven system


After learn the basics of Unity3D development I wondered how to port this idea to a raw code. Yes, I know that a component system is not a Unity idea but I never used it before.

I developed a simple shoot’em up using c++ and OpenGL in order to learn about a basic component system. Most of the “game” can be configured without coding anything. Just editing some configuration files. I have a file for level order, file for each level settings like timeline, enemies to spawn… I have another file for each entity where you can add or remove components and some additional stuff. About component itself I only added some simple functionality like colliders, animation, simple movement, spline movement … septes2 An example of these files (simple enemy configuration) :

<Entity ID="Enemy01" Type="Dynamic">
 <Component Type="CmpAnimation" img="data/img/playermov.png" hframes="28" vframes="1" ScaleY="-1">
 <anim Type="idle" ini="6" end="7" default="1" />
 <anim Type="leftmov" ini="0" end="5" oneshoot="1" reverse="1"/>
 <anim Type="rightmov" ini="8" end="13" oneshoot="1" reverse="1" />
 <anim Type="end" ini="14" end="25" />

 <Component Type="CmpSplineMov" loop="1" slowness="5">
 <point x="1050" y="100" />
 <point x="800" y="200" />
 <point x="400" y="100" />
 <point x="200" y="400" />
 <point x="-50" y="100" />

 <Component Type="CmpFaction" faction="Enemy" />

 <Component Type="CmpLife" value="4" />

 <Component Type="CmpDamageDealer" value="1" />

 <Component Type="CmpCollider" >
 <factionToCol faction="Player"/>


it was very fun doing this 🙂

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s