The game will be written in C++
Programming:
enemies.puch_back(new DefaultEnemy(200, 300, 3, 5));
enemies.puch_back(new DefaultEnemy(500, 400, 4, 5));
enemies.puch_back(new DefaultEnemy(300, 420, 3, 15));
enemies.at(2).createAward(new Key(4), "pling.wav");
Or Interpret them from a file like this:
DefaultEnemy 200 300 3 5
DefaultEnemy 500 400 4 5
DefaultEnemy 300 420 3 15
CreateAward 2 "pling.wav" Key 4
Program it would be more easy and people can't (without speaking of hacking) edit your levels. But it maybe a bit rubbish to program it all? Are there other reasons to choose for programming or interpreting?
How to delete the (game)objects when the level unloads?
Both C# and C++ can be used to create games. However, C++ has better control hardware on the PC or server. Therefore, it is usually a more suitable language for game development.
Direct code compilation provides better code performance, making games more efficient with a faster gaming experience. Differences Unlike C#, C++ is efficient in dealing with low-level C and assembly languages, making games developed in C++ relatively faster.
C++ is an excellent programming language for game development. Its low-level language components give you the freedom to manipulate hardware and ensure a highly responsive gaming experience. While higher-level languages are faster to write in, they don't give you the flexibility and performance that C++ provides.
To become a game developer, one is required to have good coding skills, for which a basic knowledge of physics and maths is important.
Always separate application from data.
First variant is equivalent to hardcoding game resources. This is absolutely bad and is suitable only for debugging.
Every games store their resources in external files - xml, archived packages and parse and load them during runtime.
Therefore, modern game engines almost every time have their set of tools which is bundled with it.
Deleting game resources is also a vast question - it depends. Depends on your objects' lifetime management and on that fact if you need to unpack your data into temporal files.
Well I would save the level design in a file. Thats what scripting is for right. This then gives me a way to JUST change the levels..
Also It will keep your objects (the stuff used in the levels) seperate from the logic (the game logic). This will help debugging and have a clearer structure
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With