@rilpires

Contact me: rilpires@gmail.com rilpires
Personal projects

Saucer Engine

Saucer engine is a Open Source 2D Game engine I made during 2 months with C++/OpenGL/GLFW/etc. There is a builtin editor and support for Lua scripting. The name *Saucer* came simply from my name ("Pires" literally means Saucer) , but it came together with the proposal to "be lightweight" hum? *ba dum tsss*


Github Page

Development

Ohhh the naive old me...

The plan was to make a "simple retro-like Chess game" (motivated by the popular Netflix show with the pretty girl you know about). But I also always had wanted to learn low-level graphics stuff with C++... so it was settled: I would create this chess game with a game engine I made myself.

Fast forward: I made it!!! Here is the post I wrote about it.

Even though my first expectations was to complete everything in 1 month (naive old me!!!), now I don't think 2 months was too much. My objective wasn't to complete only the simple retro-like Chess game. This was postponed until the engine was complete, and this one was the task that took 95% of the time. It was a little further than my first concepts of what was a complete engine, and still, even then I see that it is not quite complete yet.

Feature-wise, I'm pretty satisfied with the result:

If I ever want to create another 2D simple game or maybe some general application with graphics, I'd even reuse it again. But, to be honest, it was TOO²³²³³ much work for something you could achieve with other tools.

Now, I'm not saying I regret doing it. I learned a lot about C++ development and stuffs I was targeting to learn. These C++ metaprogramming templates Hell ? Scare me no more. Macros can be useful with the right amount of care taken. And in the end of the day I can think of many ways to optimize this code but hey, I don't even need it because C++ is lighting speedy boy.


Benjamin Franklin: 'Those who gave up performance for easiness deserve neither'

Documentation

Simply put: there isn't any.

Sorry mom. It was already too much of unpaid work to I even think about documentating it for other users. Tried Doxygen but ehh... I decided I should expose the Lua API instead the C++. That's why I'm saying the engine is not quite complete yet.

The most important thing I have to say is that you should run it with a debug environment (like GDB). There is too many ways the engine can crash that I haven't made a proper runtime guard yet.


Mr. Turner: 'This is where I'd put my documentation if I had one

Building

Figure it yourself, good luck.

Just kidding. This was probably one of the most painful tasks. Until I had to move to Windows from Linux, it was all a customized Makefile. It was nothing fantastic but did the job. Unfortunately, Windows doesn't simply builds from a Makefile. So I took some time to learn CMake.


Sad girl at computer

There is a CMake file. I pray that you can simply build it. As I'm writing this page, it works on Windows VSCode + MSVC 2019 with the famous CMake plugin out there.

I very appreciate the effort of the CMake team. To be honest, I don't even know if it could be easier. But there isn't a single one easy `Getting started` tutorial. All the good efforts out there from outside the official documentation doesn't cover everything you will need to know. And the official docs is just TOO much, when all you want is some simple steps. My conclusion is that if I ever had to hire a team of at least 3 C++ programmers, I'd hire someone entirely dedicated to compile & link stuffs.

Conclusions

These are my personal overall conclusions and suggestions on creating a custom general-purpose game engine.

Acknowledgments

Last update: 2021-04-16 06:06:51 +0000