The Box, development tool, "Structural programming"

Re: The Box, development tool, "Structural programming"

Postby jdc » 15 Dec 2017, 15:22

the dependency theory part II: File Manager

*note: this post is a bit messy din't like the end result maybe update it lather or remake.

We debated the A.I. in previous "chapters", or posts, so now we can see that applying in some way.

The dependency's can be lather altered and moved around width a program, the concept is still very rudimentary, but can lather add more stuff like : the AI structure. Maybe a AI manager that will handle file manager and variable manager at another lever for us to minimizing errors.

We could handle the dependency that our programming structure have with, for example: we need to remove JPG dependency for our program.

The program should or will allow to add and remove dependency snippets, like grab and drop tool.

Can you remember where all those dependency's are? Probably not, even if you do you still have to search all files by hand inside which is a tedious task to do.

Lather on if we need to add or remove stuff, it can be done with a couple of clicks and not search inside files, or remember where stuff is. Which withdraw any possible help that a person can get in to a project, because not all people are developers of the code.

That is separate in to 2 ways if we can say that. People that are familiar with the internal code and can "move around" and others that have no knowledge of the internal and just want to extend some kind of functionality.

Well to extend they need to know how the internal is working in order to know the dependency's. In this case we have to 2 ways of doing that one with the external program, and another inside the code. In a way the 2 are inter depended of one another. If that doses not happen inside the code can't be lather automated in the program, because it have no knowledge of that. It need some kind of "giant" AI memory structure just to do that.

In another way if is structured internally can be managed out side, at least in a easy way.

file_manager.jpg


"this stuff remove redundancy and errors from the code and allow automation in creation templates and game projects "
jdc
 
Posts: 44
Joined: 29 Jun 2017, 16:48

Re: The Box, development tool, "Structural programming"

Postby jdc » 16 Dec 2017, 19:31

User Feedback Replay

I will not replay to any one in personal especially if they are making personal attacks. But to analyse the unfounded criticism.

The dependency's in C worke's just fine was they hold do. PHP if build in C strangely if it not work also in C.

Main.c :

{l Code}: {l Select All Code}
#include <stdio.h>

#include "variables_interface.c"

int main(int argc, char **argv){ //

   //#include "interface.h"

   int interface = 3;

   //printf(a);

   //#include "interface2.c"

   if(interface == 2){
         //printf("Interface2");
         #include "interface2.c"
   }
   else if(interface == 3){
         //printf("Interface3");
         #include "interface3.c"
   }

    return 0;
}


interface2.c :

{l Code}: {l Select All Code}
#include <stdio.h>
printf("Interface2");


interface3.c :

{l Code}: {l Select All Code}
#include <stdio.h>
printf("Interface3");


variables_interface.c :

{l Code}: {l Select All Code}
int a = "texto do ficheiro variables interface";


This concludes : The scoop of a library in a header format or a .h file is just the file it is attach to.

The "#include <stdio.h>" to make the printf work though is included on main file did not work in other included files.

But the #include "variables_interface.c" , "a" variable was available in our interface files.

In order for the printf to work it needed to included a <stdio.h>, in separate...

But if you include a .c file in to another .c file scoop or environment of the "stuff" loaded is all the application. In another way: is accessible the main file where it is included and in sub included files.

Think: To replace standard library scoop just need to replace the extension of those .h files with .c. Don't know if they are accessible to public or open source. But if they are don't see how it is a project not doable...

"removed 200 or 300 lines of code in redundancy. If some one new need to study this will make a difference?"
jdc
 
Posts: 44
Joined: 29 Jun 2017, 16:48

Re: The Box, development tool, "Structural programming"

Postby Lyberta » 17 Dec 2017, 01:07

Including C files? Oh, man...
Some crazy person on the Internet.
User avatar
Lyberta
 
Posts: 379
Joined: 19 Jun 2013, 10:45

Re: The Box, development tool, "Structural programming"

Postby jdc » 17 Dec 2017, 05:43

Found this introduction to C, it speaks of the benefits of using C.

If any one want to help or follow there are instruction on how to start using C, with Codeblocks. Very easy to set up.

https://www.programiz.com/c-programming

The article speaks that C, is cross platform, probably is one of the reasons it was adopted in Linux. It was not:
Linus stubbornness
- Lyberta.
jdc
 
Posts: 44
Joined: 29 Jun 2017, 16:48

Re: The Box, development tool, "Structural programming"

Postby Julius » 17 Dec 2017, 08:27

“You never change things by fighting the existing reality. To change something, build a new model that makes the existing model obsolete” - Buckminster Fuller
User avatar
Julius
Community Moderator
 
Posts: 2142
Joined: 06 Dec 2009, 14:02

Re: The Box, development tool, "Structural programming"

Postby jdc » 17 Dec 2017, 13:24

Some one hacked in to the free game dev forum account basically only changed password.

Made a backup of the forum post just in case some on try to mess around again. Maybe build a Manual with that information.

It seems there was no data loss or weird messages, posted...

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

Julius :

I'm a big fan of new languages, but the issue is that C already have a lot of code produced and establish can you imagine re-writting all that stuff again. That's the main obstacle in that. Better to update C with new functionality, like PHP does and in time "discontinue" stuff. One time they removed some stuff that was being used need to re-write a lot of
again.

But the issue is to delegate to much in to the programming language and to less with the interface functions. You can always have stuff done manually inside your program. For example code templates, etc...
jdc
 
Posts: 44
Joined: 29 Jun 2017, 16:48

Re: The Box, development tool, "Structural programming"

Postby Lyberta » 17 Dec 2017, 17:25

Julius {l Wrote}:Rust will replace C/C++ anyway :p

https://blogs.gnome.org/uraeus/2017/12/ ... -for-2018/


Rust fixed pretty much all of C mistakes. Now I hope someone will fork it to make Rust++ which will fix C++ and it will be the best (but not perfect) language.
Some crazy person on the Internet.
User avatar
Lyberta
 
Posts: 379
Joined: 19 Jun 2013, 10:45

Re: The Box, development tool, "Structural programming"

Postby jdc » 18 Dec 2017, 15:14

Follow along Post :

My digging in C as promised.

What are modules :

http://www.dummies.com/programming/c/ho ... ogramming/

Strings :

This sounds a bit redundant in theory but when you get to practice is a completed different thing from other languages.

"Pointers in a way are a loose way of using strings."

Basic usage of string - https://www.tutorialspoint.com/cprogram ... trings.htm

More on string usages - https://softwareengineering.stackexchan ... d-practice

Comparing usages - https://stackoverflow.com/questions/873 ... rings-in-c

A Generic Linking of files :

https://stackoverflow.com/questions/143 ... urce-files
jdc
 
Posts: 44
Joined: 29 Jun 2017, 16:48

Re: The Box, development tool, "Structural programming"

Postby Lyberta » 18 Dec 2017, 21:58

Are you really learning how to link 2 C files together?
Some crazy person on the Internet.
User avatar
Lyberta
 
Posts: 379
Joined: 19 Jun 2013, 10:45

Re: The Box, development tool, "Structural programming"

Postby jdc » 19 Dec 2017, 12:57

why to you ask that?
jdc
 
Posts: 44
Joined: 29 Jun 2017, 16:48

Re: The Box, development tool, "Structural programming"

Postby jdc » 19 Dec 2017, 13:27

External Librarys : gtkradiant

People were debating the relevance of using C in this days. Here we have a actual and good open source project, which can be used in a stand alone or some parts could be integrated in to The Box Tool.

http://icculus.org/gtkradiant/installation.html

Converting gtkradiant map to unity 3D.

https://www.youtube.com/watch?v=n1lZvDmh1Mg

Git Hub i added a copy to the project, any way to project folder.

https://github.com/TTimo/GtkRadiant

Another project to take a look also added to the project folder the source of Quake 3:

https://github.com/ioquake/ioq3
jdc
 
Posts: 44
Joined: 29 Jun 2017, 16:48

Re: The Box, development tool, "Structural programming"

Postby jdc » 21 Dec 2017, 05:09

Implemantion theory

note : found this project which may help put more open source project in to the The box folder. Lather when i have time i will add more projects.

https://osgameclones.com/

"My fighting game which i'm developing for example found open source fighting game in there "One most fall". A game with a lot of fans..."

A replay to lyberta and samerson this guy at libre engine have a good one for you people:

Duion {l Wrote}:
Why you want to develop another engine?


Farrer {l Wrote}: And why not? ... Keep it up climjark, and don't let those "why doesn't you do what I think is better for you to do" discourage you. Do what *you* believe is worth for you to do.


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

Let's analyse this SDL code to declare a window. This code in theory looks grate, and this people at SDL probably put a lot of afford in to developing it. But is not that good for our program, because it work's in a kind of pipeline, and this code already start to nesting dependency's.

{l Code}: {l Select All Code}
 SDL_Window *window;                    // Declare a window
  SDL_Renderer *renderer;                // Declare a renderer
 
  SDL_Init(SDL_INIT_VIDEO);              // Initialize SDL2
 
 
  //Create an application window with the following settings:
 
  window = SDL_CreateWindow("Game Window",                     // window title
                            SDL_WINDOWPOS_UNDEFINED,           // initial x position
                            SDL_WINDOWPOS_UNDEFINED,           // initial y position
                            640,                               // width, in pixels
                            480,                               // height, in pixels
                            0                                  // flags
                            );
  renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_ACCELERATED);

  SDL_RenderSetLogicalSize(renderer, 320, 240);

 
  SDL_Surface *sheet = IMG_Load("sheet.png");
 
  if(!sheet)
  {
    printf("Cannot find sheet\n");
    return 1;
  }
 
  man.sheetTexture = SDL_CreateTextureFromSurface(renderer, sheet); 
  SDL_FreeSurface(sheet);
 
  //load enemy
 
  sheet = IMG_Load("badman_sheet.png");
  if(!sheet)
  {
    printf("Cannot find sheet\n");
    return 1;
  }
 
  enemy.sheetTexture = SDL_CreateTextureFromSurface(renderer, sheet); 
  SDL_FreeSurface(sheet); 

  //load the bg 
 
  SDL_Surface *bg = IMG_Load("background.png");
 
  if(!sheet)
  {
    printf("Cannot find background\n");
    return 1;
  }

  backgroundTexture = SDL_CreateTextureFromSurface(renderer, bg);
  SDL_FreeSurface(bg);

  //load the bullet
 
  SDL_Surface *bullet = IMG_Load("bullet.png");
 
  if(!bullet)
  {
    printf("Cannot find bullet\n");
    return 1;
  }

  bulletTexture = SDL_CreateTextureFromSurface(renderer, bullet);
  SDL_FreeSurface(bullet);
 
  // The window is open: enter program loop (see SDL_PollEvent)
  int done = 0;
 
  //Event loop
  while(!done)
  {
    //Check for events
    done = processEvents(window, &man);
   
    //Update logic
    updateLogic(&man);
   
    //Render display
    doRender(renderer, &man);
   
    //don't burn up the CPU
    SDL_Delay(10);
  }
 
 
  // Close and destroy the window
  SDL_DestroyWindow(window);
  SDL_DestroyRenderer(renderer);
  SDL_DestroyTexture(man.sheetTexture);
  SDL_DestroyTexture(backgroundTexture);
  SDL_DestroyTexture(bulletTexture);
  SDL_DestroyTexture(enemy.sheetTexture);
 
  for(int i = 0; i < MAX_BULLETS; i++)
    removeBullet(i);
 
  // Clean up
  SDL_Quit();


A example of the "pipeline" which is created :

/* SYSTEM LIBRARY */

#include "error.c"
#include "string.c"
#include "paths.c"
#include "file.c"
#include "database.c"
#include "image.c"
#include "image_png.c"


The "file.c" generates errors? If it does then error.c most come above "file.c". Another example : "image.c" uses "Parths.c" ? Then it most have available paths. It uses a inheritance system.

A example of paths file :

{l Code}: {l Select All Code}
char path;
char string_length;
int path_length;
int extension_length;
 char extension;


Once is initialize other files will have a path variable available. That removes the need to passing variables in to functions. Which at first look does not seem but i creates a lot of redundancy.

"IMG_Load("bullet.png");"

This function is not standardized with the "pipeline" or inheritance which means we can't de copulate, simplify or remove redundancy lather. That's the main problem in using other engines library's code. Though i mention in the beginning. It is in theory in practice it may not work that well.

Another example :

{l Code}: {l Select All Code}
   /* SYSTEM LIBRARY */
   
   #include "colors.c"
   #include "image.c"
   #include "image_png.c
"


Let's say we are inheriting a color structure. Then it can't inherit so it will be very complex to work with pre build library's that are not standardize with this way of inheritance. They do to much inside one file, or they do to little and receive no inheritance.

This will lead to more code? It lead to less code the so called dynamic code, it uses much more stuff. For example the variable of the loop : "for" which people seam to like "i" to represent a increment, is declared once in main and all files receive that variable. I was reading throw "leaps of suna" code and they declare this variable hundreds of times, for example.

{l Code}: {l Select All Code}
   /* main.c */
   int i;
"


With out variable inheritance you can't write if and else on the and they handle a lot of stuff. The less functions you use the better less stuff goes to memory.

Our code it will end up by looking like files with a simple if and else statements structure with only 100 or 200 lines of code. But in case of C that may be a bit bigger since is lower level language.
jdc
 
Posts: 44
Joined: 29 Jun 2017, 16:48

Re: The Box, development tool, "Structural programming"

Postby farrer » 21 Dec 2017, 11:02

I was going to just ignore this thread (which for me is at the edge of spamming), but since jdc quoted something I've said, I have a question:

What is your goal, jdc? You are just flooding with a lot of nonsensical affirmations, with quick mock-up images and barely related "code". From:

jdc {l Wrote}:A replay to lyberta and samerson this guy at libre engine have a good one for you people:

Duion {l Wrote}:
Why you want to develop another engine?


Farrer {l Wrote}: And why not? ... Keep it up climjark, and don't let those "why doesn't you do what I think is better for you to do" discourage you. Do what *you* believe is worth for you to do.



would led to the conclusion that you are writing a game engine. But, from your previous posts, your are saying something like you're building a "create-all-games-with-few-clicks-with-all-libraries-embeded-on-it-by-your-bizarre-view-of-code-management" engine. Nothing wrong with that. If you believe you can and are right, go on... But, instead of actually coding it, you are posting "ideas" and, when someone say to you that these "ideas" maybe aren't good or viable, you instead of trying to show they're wrong (either implementing it or showing how to implement it), you just flood more and more quick-melted non-sense (Dada would be proud of you, believe me).

Anyway, if you are just not simple spamming (which in my view you are), better than just flooding non-sense here would be try to start implement some of your "ideas" on a public repository and show yourself some progress. At the state it is now, it barely qualifies for being at "Showcase & Collaboration", and could led some of us to some conclusions, specially when you revive part of a old thread with a discussion with someone that got temporally banned.

No one is saying you to not progress on what you believe you can, but instead of doing something on that way, or even trying to understand what others here tried to explain to you, you are just, again, flooding with more non-sense and implementing nothing.

Go code, and good luck.
User avatar
farrer
 
Posts: 87
Joined: 24 Feb 2014, 21:00

Re: The Box, development tool, "Structural programming"

Postby jdc » 21 Dec 2017, 15:43

Thanks for the replay I appreciated constructive criticism.

Was about not to replay nothing then i though : You think i'm the banned person?

Naaaaaaaaa.

Just like to have things done my way...

Data? I'm kind of a autistic can handle the same kind of DATA was DATA . Kind off.....

My plans with this stuff next is to debate Python and LUA dependency.

I don't see it was spam...

(that's the second post i lost, maybe have a remember post info?)
jdc
 
Posts: 44
Joined: 29 Jun 2017, 16:48

Re: The Box, development tool, "Structural programming"

Postby jdc » 23 Dec 2017, 09:48

A proper replay since i lost the other one:

Ferrer If you consider it as spam you can ignore it as I done width some people. If the admins think it's spam they are the ones to mention is not your place to accuse people of being autistic, or spammers. In fact that is disrespecting forums rules of good conduct and respect for others.

"You don't replay to people"


If i din't replay is because some one is being ignored.

People that come and mention :

"we the coders" or "people are watching"


they speak by other's. I can't take this people serious. They suffer some kind of mental delusion?

Ferrer "Put your code in a public repository"


it's on google drive. In case you fail to saw that.

If you have more crazy accusations send them to the admins. They are the ones to handle that kind of situations?
jdc
 
Posts: 44
Joined: 29 Jun 2017, 16:48

Re: The Box, development tool, "Structural programming"

Postby Julius » 23 Dec 2017, 12:07

jdc {l Wrote}:If you have more crazy accusations send them to the admins. They are the ones to handle that kind of situations?


Not so crazy... this is borderline spam. Just keep the volume (of hard to understand) posts down... this forum is neither your notebook nor a personal blog.
“You never change things by fighting the existing reality. To change something, build a new model that makes the existing model obsolete” - Buckminster Fuller
User avatar
Julius
Community Moderator
 
Posts: 2142
Joined: 06 Dec 2009, 14:02

Re: The Box, development tool, "Structural programming"

Postby charlie » 23 Dec 2017, 23:05

jdc {l Wrote}:If i din't replay is because some one is being ignored.

People that come and mention :

"we the coders" or "people are watching"


they speak by other's. I can't take this people serious. They suffer some kind of mental delusion?

Wait, what?

One poster made very good points that indicate you are a novice C programmer, one trying to impart his understanding to others via this project. You completely ignored him. You can't take him seriously? He is deluded?

There's some incredible projection taking place there.
Free Gamer - it's the dogz
Vexi - web UI platform
User avatar
charlie
Global Moderator
 
Posts: 2032
Joined: 02 Dec 2009, 11:56
Location: Manchester, UK

Re: The Box, development tool, "Structural programming"

Postby jdc » 27 Dec 2017, 08:55

Julius:

With this change of position, don't see it the beneficts of having my project posted in the forums, or have it open source.

I will evaluate project status.

The project may no longer be open source.
jdc
 
Posts: 44
Joined: 29 Jun 2017, 16:48

Re: The Box, development tool, "Structural programming"

Postby Lyberta » 27 Dec 2017, 14:39

jdc {l Wrote}:Julius:

With this change of position, don't see it the beneficts of having my project posted in the forums, or have it open source.

I will evaluate project status.

The project may no longer be open source.


Please note if you are going to go proprietary, you will now be competing with stuff such as Unreal Engine, CryEngine and Unity - projects that have team of experts working full time for years on those.
Some crazy person on the Internet.
User avatar
Lyberta
 
Posts: 379
Joined: 19 Jun 2013, 10:45

Re: The Box, development tool, "Structural programming"

Postby jdc » 19 Apr 2018, 08:59

Created a discord channel to debate ideas, to help out, give suggestions, do game design, etc...

https://discordapp.com/invite/Mwgxgzf
jdc
 
Posts: 44
Joined: 29 Jun 2017, 16:48

Re: The Box, development tool, "Structural programming"

Postby jdc » 05 Jun 2018, 06:57

Updates :

- Changed the licence to GPL

How the Software works?

It uses a "mapper" which is a feature above OOP. Basically it map's all our application, so when we write the code once it can be used in OOP or in procedural. The good about this is it can develop a hole application in assembly with a fraction of effort and the good performance aspect.

the_box_mapper.jpg


In first picture we can see the buttons : Import, syncronize, settings.

If you have a project it will attempt to create a map out of it. For that you select a supported language, for example C, it dected how variables and functions are written, and start creating the map for us.

Or syncronize, we do some updates, and update the project, the map is automaticly saved. But think could put a button do differentiate this. Save map.

the_box_mapper2.jpg


In second picture we see the interface in action it can contract, which will allow for people on androids and gadgets to code.

In the create you manage the hole application by selection stuff.

The internal code of how to map the application. It need to know where is all the stuff in the application. For example loading order, associated files, associated variables, etc...

Some pseudo code i did in PHP, need to convert it to C.

{l Code}: {l Select All Code}
Templates_icons = array(

"spells" => array(

"1" =>

array (
   "name" => "Magic spells by 1"
   "license" => "CC",
   "autor" => "Kifan",
   "sizes" => "246x, 128x, 48x",
   "icons" => array(),
),

"2" =>

array (
   "name" => "Magic spells by 2"
   "license" => "CC",
   "autor" => "Tuzgeg",
   "sizes" => "246x, 128x, 48x",
   "icons" => array(),
),


"abilitys" =>


"1" =>

array (
   "name" => "RPG spells by ..."
   "license" => "GPL",
   "autor" => "CC",
   "icons" => array(),
),


"2" =>

array (
   "name" => "RPG spells by ..."
   "license" => "GPL",
   "autor" => "CC",
   "icons" => array(),
),
)


);


languages = array(

"C" => "1", (between code);
"C++" => "1", (between code);
"Assembly" => "1", (between code);
"PHP" => "1", (between code);
);


default_values = array(


"number_of_lines" => "1", (between code);

);


process_array = array (

"3" => "variable_mapper",
"23" => "function_mapper",
"33" => "file_mapper",
"4" = "database_mapper",

)

variable_mapper = array (

"1" = array (

"name" => "npc",
"type" = "int",
"default" = "",
"starting_line" = 200,
"ending_line" = 201,
"process_position" => 1,
"connectios" => "",
"files" => array ("main", ),
"functions" => array ("combat",),

),

"2" = array (

"name" => "game_loading",
"type" = "bool",
"default" = "0",
"starting_line" = 200,
"ending_line" = 201,
"process_position" => 2,
"connectios" => "",
"files" => array ("main", ),
"functions" => array ("combat",),

),

);


file_mapper = array (){

"process_position" => 2,
"name" => "npc",
"connectios" => "",
"files" => "main",
"functions" => "combat, ",

}

function_mapper = array (){

"1" = array (

"process_position" => 3,
"name" => "npc",
"connectios" => "",
"files" => "main",
"variables" => array(),
"functions" => "combat, ",
)

}

database_mapper = array (){

"process_position" => 3,
"name" => "npc",
"connectios" => "",
"files" => "main",
"functions" => "combat, ",

}

Files -> variables & Functions & DB's

DB Mapper = array (){

"name" => "npc",
"connectios" => "",
"files" => "main",
"functions" => "combat, ",

}


How to create a library?

It should be the more specific why possible so load less and more accurate in to a project. For example spells for sci-fi, or spells for medivel RPG, actions post apocaliptic.

This whay stuff will be a bit more organizes.

THis is in case some one want to help organize stuff for example of open game art, in to librarys.

Reverse engineer?

If you study the laws is possible to reverse engineer on any thing you wish, it's legal. But you have to "remaster" it completely to be legal.

Let's say i want to reverse engineer Quake 3 GPL engine it's possible, but to be legal i have to re-write the code, but it can use it as a base for my project.
jdc
 
Posts: 44
Joined: 29 Jun 2017, 16:48

Re: The Box, development tool, "Structural programming"

Postby jdc » 07 Jun 2018, 11:39

The first task for the project : will be to create the window, to start mounting the "planning" which is posted.

A tutorial on the window : http://www.winprog.org/tutorial/simple_window.html

The "planning" also uses 3D for that:

This page have update tutorials, on 3D graphics coded directly, for people who is to learn how to code. I was searching for it for some time but only found old books. In where there are highly updated information.

https://www.3dgep.com/category/graphics ... g/directx/

If some one have suggestions, on assemble the first part: a window, with 3D support, to load the basic stuff in to the window, and assemble simple stuff, like a name generator, that automatic, generate characters for us, etc...
jdc
 
Posts: 44
Joined: 29 Jun 2017, 16:48

Who is online

Users browsing this forum: No registered users and 0 guests