Advertisement

Game engine in C and open source, The Box, structural programming

Started by December 22, 2019 10:49 AM
129 comments, last by alex4 4 years, 8 months ago

Torrents management

All things that we do we can instant share width torrents. No need to go throw company control of information. Or dependent on company to publish things. users will have control of the information.

We can see in the torrents image, our web page published as soon we finished. And is auto connected width the advanced search capability seen in previous post on search.

Or can have a costume "git hub" or management of project published. All stuff we do we can publish, and add information to width.

Information is also going to lists, so the user access lists first then torrents.

The projects image is a example of a list.

Torrents
Project lists
Advertisement

How code is evolving in dynamic stack libraries.

First thanks for comments, and help motivation is really a great help. I was to abandon the project if was not for this guy that told me “one day you will write kick ass applications”.

Write static library's is easy the problem are more dynamic libraries that need to evolve.

In game we need to evolve, so the level is not always the same, but to work in this style of code. We need to do in the same way.

A level start at zero, if in a array or 1 in normal counting. and need to evolve. Spells start width 1 or 2 and in end of game a list width many. The code may evolve, updating is just to show. But think “got the hang of it”.

Can we say: highly readable code? “to boast”.

 levels = {1, 2, 3, 4, 5};
 level[0];
 
 #include "../labraries_stack/map.c"
 
 active_monster = 1;

flags = {"random monsters", "fixed monsters"};

areas_flags = {"city", "arena", "random encounter", "pvp", "fixe encounter"};

 #include "../labraries_stack/area.c"

 spells_active = 1;
 abilitys_active = 1;
 defend_active = 1;
 move_active = 1;
 attack_active = 1;

 attack_range = 10;

 attack_types = {"melee", "slash", "ranged", "piercing", "magic"};
 
 #include "../labraries_stack/attack.c"

 defense_range = 10;
 defense_types = {"block", "dodge", "shield"};

 #include "../labraries_stack/defense.c"

 movement_speed = 5;
 jump_active = 1;

 #include "../labraries_stack/movement.c"


 spells_types = {"Charm", “Water-Making Spell”, “Age Line”};
 spells_levels = {1, 1, 5};


 #include "../labraries_stack/spells.c"

 
 monsters = {"Acolyte", "Aurelia", "Battleforce Angel"};
 monsters_levels = {1, 2, 3}
 spawn_type = {"random", "fixed"};
 spawns_fixed = {"Aurelia"};
 spawns_random = {"Battleforce Angel" "Acolyte"};

 #include "../labraries_stack/mosters.c"

 combat_area = {"area 1"};
 combat_type = {"turns", "range", "auto", "income"};
 combat_turn_time = 1000;

 #include "../labraries_stack/combat.c"

 win_condition_types = {"value", "score"};

 #include "../labraries_stack/win_condition.c"

Think i understand enough of it to give it a name

In MVC , we have : Model View Controller

In here we have SRV : Settings, Rules and View.

If it fit's in a patter is something like that.

We always define settings, first, because settings control rules. View in this case is not that import, since it also obeys to the same principle. Of settings control Rules.
Maybe SCR.

Need to see name better, but is : settings → control → rules.

jdc said:
Think i understand enough of it to give it a name

The name that has been given to it over the last many decades is ‘declarative programming.' That's a good search term to use if you want to start learning what others have done along these lines. Maybe for inspiration or stimulation.

Stephen M. Webb
Professional Free Software Developer

@Bregma
I appreciate people comments, but no one is going to write the software for me. I can do whatever i want, in therms of theory development. Others did a lot in the past? That's there problem in not creating standard code.



Advertisement

application_actions.h

Since many actions repeat in tools, moving it to “actions.h”, don't know if actions.h is a name to simple for now is "application actions".

many tools use actions like: code editor, text editor, map editor, etc…

We can see we can share actions throw many tools. Like : save, undo last, copy, etc…


char level;
char action;
char actions;
char last_action;
char actions_store;
char action_tool;
char actions_types[] = {"move", "save"};

@Bregma

Code that i hold use and not touch is something like, standard code for:

→ model structure.h
→texture.h
→…

Same for images

→a structure, that we could create sub image types.

And the same for the rest, of the software.

→standard libraries that we could reuse, in other projects.

Where are the standard libraries that are proper written?

The theory is written ya that's true, but no one use it. Contact some of them to written standard code, zero replays.

basically they say "f***, no one care about standard code.

Then you complain, that's a lot done. Sure, but no one can reuse that code, it have no standards. It's based on one some one personal theory not the object abstractions theory.

Interface tool

Separated the interface from the editor, so we can edit and manage thinks individually.

It will much better because not only we can test, individual components, as different types of interface coding, like CSS, or GTK+ like libraries that design interfaces.

No need to be in a game to do it. In here we can test like if bars are working properly, if characters load. Level up, xp, design in different codes, test resolution, etc…

This is proper code, we are separating our interface dependency's from other project objects.

*GTK+ don't know if fully compatible width other things. CSS is, is designed that why to work in any thing.

Found this two files graphics, not bad graphics for 2 files. It may be of some help for some one. Think i can start from here if it works. Have a costume graphics that is more modular and people can add there stuff like as mention holographic design. If we can make this code modular, it will be easy to add other styles of graphics.

Still, i don't know i will take a step at a time, because i'm not expert. But it will be nice to have a engine that have all the code modular. Any one can add new graphics or things to it. This is the objective of the Box, a engine that serves to study and development of engines and projects like games.

https://www.codeproject.com/articles/363908/simple-two-file-graphics-library-for-c-cplusplus

This topic is closed to new replies.

Advertisement