Hey everyone. I'm new to the "real" world of programming because I used to just code alone in my room, strictly on my own PC. My name is NZUKOU DAMIEN (my username is DamixLord), and I'm an 18-year-old developer based in Cameroon.
I've been a fan of programming since I was 12. Since then, I've messed around with several languages: Python, JS, Go, and now Lua. I don't even know why, but I just love Lua for no specific reason, so I wanted to learn it. In one week, I learned variables, functions, tables, and OOP (especially metatables, which I absolutely love). I wanted to build a project to check if my fundamentals were solid enough to reach an intermediate level, and that's how I made SPACE CONQUEROR.
I didn't go with a traditional OOP approach; instead, I mixed it up with metatables because I enjoy it, and honestly, it was a blast. I'm looking forward to your feedback, advice, etc.
Just a quick heads-up (because I have to, since some people on Reddit jumped all over me for this): I did feed my code to an AI to make it more readable (because I do weird things like declaring variables that are as long as a highway), and I copied snippets here and there because my math and logic skills can be pretty bad. I'm not writing my first article to brag or pretend I'm a genius (honestly, I have major imposter syndrome). I'm doing this to get feedback, chat, and learn from my mistakes.
Thanks again! (And one last thing: while making this, I realized that my first real project is very similar to the one Elon Musk coded when he was 12, Blastar. Coincidence? I'll let you be the judge).
The Project : https://github.com/nzukoudamien/Space-Conqueror
Top comments (3)
Hi!
Thanks for sharing!
I had 3 minor issues (really easy to fix):
A)
main.lualine 3 in not commented out.B)
local tools = require("Projets.Space Conqueror.outils")This is some sort of relative path.
I just cloned, ran lua from root dir, so I had to rewrite it to be relative to root dir.
C) I think you are using French. You should consider switching to English in code and comments.
Now to the game:
OMG you tricked me 😀
Enemies have a life point of 5, so I was rage quitting because I thought I was a noob for not being able to one shot them 😁
Lua is a nice choice. For example the game Don't Starve uses it for business logic.
Lua is quite a nice low overhead solution with C/C++.
The terminal part is ok. If you are into terminal games likes this or roguelikes, I think there's curses / ncurses which is a special helper lib for mocking about with terminal.
Manages clear screen, flushing, colors etc.
There are better alternatives, simply curses is the historical one.
If you are into roguelikes, you should consider taking a peek at Cataclysm Dark Days Ahead.
It is a fully opensource singleplayer survival game, that you can play on your machine.
Here's the GH repo
It has ascii mode and sprite mode (I guess via SDL?!?!)
Another thing is the wrapping. I get what you are doing, and it works 100%.

But... just for pure theoretical Computer Science... have you considered modulo arithmetic?
To make it even more exciting for you...
Currently your game wraps around x. This is a cylindrical world.
But you can also wrap around around y.
This results in a torus.
The ancient game Civilization III used this trick.
You had a flat map, which due to wrapping behaved like a torus:
You know... it is quite a fun topic how you calculate distances in that game (considering it is an old game, and they wanted to skip square root because it was expensive, and resulted in non-natural-number distances).
I had an article about that, but unfortunately it is no longer available, because dev.to took it down.
Yes, they took down that Civilization III article of mine.
One real criticism: This will sound dumb, but you should provide imo a graceful exit to the user in games.
UNLESS it is a horror game, and not being able to gracefully quit is part of the design muahahaha 😄
I think you should be you, not Elon Musk.
Elon Musk is a pampered kid, who has skill issues in Path of Exile and never wrote real code in his life 😁
Be you. You beat cheater Musk any time.
I think you are kind of at crossroads here?!
You can decide whether you are into:
A) really crazy low level stuff (aka the C/C++ route),
B) or you are more like a game designer who wants to think more about business logic.
In case of B, you can try out game engines like Unreal, Unity, Godot.
Route A gets really technical real fast. And there will be pointers.
Also... Route A is the hardest field in all of Software Engineering, as it requires both low level coding, hardware knowledge, high level things like DSA, Math etc.
So it is a really long journey.
No matter which path you choose:
If you hate Math, please watch some videos on YT from game dev Freya Holmér.
It gets exactly what you need, and clears up those pesky vectors and matrices with animation and sweet talk!
Good luck!
Thank you so much for your reply!
First of all, thanks for pointing out those bugs. As I mentioned, I’m a beginner and I've been piecing together bits of code from here and there. Also, yes, I'm aware that better alternatives exist (like Python or Go for TUIs) as well as for pure game development—personally, I prefer the Defold engine and the LÖVE2D framework. I'm actually learning LÖVE2D right now and I really love its minimalist approach.
When it comes to making a choice, I’m just a guy who loves to code. When I feel like diving into low-level stuff, I will; and when I want to build something visual, I'll do that too. I like to blend what's useful with what's fun. As for Elon Musk, I don't idolize him at all—quite the contrary! I just thought it was cool that my very first project happened to be the same as his first project (just like billions of other people).
Thank you for your advice (especially for a guy like me who is terrible at math!). I’ll definitely check out the game you recommended. If you'd like, you are more than welcome to contribute to the project and make changes. We could also keep chatting if you're up for it, of course!
Be really careful with CDDA. It is a huge game, so it has a massive codebase.
On the other hand... it has so complex game rules, that you can salvage parts out of APCs, schoolbuses in the zombie apocalypse, and build a mobile base which is more like a tank.
And you can gene edit yourself to become super smart or super strong... or even use cybernetic implants to turn yourself into some sort of invisible ninja with a diamond coated katana.
But you start the game with a lighter and a pack of bubblegum, so it can take a while before you turn yourself into a spacemarine 😅
Oh... oh... I forgot something... silly me: whoami
Here on dev.to I like to ask from people programming puzzles.
I tease experienced developers with ygritte gifs, because they have big egos sometimes.
But for you, I'll not pull an Ygritte, but lay out why I feel it is necessary:
The education system failed us.
I see a lot of devs who memorize GeeksForGeeks or LeetCode stuff.
In my opinion, this gives a false sense of security to people.
Memorizing an algo is one thing.
Coming up with an algo is another thing.
Proving some property of an algo is also another thing.
Don't get me wrong: I totally agree with game designer Jonathan Blow.
Blindly following BIG IDEAS like SOLID is bad,
but also... pure theoretical CS never shipped a game.
I fully agree with him on these.
But... he's a wise guy, so he studied things and took out the useful stuff from them, and used these to build games.
He respects both Math and CS (of course in his own sweaty angry yelling indie dev way).
When I'm sassing and being angry at devs, it is because they don't get that they are footgunning themselves.
There are literally decades worth of 'helper muffins' baked specifically for them.
In freely available textbooks, or ... khm ... certain paid textbooks being uploaded to GH in pdf for free...
CS101 gets a bad rep, because teachers are burned out, students get into tuition fee debt, curriculum does not show people who to translate theoretical ideas into performance gains or code organization.
But... I'm not really angry at them, the people themselves, but our modern world.
What I really wanted to say is that... yes 80% of your stuff is Engineering...
But that 20% of pure Computer Science can, for example, sometimes make your game jump from a 1 FPS lagfest into 60 FPS cozy mode.
Don't confuse CS+Math with their bad presentations (for example in my country... education system is kind of lame).
Also, do not feel that you are dumb for CS or Math.
Fact: We humans are dumb. No exclusion. Noone is all knowing (especially not Google devs who wiped the infra of their client Unisuper).
It took decades worth of smart people thinking-failing-retrying to arrive at those neat solutions.
When a teacher/Senior says "It is so obvious, why don't you get it?", always ask the question "Did this person come up with it?".
You wrote
especially for a guy like me who is terrible at math.I do not accept that.
I accept only
Math and CS education has very poor UX, unimaginative game design, so even Angry Birds is more fun than watching a 60 year old with a chalk.This is my personal opinion though, so take it with a grain of salt, as with all internet talk.
Give Freya Holmér a spin, she might work for you (there are other free alternatives too, of course).
And also... it'll be really lame, but... MIT OpenCourseWare exists, and it costs 0 USD (random example, maybe not your style, I'm just saying it is free).
Aaaand there are of course a lot of neat FREE sites for game devs.
I'm highlighting FREE, because nowadays everyone wants to steal your money, unfortunately.
They have a conniving tendency of stealing free education materials, rebranding them, then putting a price tag on them.
So be careful!
Anyways, this was my playful scorpio, for you, Jon Snow.