Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Crimson Game Engine DEVELOPMENT PROGRESS

A topic by quou created May 15, 2020 Views: 1,040 Replies: 13
Viewing posts 1 to 13
(2 edits) (+1)

I've begun working on a new project, a game engine which I have decided to call Crimson. I'm trying to create a 2D engine that is tailored to my preferred workflow.

What features I plan to implement

  •  Entity Component System
  • Customizable State Machine
  • Advanced 2D render pipeline
  • Particle System
  • Scripting (I haven't made a decision on what I'll use to do this yet, and I'm open to suggestions. I would very much like to write my own scripting solution, but that is probably too big a challenge for my current abilities)
  • ...And I'm very open to suggestions - what features would other developers like that would suit their workflows?

I'm going to log the progress I make here... I also have a GitHub repository for it.

 

(2 edits) (+1)

The First Sprite

The basics of the Entity Component System (ECS) is now complete and I added a very basic sprite component so I could render the engine's logo to test it.

This is just the beginning of the advanced rendering system that I plan to implement, including render layers and shaders.

The ECS that I created is similar to Unity's, so it's very easy to use. Creating an object requires just one line of code, and one more to add a sprite to it. The rest is handled automatically by the engine.

The system also provides an extremely simple way to change a component that is sitting on an object. Example:



Each component and object also has a method to destroy it, which also removes any instance of anything related to it, so as to avoid segmentation faults due to accessing deleted memory as much as possible.

Soon: Render Layers, ability to scale objects, window resizing


Check out Crimson's GitHub to view the code HERE
(2 edits)

Firstly, I updated the logo, because some people confused the C and R for an E and P. Here's the new one:

I also changed the way objects work, so you can declare one without defining it. Objects are now pointers instead of references as well. This change makes objects more robust and easier to deal with

Declaring an object:


Creating an instance of the object so it can be handled by the engine:


(2 edits) (+1)

Particle System!

I've created a very basic particle system for the engine, the second ever particle system that I've made. The other was for my game Unnamed Arena, and it was incredibly simple. This time it's a lot better, though I want to add a wind and gravity modifier to it, so that it can be used for things such as smoke and blood splatters. I also want to be able to pause and play the particle system too...

Check out the GitHub

(1 edit)

Scripting with ChaiScript

Well, it's been a week since I begun work on Crimson, and I've made some very good progress. I've started adding scripting to the engine, using ChaiScript as my preferred language. When it came to choosing a scripting language, I had two options that came to mind. The first was Python, and while I like Python, it's very easy to use and feature rich, it's also very slow, so I decided against that as well. Lua was the second option that I considered, because I've used it before and the API is very well documented. The reason I decided against Lua was that it doesn't support object oriented programming, which is something that I'd like to use if I were creating a game using a scripting language.

So that was the end of both Lua and Python for me, but I still didn't have a scripting language to use. After researching a little bit, I came across ChaiScript. It has a very easy to use API, it's fast, supports basic object oriented programming, and has similar syntax to JavaScript. I mostly had to figure things out on my own though, since there are very few tutorials, and the documentation is poor in quality at best, but I managed to set up the basics. Here's a script that moves an object around using the arrow keys:

As you can see, very simple.  I need to add more data structures to it, and then I need to sort out a basic collision system, and then I'm going to try to make a game using this engine, and use what I learn from that to add more features.

Also, I'm planning on starting a YouTube devlog series of this engine, so subscribe to me to see that: https://www.youtube.com/channel/UC6VQ0rNQInZasKiljASHjUQ


(1 edit)

Project Restart

I've decided to reset progress and rewrite Crimson again from scratch. There are so many things that I'd like to do better, and that are best done again from scratch.

Main things that I'm rewriting:

  • New scene management. The way I was doing it before was extremely primitive.
  • I'm moving away from ECS and into inheritance. I think it will suit the new scene management system and the scripting language better. (Update: I've actually decided to keep ECS. It just works a lot smoother)
(+1)

Good luck with your project! I am interested in it, and what you have so far seems cool!

(+1)

Thanks. I'll be working on a physics system soon!

Collision detection!!

Over the last couple of days, I've bee rewriting Crimson from scratch. I decided to keep using ECS after all, after doing a bit more research. I greatly improved the scene management, with object parenting and more memory efficient loading times.
Announcement: Crimson got a website: https://georgelam6.github.io/Crimson/. As Crimson gets bigger and bigger, it will become harder and harder to document. So I've decided to start early with documentation, and created this website for it.

I also got basic collision detection (AABB, circles are coming) to work.  You can now add a rectangle component to an object in the scene (XML) file:

And then you can check for collisions in the script like so (using the new findObject function, which returns a pointer to an object in the current scene based on it's name)



This is the start of the simple rigidbody physics system I plan to create (and if rolling my own doesn't work, I will probably fallback to Box2D, which is used in Unity and Cocos2D). I only plan to add support for AABBs and circles to start with, since they are simple shaped to work with, and I know absolutely nothing about how physics engines work.

My website: https://georgelam6.com
Crimson's website: https://georgelam6.github.io/Crimson/





(1 edit)

Twitter Account

I made a twitter account where I will post about progress on Crimson (mainly smaller and more random things, only the big stuff gets put here). Follow here: https://twitter.com/george_lam6

(3 edits)

The First Game!

I created the first game in Crimson! It's a very basic space game, where you have to dodge asteroids for as long as possible. There's no increasing difficulty or anything, I simply created it to test features of the engine. I need to fix quite a few bugs, such as scenes not being instanced if the instance function is called from OnInit(), and a Segmentation Fault when you try to change an object on the first frame.


Crimson gets an editor!

Hello everyone. It's been a while since my last post, I know, but I have made some very, very good progress.

Firstly, I switched frameworks from SDL to SFML. Reason being: I don't need too much control over rendering, so SFML's system works just fine, and has the added benefit of having a couple of really neat features built right in.

Second, big news! I began working on an editor for Crimson! It's still in the very early stages, but you can open and save scenes, create and delete objects, and add and remove components.


Above, you can see a simple test scene with two sprites, running completely inside the editor! You can also zoom and pan around the editor with the mouse, and the white right-angle in the corner of the crimson logo is the world origin. Next, I need to implement a way to run the game from the editor, and to display the output from the running application in the editor's output window, instead of a console.

I'm also going to rewrite Crimson's scripting solution. Right now, it's very buggy, and causes crashes for seemingly no reason. I will still be using ChaiScript, because of how easy it's API is to use.

You may also have noticed that I am now running on Windows instead of Ubuntu. I'm now using Visual Studio instead of CMake and g++. The reason for this is that I want to target Windows first, since if I were to create a game, I would want it to have support for Windows, since that is what most people like to play games on. Linux support will, of course, come later on (I am a Linux fan, so it will happen)

Thanks for reading, and subscribe to this topic to see future updates to the engine. Soon, I'll be looking for people to test my engine. If you're interested, you can send me an email: georgeashleylamb@gmail.com



Scenes & Project Management

The Crimson Editor can now save project and scene files. This took me a long time to get working (a LOT longer than it should have!), but I did it in the end. Next thing to do is rewrite Crimson's scripting solution, because of how many bugs there are at the moment.

(2 edits)

I've been fixing a lot of issues over that passed week. First, the editor would crash on exit, due to a memory leak. I fixed this by deleting the ChaiScript object before the main function exited. Another issue was that scenes wouldn't save if you didn't select them first in the Scene Settings. That is also now fixed.

With all the issues and bugs out of the way, I can start working on more interesting stuff.

What I'm going to be working on next:

  • The exporting of projects. The way games are run in Crimson at the moment, the game needs the Assets folder to sit right next to the executable. I'll be working over the next couple of days to create a system of packaging all the assets into a single file, which can be unpacked and used by the engine.
  • New components, namely:
    • Tilemap support. This is pretty much required in any good 2D game engine.
    • A new particle system, with more features than the old one.
    • Shader support. I'm not sure if this is possible using SFML (the framework I'm using to create this engine) but I would like to have a system where you can write shaders in GLSL (or some other shading language) to apply pretty effects to sprites
    • Animated sprites. Again, this is a must-have for a 2D engine.
  • A physics engine. I'll have a go at implementing my own solution, and if that fails (likely), then I'll be using Box2D.
  • A simple GUI library. While I could just give users access to ImGui (what the editor uses), I would like to have a basic GUI library containing buttons, drop-downs, sliders, and text inputs.

After I've finished (or partly finished) the above things, I'm going to make an itch.io page for the engine, so that I can (hopefully) get some feedback on what improvements need to be made in order to bring this engine to a point where it is usable for creating games.