C++ No AI Game Creation banner

C++ No AI Game Creation

9 devlogs
24h 18m

I'm aiming to learn C++, a notoriously difficult language, by making a game writing the code by hand. It's going to be a long journey, and might not be as glamorous, but the learning outcomes about data structures, resource management and efficien…

I’m aiming to learn C++, a notoriously difficult language, by making a game writing the code by hand. It’s going to be a long journey, and might not be as glamorous, but the learning outcomes about data structures, resource management and efficiency utilised behind the scenes are the true outcomes of the project.

This project uses AI

Only used AI for explaination.

borislo830

Development of Tree structures.
Trees can be used to represent relationships between different things, and is incredibly useful for modelling relationships in real life. However, using them in cpp requires recursion, which is quite difficult.

Attachment
0
borislo830

Recursion:
One of the more complex ideas in programming is where a function can call itself. Recursion can be used to replace a loop, but there are many niche cases where it can simplify incredibly complex problems into simple ones.

This one really took me a while to understand

Attachment
0
borislo830

Learned about doubly linked lists, a type of lists where insertion in the center of the list is also O(1) time. It is important for programs, especially for those for games, to be highly efficient!!!

Attachment
0
borislo830

Some final touchups, just an explaination of what different operators are and what they do

Attachment
0
borislo830

Dynamic allocation: This means that I manually manage memory, having to write constructors, default constructors, and assigment operators.

The image below is a good explaination.
The stack is where variables like integers, things familiar from python, would be.

The heap is a space where the program can create memory outside of variables, and interact with those pieces of memory through pointers!!!

Attachment
0
borislo830

Different data structure: Map
A map is basically a dictionary in Python, but I am writing from scratch, including copy constructor, constructor, destructor, assignment operator etc.
Theres a lot behind the scenes when we use a data type!

Attachment
0
borislo830

Learning C++ to build a fun game, experimenting with iostream features to output text.

Attachment
0