Monday, July 8, 2024

Odin Programming & array programming

 At their site or in the manual we can read array programming which is something is heavly used in PHP. Think one of the best things to use.

Din't have much time to study this but so far looks cool.

We have width this language extensive  suporting it...

Construct an array with designated initializers:

from : https://odin-lang.org/docs/overview/#fixed-arrays

We can see 2 new features to C lang and i think low level in general :


Assign by index and ranges. Ranges is something new to me having the same value populate several fields it may be helpfull in manipulating large fields of data like in Journals for example.

More info check the link manual... "Something in developing..."

favorite_animals := [?]string{
	// Assign by index
	0 = "Raven",
	1 = "Zebra",
	2 = "Spider",
	// Assign by range of indices
	3..=5 = "Frog",
	6..<8 = "Cat"
}

New Programming Languages

The use of Chat GPT really speeds projects up you don't need to search for things you just type commands. 


Was informed about how really this libraries are working like SDL and Ray Lib  they are kind of wrappers to xlib and OpenGL which are direct library to work width.

A side note : no one in a couple of years of search was able to tell how this stuff as doing. This is really a advantage to use ChatGPT.

Once i explored this 2 librarys I could see how the C language is praticaly dead from the point of view of development. Both C and C++ are propertery licenseded they do not have open repositorys. Which translating they don't evolve. 

Also to add to this C have great amount of bugs which are not easy to fix by non C expert. This thing are supose to be fixed at development level not at code. 

Most of these stuff in C take ages of configuring, like: strings, loops, types. No serius developer whant to configure these things. Because why do it at local level : "all most also do it", when it can be done at language level and is available to every one.

So i though ?! no point in using C and assembly is to complicated for or neededs. Then check the development of new languages and find out a lot of information. This guy is gathering information on the main programing languages being develop at the moment.

He is set on github : https://github.com/robertmuth/awesome-low-level-programming-languages

and come out width this list. I explored them a bit and a few stand up from the rest. They all if not most attempt to replace C at low level language:

  •  Odin seems nice is a programing language already being used in comercial. if you check their github rep is extremly active it have updates just a couple days ago and so many forks and contributers. A note on Odin it seem focus on game development which so many intuasiastes : "we may see a implementation of a new laguage";
  • C3 also seems great but i don't see that much activity as in Odin. The concept of adding new things to the old C seems the way to go or at least a good solution. You get the style that you like width updated things like boolenas and foreach loops and classes;
  • People in the comments talk about : Rust, (Odin) Nim and Zig; watched a video on youtube about Zig this lone guy width "just a few hours analising C code updated and fix it". "There isn't not much interest in updating this things" by the companys behind it...
  • D also seem stable is being use at company level and they put all their work out there seems  nice; A note on D it have many inovating stuff like : unitests, interfaces, classes and so on...
  • Other do a lot of stuff for web like Crystal also seem realy adavantage;
  • Rust is also debated Thing. Is being used in Firefox which shows how people don't trust C that much.
  • Some represents this style of not using pontuation. People that prefer Python look it is also available at low level.
  • The conclusion : all this people have done their share and are doing a great work in implementing new languages.


  • ATS
  • Ada
  • Alumina
  • Beef
  • C2
  • C3
  • Carp
  • Cone
  • Crystal
  • CSpydr
  • D
  • Forth
  • Hare
  • Hylo (formerly: Val)
  • Jai
  • Kit
  • Lobster
  • Modula-2
  • Nim
  • Oberon
  • Odin
  • Pascal (FreePascal)
  • Rust
  • Scopes
  • V
  • Vale
  • Vox
  • Zig

We can check a GUI implementation for Odin in github. the code is so small to implement a full interface. A lot of stuff being wrapped. 




Can check for your self how only a few line of code created all this that u see in the image: https://github.com/kcvinker/Winforms?tab=readme-ov-file

Another example working directly in the web browser

https://floooh.github.io/sokol-html5/sgl-microui-sapp.html 

This two examples on Odin look ok, others may also be nice. it will take some time to see which are the more stables but they all if not most seems very active. 

 

 


Wednesday, March 6, 2024

Rules

Rules, Steps & methods


This is the current way to implement and be implemented but there could be more things to add :

  1. Root or loader  (which load things in to the interface, all frameworks\engines have or should have a loader, so it automates many things).
  2. Prototypes or Pseudo objects (can also be called schemes, whis is what they are schematics for problems solved or rules)
  3. Global inheritance ( like Variables in scheames, may also be defined as inherarquy)
  4. Stack Librarys (format code in files that can inherit global variables )
  5. Fuctions (also should work on a global scale)
  6. DTR  (Database text fromat reader, a kind of tool to improve performance, but a thing that all project uses they way to deal width information can also be called data structures)
  7. Stand alone programs (for easy to develop, this is optional you don't need to do like this)
  8. Standard Coding (which we could divide in to several parts like standard names, a fixed set of names so that we can access at any time)
  9. Unit tests (tests should be available in any project that have a large size.)
  10. Librarys (part of standard coding, a basic set of high quality raw assets that allow to create and set up a project, their names should be standard so that they are ready to include).
  11. Structure (this is kind of a more theory, once we decompose our framework or engine in to all this steps we have a structure framework. Every thing is decomposed on a ready to use hierarquy... )
  12. Hierarquy (part of the structure a simple way to see what we need to have at the higher levels)

Also whant to add more steps but this are more a on develop  :
  • Templates (applay the standard structure that we can easy use templates in to projects)
  • Modules (a bit the same as templates)
  • Interfaces (can be a part of templates

We are going throw this topics to explain them this topis also are like a index in a book. Is not 100% ordered only aprox

Monday, March 4, 2024

Status of Project & Updates


Updates:

  •  Chaged the posts on tutorials and debate on what language to use on it's own forum this one will only be focus on posts relevant to this project beginner programing will be at the other blog:
            https://learnprogramming010.blogspot.com/

  • Organized even better the posts and improve them. Now when you start reading the information should be logic connected and ordered

  • Also moved things relevant to game develop in to a blog so is not mixed up

            https://gamedevelopment0.blogspot.com/

Global Inheritance

The main reason for a adopt a object kind of style in procedural programing is because procedural or raw programing style is to complex. We can see that functions, the base of prog is to hard to manage.


 This is done by separete "settings from logic" in the functions.


A example of a nested function that recive 3 variables: 


Function test_vars(var1, var2, var3)

{

int result;

result = var1 + var2 + var3;

printf(result)

}


These aproach have 2 main problems. One is scoop of variables and the other is the nesting of variables. 

Enviorment or scoop for the variables demands thats calls  to be used in conjuntion width function "test_var" its assume the same scoop or enviorment.

which is often local, need to have them keep close or in the same file due to this connection.

Example of a file:

int var1 = 11

int var2 = 4

int var3 = 3

test_vars(var1, var2, var3)


The secound problem :

the test_vars()  once changed need to be changed in 40 files. Like if we need to pass 4 variables or no longer need to pass a 3ยบ variable. The problem is that now we already callned this function in this format in several files. Is to static to work width.


Solution :

Make variables global to not need to change our functions we just need to chage 2 file and is where the function includes are.

Our new variables which represent prototype file and the function file where our test_vars() is, width the new functionality on the function.


The "includes" folder should have a global_variables.h file width all our global variables.

This stuff grows by adding more prototypes. So your global_variables file have all this prototypes for call kind of actions.


the new enviorment looks like :

  • 40 files calling the functions test_vars()
  • 1 file width the global variables.
  • 1 file width the global function.
  • test_vars() no longer is nested we can do width it all we want to.


Our new format transformas the function in to more a link for funcionality then a funcionality it self. Which is often is better. The more static you build harder it is to change which leads to more work needed.

Sunday, March 3, 2024

Hierarchy

 The hierarchy concept is pretty simple, things that have more dependencys are at the top or higher level while those width less dependecy are at the lower level.


A login pseudo object does not need to be in the top level, since is only used at the login interface.


  • char login;
  • char login_name;
  • char login_user;
  • char login_password;
  • char login_db;


In here we have a raw example that shows a formant on a pseudo object that is done to handle or manage a login menu. But lets assume that afther we implement 1 login we whant to add another in this case it have more dependencys and it raises in hierarchy, can go up to global or a inter mid step of local to global. Like a interface or template for the login. 

This file is not local nor global. Not all things will use login and since more then 1 are using the login, is place is not local nor global. But this depends on how you evolve and implemente, this is more a theory.

At the moment their is no rule for this because this depend on the abstraction done, which depends also on performance needed more abstraction lead to more slow and memory consumption while more raw create a more dificult software to maintain but faster. 

Pseudo Objects or Prototypes

Pseudo Objects work as Object in OOP programming but they are applied in a Procedural Structure. Which i called structural programming. Pseudo Object that we are using can be translated easily to object programming since they work the same. The diference in here they are all global so this represent our global_variables.h. The unic naming avoid name collision and help our global_functions to access it more easy. 


Our objects currently in development:

  • -Text
  • -Folder
  • -Path
  • -Link
  • -File 
  • -Error
  • -Test
  • -Font (still in dev)
  • -String
  • -Memory
  • -History
  • -Array
  • -Loop
  • -Login
  • -Paginator
  • -Effect
  • -Menu
  • -Settings
  • -Translation
  • -Window
  • -Layer
  • -Graphics
  • -Position
  • -Color
  • -Space

When we access your "global_variables.h" file we should be able to see the variables prototypes for this topics. If you read on Objects and OOP oriented object programing you can read. The main issue is delegation. When a object is doing to much and other is  doing to less. The work and work in development is to balance this objects back and foward that they represent cleanly the task that they should deal.


In the interface we have several elements that we need to decompose in to p-objects:

-Menu
-Button
-Box (html for example, use: list, div, span, ul, etc...)
-Links

In here is not properly implemented is still in "property" which was a bit abstract but is a good example on how to implement objects. So it was a kind of to generic aproach to implement one of the refered elements. It become to big becase is not specific enought it will lead to bad programming. But still we can see the decomposition that is necessary in order to achieve prototypes.

int property_id;
int property_name;
int property_title;
int property_button;
int property_background_color;
int property_3d_model;
int property_padding;
int property_margin;
int property_pos_x;
int property_pos_y;
int property_pos_z;
int property_clickable;
int property_image;

...

button_image;
button_padding;
...
menu_image;
menu_padding;
...

A better way to do this is to manage only one property in this case "space".


  • char space;
  • char space_name;
  • int space_type;
  • int space_amount;
  • char space_element;

For the background instead of puting a background in all items we can administrate width the color p-object.

  • color;
  • color_name;
  • color_type;
  • color_number_hex;



We are going to repeat our self's if we create a button, with background color, then a menu with background color, then a interface with background color and so on...

In this way we have a prototype for color which we can access and use at any time. Allow to programing width less knowledge. Any thing realtead width color\s it maps to the color object we don't need to search where the color is or study about color,s background and color connections.

The only draw back on this aproach it lead to more code in some parts not all since we reause, but is like unity tests that repeat code. Are they bad? like if you can program your app in 4 hours why do it in 8. But lather if you spend 3 days looking for a bug or 1 weak learning this new framework time can be over consume rapidly when things go wrong. In programming better play safe.

Paginator on pseudo object example

This example it show the evolution of the application of variables.


Lets look at a paginator.


Often we only declare one variable : "string paginator_result". and applay the math directly on it. So it may end width something like : paginator regult = (100 / 10 = 10).

 But some parts repeat throw all programing languages. Expecialy the variables involved in Math in this case: total rows will devide by rows per page to achieve the amount of pages to be filled or be display in the interface. 

So we have 100 rows per 10 items we goat 10 pages and this need to go in to the interface. By this example you can understand that our prototypes start to assemble. As we dismount more and more parts of the planning in to the structure that's why i call it structural programming we start to assemble a structure throw prototypes.


lets see the new look, but if we separte in to parts the paginator :


  • paginator_total = 100
  • paginator_rows_page = 5
  • paginator_current_page = 1 
  • paginator_generated_pages = 20


paginator_generated_pages = paginador_total_rows / paginador_rows_page = 20


If we lather need to access any of the parts things are much more robust.

  • paginator_name 
  • paginator_id 
  • paginator_total = 100
  • paginator_rows_page = 5
  • paginator_current_page = 1 
  • paginator_generated_pages = 20
  • paginator_db_extension = mysql
  • paginator_type = dtr



This secound code already allow to a much more robuest inter action. We can decompose this new form in to small types of actions. For example to load paginators in to the DB if you want to do more complex things. Have diferent types of paginatores working in diferent ways or languages.

In paginator type we could define like 3 types = text / DB / Code . 

  • Code will be just a raw paginator
  • DB a dinamic throw the db
  • Test a DTR dinamic file access

Friday, March 1, 2024

Natural writting

Why adopt this style of natural writting?

There are many reasons:


  • Performance to use procedural
  • Maintanability of code since we need some kind of oop structures
  • Computer lights are hypnotic  

The computer lights are hipnotic. You can't concentrate on the computer. The concept that you can writte in any way you want it work in theory in pratice it will lead to problems. In Facebook there is a post there debating width the title "I cant read my code afther some time" this is because you can't memorise that well from computer due to this effect of these artificial lights.

To play games is ok because you are not concentrating but actually using a lot of reflexes. For that is very suited.

But for planning and maintaing code is not that great because you need high amount of concentration.

That is one of the main reasons to adopt a natural way of writting code. The others may be better maintanability and reusability of code.

In this style you can writte large blocks of code before you need to test any thing. It have a feel like a natural language.

You need to memory less stuff may be another important point since all is very structured.  Since we can't memorise large amount of stuff from computer. Having the code structure in a way you need to memorise less seems the way to go... 

Of curse performance is always nice to be able to execture things in a faster way even if computers evolve which is a claim from programmers to use this heavy librarys you can always save some electicity.  


Stack Librarys

Inside the structural programming methos refered there is stack librarys. A set of of includes files that deploys complex funcionality. 


 width less resurce demand? In s cases it may decreases resurces consumption wihch increases performance.

 Name come from that they can stack or inherit so they are a file that works width the structure. 

When you include the "file" you gain a new set of funcionality. This saves resurces because is not functions but basic code and gain a bit of reusability.


For what i tested both files .h can communicate with which other. The ".c" extension can't access which other files.

The .h files need to be in main, to work with variables, because of the single treat thing. People for what i read advice not to use variables inside .h but only declare them. This way we can use files like in PHP.


If we whant to implement several things is better to have a file then a function :

  • Verifications
  • Unit tests
  • Errors
  • Variables
  • Open things
  • Memory handle
  • Interface load


 In here we have a good and a bad example of stack lybraris. A bad example will be image since is to general is more content for a pseudo object. A good example is image_jpg which we need to load a  specific set of verifications for the jpg which are only needed for the jpg but are very complex for a function. 

  • image
  • image_JPG


    

    include "button_effect_fade.c" // the fade effect "should be added".


image_jpg.h is inheriting successfully from image.h

We can see now a structure in the main. Looks is like a configuration page. (is Tweakble in the code or lather outside with a interface.)


The point of this is , if some one code a camera_RPG for their game if using a inheriting structure, can be use in your game also. A waste of time we all have to program that rpg camera again and again. 


  • time.h"
  • error.h"
  • file.h" 
  • string.h"
  • paths.h"
  • database.h"
  • image.h"
  • image_jpg.h"
  • image_png.h"
  • image_gif.h"

  • sound
  • keys
  • resolution
  • interface
  • model
  • model_textures
  • model_animation
  • model_particles
  • model_bounds   //colision, triggers
  • model_blend
  • model_DAE
  • model_FBX
  • model_OBJ
  • camera
  • camera_RTS
  • camera_FPS
  • camera_2D
  • camera_3Person
  • print_screen
  • movement_RPG
  • movement_Vehicles
  • AI

/* GAME STRUCTURE LIBRARY */

  • game
  • money //timers
  •  loots
  • spells.c"
  • abilitys.c"
  • items.c"
  • items_sci_fi.c"
  • items_rpg.c"
  • items_fantasy.c"

/* TEST LIBRARY */


  • //#include "variables_interface.c"
  •     //#include "interfaces/interface2.c"


TOOLS LIBRARY 

-Interfaces can be in .c since they do not delegate any to other files.

-The previous .h files cam delegate to .c files.

*/

if(interface == 0){ // Main Menu

//printf("Main Menu loading");

#include "interfacces/main_menu_GTK.c"

//#include "interfacces/main_menu_SDL.c"

//#include "interfacces/main_menu_Free_GLUT.c"

}

else if(interface == 1){ // Character Creator


//printf("Character Creator loading");


#include "interfaces/character_generator_GTK.c"

}

else if(interface == 2){ // Shadder Tool

//printf("Interface2");

//#include "interfaces/interface2.c"

}

else if(interface == 3){ // Map Editor

//printf("Interface3");

//#include "interfaces/interface3.c"

}

else if(interface == 4){ // Variable Manager

//printf("Interface3");

//#include "interfaces/interface3.c"

}

else if(interface == 5){ // Generic Animation

//printf("Interface3");

//#include "interfaces/interface3.c"

}

else if(interface == 6){ // Particle Tool

//printf("Interface3");

//#include "interfaces/interface3.c"

}

else if(interface == 7){ // Particle Tool

//printf("Interface3");

//#include "interfaces/interface3.c"

}

else if(interface == 8){ // Level Models Position

//printf("Interface3");

//#include "applications/the_box/levels_models_position.c"

}

else if(interface == 9){ // Level Editor


//printf("Interface9");


//#include "applications/the_box/levels_models_position.c"

}

else if(interface == 10){ // Database tool

//printf("Interface9");

//#include "applications/the_box/levels_models_position.c"

}

else if(interface == 11){ // Options

//printf("Interface9");

//#include "applications/the_box/levels_models_position.c"

}


system("cls");

system("pause");


    return 0; // Zero indicates success any other failed

}

CSS style


This is the code for the Code Editor. 


    -> Inherit global variables

    -> Inherit global functions 

     -> Calling global variables to set up the code editor interface


Variables Prototype for general settings ( this case is a title)


        measurement = "px";

        width = 800;

        height = 600;

        background_color = "white";


Variables Prototype for  title


        category = "tile";

        text = "Code Editor";

        text_style = "underline";

        text_size = 30;

        localization_top =  5;

        localization_left =  10;


        Ex:  Code Editor


Variables Prototype for  loops auto builds (general settings)       


        loop_name = top links

        loop_data = "file";


Variables Prototype for  top links


       layer = 1;

       background_color = "white";

        build_background();

 

        category = "menu links";

        localization_top =  5;

        localization_left =  100;

        background_color = "#32383a"; //Gray

        text_size = 20;

        action = "clicable";


        layer = 2;

        region =  top links

        hight  = 100

        width = automatic 


        link_id = 1;

        link_name = "File";

        link();

        link_hover();


        link_id = 2;

        link_name = "Edit";

        link();


    Variables Prototype for  left panel  


        category = "left panel";

        localization_top =  100;

        localization_left =  5;

        text_style = "bold";

        layer = "top";



        link_id = 1;

        link_name = "Categorys";

        link();


      Variables Prototype for  left panel  


        category = "right panel";

        localization_top =  100;

        localization_right =  5;

        text_style = "bold";

        layer = "top";


        link_id = 1;

        link_name = "library - ";

        link();


        category = "code area";

        localization_top =  100;

        localization_left =  100;

        text_style = "bold";

        layer = "top";


        while(1)

        {

            view_lines = 1

            view = "display width line"

            open_file() 

            display_file()

        }


Folders & files types


Current Structure :


  • Includes ->
  • Stack_librarys_inc ->
  • Header ->
  • Macros ->
  • External Includes ->
  • Data ->
  • Librarys  ->
  • Abstract -> 
  • Main ->


Structure width discription :


Samples -> Example projects width diferent librarys and code frames for games layers or projects.

Librarys -> Better organized Files, filtered and ready to work by themes. Is supose to work width library tool to also organize links to files. And also to work width file browser to organize this stuff for us.

  • Images icons
  • Images Art
  • 3D models RPG
  • 3D models Sci-fi


External Includes -> thought in putting inside the main folder, but outside it's easy to update and its very large. External Library: mainly for external librarys which is not develop by this project.

    • GraphApp ->
    • EZ lib ->
    • Vulkan -> will pack some form of install

The Box ->

Progs ->

    • tasks.c
    • projects_web.c
    • dtr.c -> database format text reader. To improve access to information.
    • links.c
    • tutorials.c
    • structure.c -> the structure mecanics develop, is not related to the general structural filosofy of the box, but a dedicated tool to handle things.
    • Forum -> it reflects well the philosophy of the software which is to have tool to automate a great deal of tasks. It allow to administrate forums in a much more robust way.
    • librarys.c
    • File_browser.c
    • Back_office.c

Main -> will include all stand alone parts, now we have several mains, depending on what thing we want to work, also good to explore diferent librarys that we may like or not. Or even pending for an update.


    • GTK 4.6 -> High level funcionality
    • Ray Lib -> High efficiency in code design
    • Ncurses -> Low resurces demand
    • graphics.h -> Study of basic funcionality
    • Vulkan -> High level graphics

 

Abstract -> Settings are a good example of abstract thing is used, have no dedicated panel or tool, it is a sub include. 

    • Settings.c
    • Font.c -> raster types for font(+-) 

Includes -> how it's devided. Standard in here it means it's adopting the general structure of TB design.

    • Standard_variables.c
    • atandard_variables_game.c
    • standard_functions.c
    • standard_functions_game.c

Headers/Macros -> Generic dumping of macros. 

    • Macros.h 

Standard Programing

As the concept evolve on the prototypes and structural programing though on that standard programing could be achieve width standard variable names and functions.

once we know that our paginator_result will hold always the information we could also inter-act width other languages and better inside the program but this is kind a bit to advanced and we are dependent on other people. Standard programing is not a simple concept that we can implement depend on other languanges and people that also adopt something similar.

The same variable name need to be accessible also in other languages the amount of work for that is pretty large.

---

The concept of standard programing main categorys : Variables\Folders\Templates\Files\Functions\data\DB\Includes\Translation\Color\Paths

  •  The Variables which we can devide in several categorys:
    • Settings - Often hold a pre value to be tweaked
    • Rules - Kid of setting but more specific
    • Values - Math calcs
    • Information - Arrays
    • Function kind - Fragmentation of function parts
    • Data - Mainly raw info for db or files

  • Functions 
    • Think in C we can prototype functions but is not that advanced at the moment.
  • Templates
    • Another thing that can facility our life is to have a standard way to connect between code and interface.
    • Design some main categorys so that we know which is doing what.
  • Files
    • How to acces your files and set a better path to files to be better to use standard.
  • Data Base
    • Databases often have a lot of redudancy and repetition. And one of those things that does not have a standard way of doing. It can extract alot of redability and accessibility. 
    • But dbs are a complex thing to do standard since the way they are build is to create modularity. While in code people create modularity because they want. Is not that needed.
  • Data 
    • Data is one of those things that is lacking a lot of standards. Since companys often encode their code many of this files are not open source or are coded on top of the format.
    • But acces them in a standard way could create a lot of better code.
  • Folders
    • Folders already debated often they are not organized...
  • Includes or Librarys
    • Includes inherit alot from the standard way. But depend on how you are going to stucture your project. 
    • Still a bad planning of the includes will also end up causing problems in mainting code and modularity.
    • For example many C librarys have a poorly implementation and could gain a lot if the moved to a standard form of implementation.
  • Translate
    • One timne shaw a guy asking where is the translate? Actually width so many years of programming there isn't still a simple and automated or maiby standard way of accessing it. 
    • And translationg is something that most probjects as they evolve will eventualy need.
  • Color
    • Add colors in a standardized. Which application have a diferent way to add them hold be nice to have some kind of standard. Can you imagine the amount of work that could be saved? (
    • At this time in 23 i need to change the color of the of the page. I know the code and i know the hex where do i applay? I do not have a standard way to know where it is still i have the knwoledge to do it. What that means? a couple of hours searching and testing. (waste of time).
  • Paths
    • Well there is a lot of stuff that we can make standard. But for now think this is more or less ok. Need to update more things. Paths is kind of a minimal thing. Not all small details are that relevant. Like if something makes you waste a couple of hours which time is relevant but if is just a few minutes... 





* This is still a work in progress

Project obj

 

Variables are divided in :

  •  Hierarquy variables, 
  •  CSS inherit 
  •  Prototyping.


Lets assume that the variable "project name" is always "project_name".  We could start writing functionality for a project that even don't exist at the moment. We just need the "global_variables.h" file.

Example:

    This game have some kind of new functionality. We assume that we can start linking project width project_name variable and adding new functionality to the character : character_name, character_attributes_x;

This how project file tool is looking like, how we map the hole thing width variables and start building the structure. All variables are global. We can't collide variables names.   

char project_name;
char project_language;
char project_type;
char project_files;
char project_functions;
char project_variables;
char project_folders;
char project_folder_structure;
char project_language;
char project_modules;
char project_author;
char project_contact;
char project_license;
char project_published;
char project_links;
char project_library's;
char project_snippets;
char project_compiler;
char project_articles;
char project_themes;
char project_templates;
char project_maps; // or levels
char project_images;
char project_fonts;
char project_sounds;
char project_3dmodels;
char project_divs;
 

char project_file = '\..\dtr\project.txt';
char project_index; //project array index to map the project DTR file





Objects in procedural

Show the work in the interface.

For example in the interface we have several elements:

-menu
-button
-box (html for example, use: list, div, span, ul, etc...)
-interface
-etc...

people can separate in to how many fragments they want.

What i did is convert it in to a object to avoid repetition:

int property_id;
int property_name;
int property_title;
int property_button;
int property_background_color;
int property_3d_model;
int property_padding;
int property_margin;
int property_pos_x;
int property_pos_y;
int property_pos_z;
int property_clickable;
int property_image;

to avoid :

button_image;
button_padding;
...
menu_image;
menu_padding;
...

We have only one element, because we are going to repeat our self's if we create a button, with background color, then a menu with background color, then a interface with background color and so on...

if it lather creates over complex syntax output on code we can always use snippets and leave our code unrepeated or with no repetitions.

Character P.Object



Lets say we want to add a shop in C++:

get the game, standard variables:
[code]
extern char character;
extern int character_id;
extern char character_name[2];
extern int character_age;
extern char character_gender;
extern char character_title;
extern char character_image;
extern int character_3d_model;
extern int character_inventory;
extern int character_items[100]; //link
extern int character_spells[100]; //link
extern int character_abilitys[100]; //link
extern int character_status;
char character_race;
char character_type; // Npc, player
int character_inventory_size;
char character_background; // History
char character_family; // History

char character_language;
char character_language_list = {"common", "orcish"};

int character_health;
int character_max_health;
int character_mana;
int character_max_mana;
int character_stamina;
int character_max_stamina;
int character_damage[2]; // min, max
int character_level;
int character_level_value;
float character_level_up = 0.3;
int character_level_up =
int character_level_ = 0.2;
int character_xp;
int character_xp_level_up;

int shop_id;
int shop_name;
char shop_npc;
int shop_money;
int shop_timer;
int shop_time;
char shop_items;
int shop_slots;
int shop_menus;

int item_id;
extern char items[];
int item_name;
int item_menu[100];

[/code]

How it looks in objects :

new object = shop;
new object = character;
new object = item;

shop->interface;
shop->load_items;
shop->buy;
shop->sell;

character->money;
character->status;
character->unequip;

item->effect;

game interface procedural;

A costume object in this. It alter the state of variables.  Width out affecting the code. You only need the standard variables.

In next version they will be in just one file for better readability.

To store in this case you may need the costume storage or save, or you can build yours.

in this case, character_array_index; It have the "register" or "matrix" for the save. It will also be global.

is not that hard. Main is a bit confusing, but it is suppose to be like MVC, you load stuff in to it. You can even have a file
width this objects, and load/#include the file. It to your zone or city to buy.

Study? Not that much, since main is modular, you can use it, width out any more code.

Thursday, February 29, 2024

Pseudo Object on SQL Built in a stack library




SQL_connection = db_conection;
SQL_db = the box;
SQL_rows = user_name, user_id;
SQL_ext = mysql;
SQL_command = select;
SQL_amount = *;
SQL_result ;
SQL_rows_join = user_apps;

if (SQL_query())
{

}
 else  if (ut_sql())
   {
   }
else if
   help_info_sql(){
}


If the SQL query fails it runs the unit test, also adding a new step to unit tests (the help info), depending on the error's that the unit test detects we get help information. Lets say this example : that unit test detects a invalid row, it says one or more rows invalid, but that does not fix the error. so the help info will get information based on the error for us. Instead or prevent us from going to the db to check it. we get the rows that are there associated width the call. so that we can see directly in the code where is the error.

This is possible because we fragmented the code or command in to parts.

let see how it evolve... Think all code and our knowledge is evolving.

Saturday, August 12, 2023

Standard Map Script

 One of the main thing missing in game development is a standard map design language. like CSS have done to web page development. We missing one for game development.

Lets look at it to analise rationaly:

Game development start around 1970 so we have what? Like 50 years of game development. If we have start to desing the maps in a standard language or script. Your game done in 70's could be working today width minimal efford. The engine it self does not matter because you can translate the map script to any language. Is a script that works outside of the language. So from the 70s up today how many engines have come out and languages many?  We have several examples of old languages like C and Assembly and more recent examples like Rust and Python:

  • -Python
  • -C++
  • -C
  • -C#
  • Java
  • Assembly
  • Rust
  • etc... 

 All this languages can communicate width a map scripting language. what this allow :

  • You can keep developing your game even if a new engine come out.
  • Can design width out the need to program.
  • If your computer is broken often this engines are large and consume a lot of resurces. You can go to a public computer or a friend house to keep development width out installing any thing. 
  • Only a friend have a paid license of the softwarea and it cost a lot.
  • Need to change the programing language.
  • You can design just width a map editor width out the need of the game engine.
These reasons are more then enought to consider using a standard map scripting.

We have many generic rules but some rules that i created are done to resume or remove redudancy out of the code like clone and object. This ensure that the amount of text is small. We have also basic ations like position and size.

A simplified list:

  • Clone -
  • Object -
  • position - 0.100.0
  • extension - fbx
  • size - 200.20
  • direction - north
  • Type - texture
  • property - hidden

Generic map settings  examples :

  • Extension - fbx

Generic atributes can be inherit. Like if you declare a extension at general settings it assume all files are fbx unless it is redeclared again like CSS. Files structures to include to all of your map files. like :  creatures, weapons, items,.Since all maps use creatures weapons and items. Theres no need to repeat the calling of these items in all map files.

  • Folder - data
  • size - 200\20
  • group - base 1
  • width - 400
  • height - 400
  • deep - 2000
  • background - black
  • sky - clouds
  • terrain - heigh map
  • gravity - yes
  • include - creatures, weapons, items,
  • Version - 1.0
  • type - 3d


If we define things like background color inside the script it make it easy to convert this things later in programming.
  • background - black

Atribute Examples :

Object   :  If a object is designed to a 3d model is treated like a identity. Which we can spwan in several diferent locations. In this case we created 4 objects. width 4 diferent locations we could also add difernt sizes but since they are the same only need to declare once.

name - tower
position - 0.100.0 , 0.100.0 , 0.100.0 , 0.100.0 ,
size - 100.20
objects - 4

Clone  :  Allow to repeat the same model to creat other effects. like a several layer building.

name - 3 level building 
position - 0.100.0
size - 100
clone - 3
direction - up

Object + Clone  :  Clone the 3 layers and repeated the building in 2 diferent locations


name -3 levels building 
position - 0.100.0,  0.400.0 ,
size - 100
clone - 3
direction - up
objects - 2

And more complex things still analizing like we could add curves and random

Saturday, June 24, 2023

DTR & Data Verifier


Add the Data verifier component to the DTR.

When we add something we can also check for errors. Is still a bit messy but is a evolution from the Normal DTR which we just add data. In here we also recived the option to check. So the data can add all kind of things to it. 

It add's a layer in separeting "settings from logic". Which is a objective of the software\project.

We can see in the image that our characters do not need to have data base information associated. But in this way we can also check if every thing is accurate before entering the software.

The logic can be choosen by the developer. In here is just to serve as an example. Not forcing any method like in some frame works they have this established logic from objects to database and view like in the MVC frameworks.

Instead it have a list of possible verifications we can do. Is possible to verify: files, paths, rows, data, data types, etc... if any error accure since we are one step before the software we can present alternatives or solutions to fix the error.

Think this could be use in most projects. Because the tool does not have dependencys by it self. You can plan your project in the tool width the logic that you want or from your project then if no errors occur you can either use this file format or convert it to another.

 if you use this format you have the rest of the tools that work it. But is nice to have the option to make it work width other tools. We don't know what kind of languages and projects need it. The good aspects of open source.


Monday, June 19, 2023

Tool : DTR & First tool

The information is stored in a text format DTR (Database format text Reader)


It work with an internal mini Database within the software without resorting to very heavy database software. Information is Link  by keys. The prog will fetch all "skills" that have the same character id. The skill keeps track of what character this skill corresponds to.


Characters_index_keys : 

  • Character_id, 
  • Character_name, 
  • Biografy_id, 
  • Skill_id, 
  • Spells_id, 
  • Items_id, 
  • Weapons_id, 
  • Status_id;

skills_index_keys = character_id, skill_name, ability, tags, targets;

Normally this is how Databases work what I did was convert that method to .txt files. The character.txt file is related to the skills.txt file. Will avoid too much processing time will + direct no information.

"Will be available in the next version: The Box 1.x"

Think this will be the first tool

Because it will have the structure for the other things. For example the hole project structure will lay on top of this mechanics. Since C is a compiladed language and not a script language we can't make changes on the fly. So for that is much better to get the values from files and create a dinamic mecanism to work width it.

Bit wierd why develop PHP when you can do it in C width a dinamic information coming from files. It will do the same you manipulate values on the fly. The diference is that you can see the machanisms that do this things.

It will remove the need to use extra languages like Javascript\Css\Html\etc... You have every thing incide just one language and the data files.

The planning is probably much bigger then PHP while in PHP you pump the functions and just need to update you can see in here the planning is going for a couple of years now. But the end result will be much better.

Dinamic Text structures

For what i see to make this work we need to make dinamic text structure. Which will represent other things lather.

  • New connections
  • Represent data
  • Represent functions
  • Make calls
  • create new structures 
  • ...

work in progress

Monday, June 5, 2023

Programming Philosophy

Software principles :

  • The concept for this programming philosophy is that all variables are gobal. This is done to avoid messing around in changing things around lather.
  • Stack librarys are a type of library used to incorporate large blocks of code which replaces functions. They are mainly loops which have capability to perform dinamic functions. Are not as slow as functions but still dinamic enough to be used.
  • Files inherit parts from other files. Like the standard_variables or functions.
  • The evolution to the CSS coding style. Allow to deppen the use of the global variables
  • Now seeing the possibility of more costume files. But this kind contracti the principle of inheritence of the philosofy. (Like having a string.h vs standard_variables.h)
  • More things can be standard not only variables. Like templates and files but of course they  depend on variables like a standard template in the end is standard variable.
  • The style uses underscore "_" to separate names.
  • In standard variables The first name should not be abbreviation IMG_jpg image_jpg.
  • Why not use imageJpg. The pros is that is true it creates dinamic which may be better to read. The cons is that if one day forget a Upper case is extremly hard to see it. That's the main reason i abbandon this pratice. Some fonts don't separete that well upper and lower letters. And the representation for a space in computer language is the sign "_" underscore. The main reason is to minimize errors.



Standard programming names

Workspace


OOP vs C


If you read this tutorial it have the error.  variables out side main declared as extern. which for what this expert say does nothing. Logically is saying i will receive a value if there is one, since none was declared previously it receive nothing. : https://www.tutorialspoint.com/cprogramming/c_variables.htm


------------------





[code]
typedef int to integer. [/code]

not sure if we really need this step, or that much text because then you have another problem of to much text, to few not readable to much also can cause problems.

------------------


We can simulate oop width static which restricts a function or a variable just to one file. For fans of oop we can achieve something like that in C



file1.c
static var1
static function1(){}

file2.c
static var1
static function1(){}

same stuff is redeclared.





Project administration & Media Fire


Preferring "Media fire" over other projects, 

like Github:

  •  you have to upload file 1 by 1 which is very pre history for computares and software capability today.
  •  Another issue you can't have empty folders or move large amount of files in your project, you have to move them 1 by one.
  •  Can't delete folders, you have to remove files for it to disappear. 
  • And you guessing how you remove files in there for it to disappear? Maybe you guesses correctly again you have to remove files 1 by 1. Insane work! 
  • It is not possible to administrate a large project like this moving files 1 by 1. There is a lot of editing to be done.
  • Why not use the tool for the page? "They maybe attempt to attack again" : why use this wired tool when you have FTP's services for like dozens of years. In computeres that's a lot. Like from the 1920's or so we have FTPS services. 
  • A FTP service is pretty simple stuff you see what is missing and it uploads as simple as that width tons of FTP clients. Which one more advanced then the other.

GitHub It is probably a great tool if you paid but for the free service it "leaves a lot to say about"...

Media fire host like 20% or 30% of files today. which is a lot of all online files content. Very easy to use and they don't even require register to use only to keep files lather.

https://www.mediafire.com/folder/numb2imcdi21c/the_box

 I can say : Media Fire have one of the greatests services in terms of file hosting. Probably number 1.

Planning 3.0 & Tool List


Finishing the 3.0 planning; evolved a bit, from stack librarys which was the style of the web framework, to CSS like code, in to tool abstracting things in this 3.0 version.

 This is to big so some things are a more long therm planning. Others don't plan to give support to all settings. This was the original plan just be able to finish planning and see what will happen. 

 But now frameworks are doing a lot. Reading some things on GTK 4.6 it give support to full applications in Gnome enviorment. If you need to do a web browser to your application you can do it in GTK 4 pretty potent aplication to be able to do all that. A couple years a go the development of a web browser as a highly complex task...

-----

Another standard we are starting to witness is the funcionality standard. For example if we know that most if not all games have a character. We can start creating standard things for this funcionality. 




Tools list and links structure :

  • Editors ->
    • Code Editor.c
    • Text Editor.c

  • Code ->
    • console.c
    • commands.c

  • Structure code ->
    • Components
  • Project ->
    • Admin
    • version.c
    • bug.c
    • tasks.c
  • Management ->
    • dtr.c -> database format text reader. To improve access to information.
    • links.c
    • librarys.c
    • file_browser.c
    • back_office.c
  • Learn ->
    • tutorials.c
  • Web ->
    • Forum : it reflects well the philosophy of the software which is to have tool to automate a great deal of tasks. It allow to administrate forums in a much more robust way.
    • Social
    • Chat
    • Market
  • Servers ->
    • FTP
    • MySql
  • structure.c -> the structure mecanics develop, is not related to the general structural filosofy of the box, but a dedicated tool to handle things.
  • projects_web.c
  • Lore ->
    • Characters
    • Spells
    • Items
    • Weapons
  • Tests ->
    • Unit Tests




  • Open Files

    • * support to open source files and standardization. So that apps can communicate better

    • DB - Access to a more losse Database designs
    • Animations - open source animations, so that can be reused.
    • 3D models - other info related not only to 3D model
    • projects - access to open source project file design
    • map - standard maps & open source acess

  • Hierarquy

    • Standard & prototypes - Manage variables, Projects, functions, names, Linux Distributions; joining tasks, prototypes

  • Project

    • Project - administrate the project, create, edit, (->relations)
    • Relations - Control the relations of what file is doing what, Types of files, overview
    • administrate project - Do large scale administrative goals for the project.
    • Updates script - tool to manage updatates abstaction language for projects.
    • Merge Projects - Merge similar projects, to set new objectives, need structure to detect stuff installed.
    • paths - Settings for the project
    • Projects On online - Access to project information, in a better way then search for information (updates, reviews, comments, etc)
    • Pay - Pay small subscriptions to projects, or do donations. Pay small subscriptions to projects, or do donations.
    • Updates -
    • Requests
    • Feedback -

  • View

    • File Browser - Organize projects better width costume file viwer; categories and detailed information.
    • Shortcuts - manage shortcuts in the computer in a abstracted way.
    • Search tool - Advanced search behaviors
    • Dependencys - for what files are relation to, display of the hierarquy.
    • Web Browser - Load Html web pages inside the software

  • Base

    • DTR - Database format text reader - high performance access to text & abstractions.
    • Encrypt tool - Encrypt information from other tools.
    • Version - Manage software diferent versions, comments and requests.
    • Updates - Control updates to files, folders or project. Can work online.
    • Translation  - Manage translations for all kinds of things
    • programing

  • ABSTRACTED TOOLS

    • Themes - Abstracted, Organize information by themes
    • Labels tool - Abstracted, labels to inherit throw out other things(ex->code editor)
    • Favorites Tool - manage local links in the computer and projects also for other tools a centralized way to manage local links.
    • Notes - Abstract, notes (->calander->links) Create notes to add to diferent parts or tools, instead of having notes in all things, just one centralized note.
    • Categories - Abstract,  Manage categories, for diferents things in for tools Tags format.
    • Groups - Create groups
    • Paths - Abstraction and managment of paths for other things.
    • Connections - Create connections between things.
    • Saves - Save sessions, games, maps, etc...
    • Format - Format files to any thing

  • AUTOMATE TOOLS

    • Console -comands using the load and unload method
    • Commands - List of commands, for diferent software, can used width calander
    • The box script - to manage web pages
    • Language scripting - Script using natural language, abstraction (not real)
    • TBP - The box programming language (long therm thing)
    • Classes Manager - Objects administraction development
    • Function Tool - Automate functions, Load functions in to the tool and test them (functions, variab
    • Structure - installed stuff via build and deconstruct.
    • Modules - Administrate in a modules format ->module : video player, audio player.
    • Templates - (Load templates in to the modules, interact from modules width templates, (change, edit, load, interfaces,)
    • Prototype - Create prototypes for any thing write load packages to speed development. Includes stuff from other tools
    • Install Tool - like Make but  visual to see dependencys and manage how things are instaled create. Will work width make if possible.
    • Snyppets - Code Manager, comments, updatable code pieces.
    • Sheets - Use cells width functions
    • Bases frames - Base frames a base, we can create a tool to manage them. For example RTS base, RPG, etc...
    • AI - Create behaviors or bots. Inter link : Console, Comands, tasks, calender

  • Management

    • Calander - Organize or Schedule thinks by dates.
    • Tasks - (->project, )
    • GIT - Management for project files in a team format; Manage project online
    • Email - Email reader, incorpurated in to the mensage system
    • Contacts - Misc list of contacts (email, social, ids, blogs, etc...)
    • Links - Costumized information on links, shared the costumized information online, view by rank or normal, Can automate tasks width other, like send emails, cards, etc...
    • Tutorials - (links comments) Connect comments in tools like manual or design document tool. information from information tool.
    • information - general information, integrate text web pages.
    • Librarys - group links or files for game development
    • File Manager - Keep track of relevante files Tool, administrate files
    • Page Manager - Manage the content of pages
    • Links manager - Administraction of links for web pages what which page is doing inside the Box. To prevent 2 equal links.
    • OS Manager - Manage operating distributions sistem structure, files, librarys, install etc...
    • Backoffice - Manage your projects by adding a back office, to extend current box administraction.
    • Network manager - Manage who see what, user privileges.
    • Folder structure - Add notes to folders to administratre projects.

  • Social

    • Play List - Most liked music. list organized music & video or misc.
    • TV/Radio - Plays but organized width people most like.
    • Emulator - Maybe is possible to connect width other things

  • Testing

    • Bug track -(-> os. tool) Report, register and control bugs, link bugs.
    • Calculator RPG - (->lore->game design) calculate game things, can load functions
    • Battle Simulator - Load basic status
    • Game Simulator - Load parts of the game.
    • Test tool - Unit Test, Regular test, Function test, Object test, file tests.
    • Fragment Load -  Load only the linked parts of the program, this creates a discentralized system to test your game.
    • Pre compile - A pre compiler step to check if every thing is ok. It works width things installed in structure. Should also be able to set a compiler in the IDE.
    • Tiles Isometric - Tile Edit projects
    • 3D engine - Run the project 3D game only (open GL) will be suported. Maybe we could develop a non compiled version like PHP just to check stuff.

  • GAME

    • Talks -  manage the npc/bot talks text
    • Script - Create scripts 
    • Animation - Create animation in a standard file format
    • Maps editor - Edit map in a standard file format
    • Shadder - Admin shadders in a proper tool
    • Textures - Admin textures in a proper tool
    • Network - Abstract network for game
    • Tiles engine - Run a tile project
    • 3D engine - Run a 3D project
    • 2D engine - Run 2D project

  • Design

    • Game Design manual - Inter active manual (->talks->lore)
    • Lore - Names (generator), Historys, Characters, items, dungeons, heros, races; view online, include in to a project (add, delete, edit, post online). (->talks->lore) or information parts
    • Manuals - (->classes)

  • System

    • Auth tool - autenticate, Inscription or Register to any kind of thing. Events, groups. Create one login register tool for all aplications.
    • Servers  - Have ready servers to do tasks. Mysql/FTP/WEB/Torrents/Files/game network/stream/IRC/Chat/ show online servers.
    • Mensage system - Create a more standard comunication mensage sistem. Based on security.
    • Administration - Manage content, relations, users, priveliges
    • Downloader - Manage downloads lia land integrate them width other tools
    • Torrents - Once we made some things we can post your things online for your network in a torrent format. Or public.

  • Security

    • Guardian - Since the software allow high level tasks we will have a costume firewall to monitor all this kind of actions. Register of suspicius actions. Action Patterns.
    • The Gate - Control permissions to files.
    • TB script - A script that have security measures inputed.

  • Editors

    • 2D editor - Simple edition to update speed tasks
    • Font Editor - Create, edit, and access free fonts
    • Logo Editor - Create logos width a simplified tool
    • Code Editor - Link things direct in to code
    • Text Editor - Edit text files
    • Database  - Graphic handle db extensions interface (->project->structure>)  Manipulate the database.
    • Video/audio editor - Small edition of audio end video so that the developer can have video done for his project.
    • 3D objects create /Editor - Create 3D objects based on shapes & algoritms
    • Page Editor/publisher - If you put your project in projects online then you can create a page
    • for it. Do easy updates
    • Tiles editor - Tile Edit projects
    • Menu editor - Edit in graphical or in text the graphical part of a software.
    • Assembly Tool - Manage assembly code.

  • Pages

    • Health - A tool dedicated to shared healp tips
    • Invoices - A tool to process them for the sales
    • Material - Materials for houses.
    • Servers - file,  Software to administrate a file server.
    • Micro - A tool for microphone talk, shared, record, etc...
    • knowledge tool  - A tool to manage knowledge and share it width other people. Exchange of seeds, explore cientific studys (Aggro Culture / cientify Lab)

  • WEB TOOLS

    • Chat - Talk tool, advanced IRC
    • Mensage System - A more robust mensage system inside the software.
    • Gallery - display gallerys by themes
    • Page - Update your page width new things and connect them to the network. Also inside the software pages will be full 3D. Maybe   create a standard 3D pack, so the downloads times are not to heavy.
    • Software rate - rated software, to show the best projects.
    • Requests - Ask funcionality for diferent kinds
    • Categories -  Create categories to administrate content
    • Post Manager - Manage post already made.
    • Article writte - Social tool to show to all people the things that you writte. (->themes)
    • Servers Online - Display all kind of servers
    • Market - Post your production to sell/buy advertise things.
    • Tournaments - A open source tool to create your own tournaments and publishe them. So other people can see them
    • mails - Access mail service in the software
    • web Services - automate add services forum/wiki/irc/pages/Server/Emails/Payshop/mensages
    • Tutorials Online - Manage tutorials that people post.
    • Open project - Manage open projects not just for software.
    • Portfolio - Display your skills
    • Game Manager - Like tournament tool, but much more limited
    • Streaming - used for dating, games or video chats. (->dating)
    • Courses - Create and prepare classes online or offline.
    • Companys - Page companys, teams, groups,
    • Curriculum - Manage your professional expirience, find contacts.

  • WEB

    • Debate - Debate topics in a group, width tools connected
    • Comunity's - Themes management
    • Teams online - To keep track on members/recruit/news
    • Dating - Free Access to dates sistem
    • Renting - Renting is a high cost activity when is just a simple service. 
    • News - Select the most relevante news
    • Books Online - Post your book to the community
    • Culture tool - Organize culture for people
    • Transportation - Organize shared transportation or delivers for some of the products posted.
    • Cientific Lab - Access cientific research and easy shared width other.
    • Events - Create events for any kind of activity that will be shared to the networks or wall of the software.
    • Cooperation - Cooperate width others in any kind of projects. Admninistrat
    • Quiz - Social app for aquire knowledge.
    • Contest - Create prizes for contests. If you want to organize a local contest and instead of hard raise all the sponsores can use the tool to help organize things and contacts.
    • Causes - Accompany problems that people may have.
    • Employment - Tool to advertise your jobs offers.
    • Internship - Search companys that are looking to integrate intern people.
    • Promotions - Organize promotions
    • Payments - Make payments to allow for the market to work
    • Paid content - To organize a large project you may wish to get first sponcers, the tool help show the project and getter donators.

hi

Odin Programming & array programming

 At their site or in the manual we can read array programming which is something is heavly used in PHP. Think one of the best things to use....