Friday, June 2, 2023

Structures


 

[b]The main[/b]

main()
{

if(zone == liberta city)
#include shop_obj;
}
else if(zone == main menu){
#include main_menu
}

You don't need any thing... is just modules width no dependency's... Easy thing you will ever find.

 

[b]Advantages:[/b]

you do not need to write your Database, if you don't want to; you can just alter global variables for shop, You don't need to write a save if you don't want, etc... all functionality in the same variables and modular...

all the functionality possible already written:

-camera
-character movement
-attack
-AI
etc...

You can still have your variables, in the objects, you just need to know the standard.

class character
{
name;
age;
race;
etc...

character_the_box() //on init object
{
name = character_name;
age = character_age;
}

when you initiate it loads game variables...


[b]Missing another thing.[/b]

How to configure your project.

'Build a costume array index's, width the same names as global, and the Box will know what you are using.

The Text RPG i'm using. Will be something like this:

char character_index_array = {
"character_id",
"character_name",
"character_race",
"character_age",
"character_languages",
};

id for database store. Some things you need knowledge but is as i write or on files, or on posts. You don't need to learn a new framework.  

So that the game can load character, and database can save, or files.

[b]Never Shaw?[/b]

100% procedural engine. Think people stop developing procedural engines, that may be the biggest reason.

 [b]C++ is faster?[/b]

You can't go below objects because is based on them. They consume a lot of resources. In C you can add assembly which will be very specific i doub this articles, based on limited tests. On all the internet say procedural is fast. The logic is against C++. How something that use and load more information can be faster?

Frameworks faster? Even professional console e-game players say the games are slow that will affect their  performance. Is not faster, it can code faster because you have more things arranged.

I think is a matter, of standards, and costume games width modules, not large paid frameworks.

But will see is still evolving. My PHP engine as much more limited it only use principles of what i'm doing width this engine, improving a bit more the concept.

Questions and comments help a lot because most of the time we are centered in design and development don't have time for this questions or reflections, so when i See them ya "that is a good point" Made a lot of updates width questions/comments on game dev.

* PS: most C functions where not build for performance, they load many not needed stuff. But if you refactor them, and they load only the needed thing, "if i where you will not bet my money on C++".

A detail

You can use your logic to make all things you want, when you are finished.

character->save
shop->save
item->save

And you save all things back to globals, and will give zero errors. No need to use structure variables if is not needed or don't want in the objects.

No comments:

Post a Comment

hi

Rules

Rules, Steps & methods This is the current way to implement and be implemented but there could be more things to add : Root or loader  (...