Sunday, 28 May 2017

Game Engine 28/05/17 - Part 1

I didn't upload messages to this blog for a long time because what i was making wasn't really visible.

Now I have made a lot of progress and I'm planning to start working on game logic in a week or two.

Here is what i've already done:

  • Messaging System:
    • MessageBus - Handles messages and sends them to the message listeners
    • MessageListener - Receives messages to MessageBus. Can also send messages to other listeners through MessageBus.
    • Message - Has a void smart pointer pointing to its data and also has a type. MessageListener's can subscribe to certain types of messages.
  • Resource System:
    • ResourceManager -> MessageListener - Stores resources and sends them as needed. A resource can be requested through messages.
    • Resource - Used to store data about many things such as Model's, ShaderProgram's, etc. Also used as an interface to load the data.
    • Multiple derivatives of Resource (ModelResource, ShaderResource, etc.).
    • ResourceRequest - Serves as an interface to sending messages and requesting resources, making it much easier.
    • FileManager - Platform independent class to read resource file tree and load files.
  • Graphics System:
    • Graphics - Handles Renderer's and everything relatable to graphics
    • Renderable - Anything that can be rendered unto screen (pure virtual class).
    • Renderer -> Component - Used to draw a Renderable (BTW Renderer's have layers, such as the Transparent layer, the Default layer, etc.).
    • Window - I'm using the SFML library for handling windows, UI, networking and other utils. If you haven't checked it out, you should, it's really useful for small projects.
    • I also have derivatives of Renderer (ModelRenderer, etc.).
    • That's it for now. I'm planning to add AO (Ambient Occlusion) in some time.
  • Scene System:
    • Scene - Handles GameObject's and Component's. Also updates Behaviour's.
    • GameObject - A bunch of Component's tied together with a Transform and a parent GameObject. Also serves as a mini MessageBus for components.
    • Transform - Specifies a transform for anything (Translation + Rotation + Scale).
    • Component - Basically every functionality of the Engine uses this. Basically, it's just a piece of code to be executed by some System (for example, Renderer -> Graphics).
    • Behaviour -> Component - Everything that is related to game logic derives from these. They are updated by Scene.
I also have made a basic Physics and Collisions systems, which I will write about in the next part.

Feel free to write suggestions in the comments or ask questions. You can also send an email to riscado.antunes@gmail.com if you want to ask anything.

1 comment:

  1. "I didn't upload messages to this blog for a long time because what i was making wasn't really visible." - Doesn't show anything. .-.

    ReplyDelete