Welcome!

Hey, I'm Skylar, a kid aspiring to become a competent programmer. This blog is here to detail my dabbles in development.

My dream is to one day become a professional programmer and do some game development in my spare time.

Thanks for visiting my blog, and I hope you'll come back!

Pages

Another Long, Unannounced Hiatus?

Yeah, I seem to do this a lot. I get really excited and dive into programming something. Then I start hitting a few road blocks, then life picks up and I get busy, and soon programming gets quite left in the dust. It's Summer now for me, and while my schedule is still a bit hectic, I have actually been getting work done. Nothing visible, yet, but I'll talk about what I've gotten done so far, and what my plans are next.


I've been working on a component entity system. With some help from GyroVorbis, I've actually laid out quite a flexible system. Considering that I used many of the ideas from Component Entity System discussions on the Elysian Shadows forum, I imagine mine may resemble the ES team's system, except much less elegant.

So basically, every Entity is simple a collection of Components and Behaviors. A Component is more or less a package of data, which have functions that a corresponding system calls in order to update it.

So as of right now, I have an EventSystem, which handles passing corresponding SFML events to EventComponents (Will be used for GUIs for the most part).

I have a PhysicsSystem, which manages RigidBodyComponents and CollisionComponents.
I have a RenderSystem which manages RenderComponents.

As for RenderComponents, there are 3 different types: Sprite, Shape, and Text. Since each of those respective SFML objects is based off of the SFML Drawable class, it's quite simple :).

RigidBodyComponents are responsible for managing movement. As for now, the motion is as complete as I want it: acceleration, velocity, and a damper used as friction.

CollisionComponents just hold the bounding box for the entity, and are used in collision checks.

Lastly, I have a BehaviorSystem which manages Behaviors. Behaviors have an update function, and as such can do certain tasks every loop, although they can also respond to triggers. I currently have 4 triggers programmed in: OnCreate, OnDestroy, OnMove, and OnCollide. When any of these events occurs, the TriggerSystem is called which in turn calls any system that needs to know about the event. This is NOT a dynamic trigger system. The events are hard-coded. The events are going to depend on the TYPE of game I make, not necessarily the game itself, so a full fledged dynamic trigger system isn't required.


I'm moving toward making a simple game with this structure. Once I finish making a simple game, I'm going back to the drawing board to find the things I do and don't like about the component entity system, and make changes. Then go back and fix it, and prepare it to make another game. This way I'll get it to go through a few iterations before I use it to make an RPG in the future :).


So the next task on my list is to code in a system for creating entities. I'm going to make entity templates (not as in C++ templates), so that I can store the information for a certain type of entity in code. Later, I'll add dynamic entity creation from file, so that data will be read from a file, then stored in a template.

Well, that's all for now. Once I have this next item on my to do list done, I'll actually begin programming the game. It's going to be a simple game, just to test the system and see what works and doesn't work.

Hopefully I can have a video up soon :)