Hey cemetech! xcelxiao here. I've been lurking these calculator forums for a long time. I've always done a bit of programming on the side, but never did anything too serious. I took a half semester of "Game Programming" when I was in high school, but the class was a lot less using creativity and problem solving skills to create new original material that you could be proud of and a lot more of here's how to copy and paste prefabs, and oh don't worry about creating any ideas or in fact do any actual coding, as we will simply give you a template and you can fill in the 20% of the code that's "empty". I found some game programming courses online, but they are not cheap, and I have this hunch that they will resemble my previous experiences in "Game Programming" courses. So like any sane human being armed with the knowledge of 6 months of C# code from a bygone era in my life, I decided to create my own game. I tested out SDL2, but quickly got overwhelmed. My knowledge of C is shaky at best, and I had 0 experience in C++. So I thought moving to a calculator might lower the barrier of entry. I've played around with the toolchain for the 84ce before, and remember how pleasant it was importing oiram sprites to my calculator and moving it around on the screen.
TLDR; I have no idea what I am doing, which somehow still puts me in a better place then where I was a month ago.

So after hundreds of hours of blood sweat and tears over the past month, I have successfully written... an Entity Component System. That and a hello world program. Not having access to the STL library was my first barrier. So I tried - well, I tried rewriting the entire thing. And looking at back at what I had, I'm amazed at how stubborn I was attempting to write it. It was a nightmare - just an endless rabbit hole of dependencies until I got down to the compiler level and realized I probably had bitten off more then I could chew. But while I was down there, I learned a lot about how memory works. And that got me thinking. Why do I need this vector class from "X" youtube tutorial, when I can store "pods" of data that point to each other in a chain within memory. Then just reimplement vector's member functions, with a slightly less efficient (ok, maybe very inefficient) allocator and list transversal methods. So that's what I did. Also, I learned half way through writing my very own "Pods" class, that these were called linked lists. Turns out pods are something entirely different.

Buuut, I do have a video game in the works. Learning c++ was like being surrounded completely by dirt, and shoveling bits of it around until you have a tiny living space, and pretending life is ok in an indefinite squatting position, writing inefficient and dangerous code. You have no idea how far the dirt goes, or if it even goes infinitely, but you live a simple life, subsisting on worms of StackOverflow questions. Anyways bad metaphor over.

Here's my code :D

The game in the works is relatively complex in its own right. It's a smash brothers brawl-eque fighter game. I wrote a lot of its code between STL-rewriting stints. Now I can refactor the code into my ECS. The ECS isn't very robust, doesn't support templating, potentially has memory leaks, and certainly isn't efficient. Buuut, if you do have any advice... on well... anything, I'd love to hear it. :D
That's fun! It's a good learning experience, and you're doing really great to put your energy into projects! It's especially good to practice without the STL library because often fine-tuned abstractions do better when performance is meaningful.

I have just an unrelated note that helped me personally regarding game development; ECS as a design pattern is an abstraction that increases complexity for little gain for indie games. An issue is that it's tossed around as a buzzword a lot, so naive developers like me would have thought it's the key to everything. But really, buzzwords often mean little, and my projects benefitted a lot from having a critical eye for complexity and putting my effort towards solving specific problems that benefit the program's purpose in being interesting (as opposed to ensuring my project adheres to what the culture says is good); This is just a note if your goal is game development, not if your goal is to make an abstraction layer :) It just helped me and I wanted to share.
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum