The Box, development tool, "Structural programming"

The Box, development tool, "Structural programming"

Postby jdc » 09 Dec 2017, 10:40

The Box, Development tool.

I have worked and applied the concepts of structured code to a Procedural PHP engine for the web. I have the idea to develop a open source tool for the community in C.

The engine will be build in C, to have better performance.

It is on google drive : https://drive.google.com/drive/folders/ ... sp=sharing

discod

https://discordapp.com/invite/Mwgxgzf

How to build inherit files ?

movement.c // handles movement
score.c // handles score
team.c // handles team
team_rts.c // handles team for a rts game
team_fps.c // handles team for a fps game
team_rpg.c // handles team for a rpg game

The AI Language ?

@PHP open tag : <?php

@PHP echo string : echo "hello free game dev comunity";

@PHP close tag : ?>

This will make it very easy to output : string hello word -> miss something

AI Structure back trace ?

Handle file and variables dependency automaticaly for us. Back tracking what is being included and where.

variable red_team -> declared at main
called in : teams, game, network.

notices :

-> Possible error at game
-> slow performance at network.

Include pre build Library's packages ?

Art" a thing that will be possible will be to have game ready Art, In a ready to use packages. Instead of we all updated this stuff, search, and create or own library's we have a ready structured library that speed up this process.

3D characters (open source)
3D characters (Paid)
3D Tree's desert (open source)
3D Tree's tropical (open source)

Build in tools : Screen play & character creation & Name generator ?

We could also have more built-in tools, to speed the process of creation the game concept, like a proper name generator, a character stats and list generator that will be game ready.

A example: You insert your list of spells in the program, and once you are ready for production click in generate file and it generate the production programming file ready to be used in the game. This will minimize mistakes and debugging time.

The tool interface example ?


The tool will speed up the programming process and other's process's, by having a set of tools available.





Payment ?

Patrons are very popular way to have costume made code. Better to donate for a open source tool then for a engine which even if you buy all lunches and subscriptions you will never have access to the code unless you pay a very high amount of money which is is almost enough to develop a new engine.

help in Development

Is always good to have people helping

Patron

add a Patron page so ppl can contribute with $$; https://www.patreon.com/user?u=16271332
Last edited by jdc on 22 Oct 2019, 05:08, edited 9 times in total.
jdc
 
Posts: 74
Joined: 29 Jun 2017, 16:48

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

Postby jdc » 09 Dec 2017, 10:43

outdated post ...
Last edited by jdc on 14 Oct 2019, 15:25, edited 2 times in total.
jdc
 
Posts: 74
Joined: 29 Jun 2017, 16:48

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

Postby jdc » 09 Dec 2017, 10:56

outdated post...
Last edited by jdc on 14 Oct 2019, 15:27, edited 2 times in total.
jdc
 
Posts: 74
Joined: 29 Jun 2017, 16:48

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

Postby Lyberta » 10 Dec 2017, 02:43

I have a very hard time trying to understand what you are trying to say. But here's a few thoughts.

C is a very old language that is very much stuck in the 1970s. This is good for very resource constrained systems but if you're cross-compiling, you might as well use C++ or (not sure if today) Rust. Raw pointers suck. A lot. There a reason Rust has put them in unsafe and Core C++ Guidelines prohibit pointers as a tool for resource management.

Games are usually built on top of the game engines and those provide abstractions. Games may hardcode a bit of stuff, but most FOSS games allow users to modify a lot without recompiling the code. So no mature game will hardcode arrays with stuff. Maybe only default values.

PHP is a fractal of bad design.

To me, AI is a system that can learn. If it doesn't learn, it's a script, not AI. Most machine learning algorithms now use neural networks and it's hard to reason about inner workings of a trained neural network. I have seen AI algorithms that use Turing-complete programming language to solve given problems but I don't think the programs that get generated by AI will be easily understandable by humans.

Overall, I think you need a bit of experience to reason about things you want to do. Just PHP and C will leave a bad taste after you move to something more modern. But learning a basics of C is a good knowledge, just don't try to write huge systems in it.
User avatar
Lyberta
 
Posts: 663
Joined: 19 Jun 2013, 10:45

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

Postby jdc » 10 Dec 2017, 11:37

Thanks a lot for the feedback constructive criticism is always welcome.

I disagree lightly, Linux is build on C so is a good language after all. Agree that C could be a bit updated in some aspects. PHP push languages a lot forwards bringing new functionality and ways of doing things in new ways. In terms of innovation i think is a great language.

Most of the stuff that is in that article, i think is more a person that is not very creative, or don't like to solve problems. Of course is going to have problems with a loose language like PHP. If you are expecting the programming language just to allow things to be done in one way or very strict, but that cut off all your creativity. Can become extremely boring to code like that.

Other stuff they updated that in a regular basis last update was last month on 30 November, i have my doubts that the arrays are inconsistent, Facebook is build on PHP ...

But people can choose what they like...
jdc
 
Posts: 74
Joined: 29 Jun 2017, 16:48

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

Postby Lyberta » 11 Dec 2017, 05:40

jdc {l Wrote}:I disagree lightly, Linux is build on C so is a good language after all.


That is a cargo cult mentality. Linux is built on C because C was the best language to write operating system kernel in late 1980s. Nowadays, it is possible to use most of C++ inside a kernel but Torvalds has a personal phobia of C++.

jdc {l Wrote}:PHP push languages a lot forwards bringing new functionality and ways of doing things in new ways. In terms of innovation i think is a great language.


Did you read the article? PHP never invented anything, it copied some stuff from other languages and most of the time failed to implement those features properly.

jdc {l Wrote}:Most of the stuff that is in that article, i think is more a person that is not very creative, or don't like to solve problems. Of course is going to have problems with a loose language like PHP. If you are expecting the programming language just to allow things to be done in one way or very strict, but that cut off all your creativity. Can become extremely boring to code like that.


When you are the beginner, you may have some joy of discovery and feeling of being creative. When you are experienced, you just want to get the job done and make code understandable to other people. I don't want to fight against the language when I code. Writing code is very boring, what motivates you is seeing what your code has done.
User avatar
Lyberta
 
Posts: 663
Joined: 19 Jun 2013, 10:45

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

Postby jdc » 11 Dec 2017, 15:54

How do you know what motivate me?

Check Torvalds open source page : https://github.com/trending/c

Torvalds hates C++ ? Naaa is a proven fact debated on the forums that C++ or objects for that matter are slower. C with pointers have a very stable performance. Is the lower language available, which is more or less easy to write, some parts are written in Assembly.

Try for your self a 3D engine build in C# sharp since you like so much, its is incredible slow in a computer with 10 or more years like my own.

C++ can achieve more performance then C# Sharp, is true but still is not that much good to develop a operating system since, it does not achieve the same performance was pointers.

Windows languages: C, C++, C#. Some parts in assembler. It's build the same way was Linux.

Maybe width the new computers that does not matter, but this is how thing are made. You should read more about low level programming language. languages that are close to machine code have more performance. They are hard to programme and have more performance.

Objects are a entanglement of data, so they are bit far way for the zero and ones that the computer understand. So that mean after compiled more CPU activity to be done.

Assembly is closer to computer language, but extremely hard to program. You can see a code example for assembly:

mov edx,4 ; message length
mov ecx,msg ; message to write
mov ebx,1 ; file descriptor (stdout)
mov eax,4 ; system call number (sys_write)
int 0x80 ; call kernel

It's performance much more higher then C. Can search games build in Assembly. Tycoon think was build in assembly it have a extremely high performance for the time. It loaded a lot of stuff, think no other game does that at that time .
jdc
 
Posts: 74
Joined: 29 Jun 2017, 16:48

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

Postby Julius » 11 Dec 2017, 17:25

Let's not make this into a "my favourite programming language it better than yours" discussion, please.
User avatar
Julius
Community Moderator
 
Posts: 2706
Joined: 06 Dec 2009, 14:02

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

Postby dulsi » 12 Dec 2017, 01:37

Programming language isn't a big deal. You can write interesting games in any language. However, I have no idea what you are making. It's some sort of development tool. I don't know if it is C or PHP or both.
dulsi
 
Posts: 355
Joined: 18 Feb 2016, 15:24

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

Postby jdc » 12 Dec 2017, 11:56

Julius : don't mind answering to people if that what motivates them to work. Knowing all the details.

Dulsi : it is stated clear that is done in C in Dropbox only contains files in C. But often project contains several languages. For example a database is made in SQL which have nothing to do with PHP or C. Engines like unreal have the core done in C++ and have biding's for Lua, or other high level scripting language.
jdc
 
Posts: 74
Joined: 29 Jun 2017, 16:48

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

Postby jdc » 12 Dec 2017, 12:06

outdated post...
Last edited by jdc on 14 Oct 2019, 15:31, edited 2 times in total.
jdc
 
Posts: 74
Joined: 29 Jun 2017, 16:48

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

Postby jdc » 12 Dec 2017, 13:00

outdate post
Last edited by jdc on 22 Oct 2019, 04:59, edited 1 time in total.
jdc
 
Posts: 74
Joined: 29 Jun 2017, 16:48

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

Postby dulsi » 12 Dec 2017, 23:02

jdc {l Wrote}:Dulsi : it is stated clear that is done in C in Dropbox only contains files in C. But often project contains several languages. For example a database is made in SQL which have nothing to do with PHP or C. Engines like unreal have the core done in C++ and have biding's for Lua, or other high level scripting language.

Ok. But I don't see what that has to do with The Box. When announcing a project it is probably best to stay on that subject. If you want to talk about the merits of PHP or C or having other language bindings in a game engine, it is probably best to do that in another thread. I have now looked at your google drive. I still don't really understand what is The Box. Is it meant to be a game, a game engine, or some other development tool? You don't have a license specified for your code. In general I wouldn't include .c files with #include. Your suggestion of using 2 arrays to build lists of things is fine but most games store that sort of thing in data files now. That way you can modify the program without recompiling. There are times when combining the data into the binary is advantageous or necessary (for example my viobyte game needs to do so because the target platform is so limited).
dulsi
 
Posts: 355
Joined: 18 Feb 2016, 15:24

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

Postby Lyberta » 12 Dec 2017, 23:58

jdc {l Wrote}:Naaa is a proven fact debated on the forums that C++ or objects for that matter are slower. Objects are a entanglement of data, so they are bit far way for the zero and ones that the computer understand.


At this point I understand that it would be pretty much impossible for us to have meaningful discussion. I hope you can learn stuff so you can make useful tools in the future. I just leave it here.
User avatar
Lyberta
 
Posts: 663
Joined: 19 Jun 2013, 10:45

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

Postby jdc » 13 Dec 2017, 08:50

Lyberta :

I have to agree with Julius is necessary to move on, thanks for the contribute. People are more interested in the tool it self and development post's then in a debate about what people prefer.

Not sure if this forums allow that but in general conversation you can make a C++ (OOP) vs C (structural or procedural) post topic. For those interested in that kind of topic.

I post the differences so that people understand the 2 perspectives or languages paradigms, to be easy for them to follow along. And learn more stuff. Often when you are programming you have to know the 2 of them in order to work with several engines or frameworks. Not always you are working only with one.

I don't post the differences to start a debate.

Dulsi :

Thanks for support the license is open source, or public domain, why do you need a CC BY, don't think that is necessary if people want they can send you mails or other stuff like mention in the comments. If you want to make money of a open source project, thing that most people do is offer something free, a sample and have something pay. For example a free software with 1 or 2 extras paid. For art think is the same a couple of stuff open source if people lather need you well they are using already your art style is better for them to hire you to have the style aligned with the project.

The rest : i already have to much to hurry about the post. The themes on the post : "it is what it is". If you don't like you can search other project's, there are hundreds of topics that talk about their development. This one is my perspective on development. There are hundreds of perspective about development, hundreds of languages hundreds of frameworks, and so on...
jdc
 
Posts: 74
Joined: 29 Jun 2017, 16:48

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

Postby jdc » 13 Dec 2017, 10:03

outated post...
Last edited by jdc on 14 Oct 2019, 15:34, edited 2 times in total.
jdc
 
Posts: 74
Joined: 29 Jun 2017, 16:48

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

Postby jdc » 13 Dec 2017, 14:57

outdate post...
Last edited by jdc on 22 Oct 2019, 04:56, edited 1 time in total.
jdc
 
Posts: 74
Joined: 29 Jun 2017, 16:48

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

Postby jdc » 13 Dec 2017, 16:39

outdated post...
Last edited by jdc on 22 Oct 2019, 04:52, edited 1 time in total.
jdc
 
Posts: 74
Joined: 29 Jun 2017, 16:48

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

Postby smcameron » 13 Dec 2017, 16:45

i will need to digg a bit more to know how to do this stuff in C


Well, you aren't wrong about that.

No offense, but this thread comes off as slightly crazy. I don't think any C programmers have any desire to program C as if it were PHP. People who still program in C nowadays do so for a few reasons.

* They're doing low level stuff, and they need to control the hardware (e.g. set up virtual memory page tables themselves in a kernel).
* They are on a tiny machine with kilobytes of RAM and C is all that will fit.
* They have been programming in C for a long time and they simply like it -- they like simple imperative programming, they like doing their own memory management.

Note that the last reason is not a technical reason, it is simply a subjective preference.

You appear to be attempting to program in C somehow as if it were PHP, and to explain to other people how to do it (despite not appearing to be very good at either.)

This, for example, is utter nonsense:

How to handle variables ?

For example why to re declare pointers all the way in the project when we can have generic pointers declared :

int *int_pointer;
char *char_pointer;
float *float_pointer;

When we need to use them inside our files, we know that the structure have generic declared pointers. This is used in? A form of structure, so the template have this stuff build in. In your file you access the int_pointer.

Pointers are just a address to a variable they are not, a variable this means that it loads less stuff.

int large_number = 00987987987989890;

*int_pointer = large_number;

if we use our *int_pointer to pass it to a function, we don't move the variable around this is where we are saving resources. In our structure, we are saving lines of code by not re declaring stuff and by having pre build in variables.

Another pre build variable :

screen_width = 640;
screen_height = 480;

variables that :

why should we re declare this stuff which time we start a project?

This stuff should be a standard variable.



I think you should try programming in C for about 5 or 10 years and make some projects with it before attempting to explain to other people how they should use C.
smcameron
 
Posts: 318
Joined: 29 Oct 2010, 23:44

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

Postby jdc » 13 Dec 2017, 19:05

oudated post...
Last edited by jdc on 14 Oct 2019, 15:43, edited 2 times in total.
jdc
 
Posts: 74
Joined: 29 Jun 2017, 16:48

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

Postby jdc » 13 Dec 2017, 19:29

outdated post...
Last edited by jdc on 22 Oct 2019, 04:53, edited 1 time in total.
jdc
 
Posts: 74
Joined: 29 Jun 2017, 16:48

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

Postby jdc » 13 Dec 2017, 19:43

outdate post...
Last edited by jdc on 22 Oct 2019, 04:54, edited 1 time in total.
jdc
 
Posts: 74
Joined: 29 Jun 2017, 16:48

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

Postby smcameron » 14 Dec 2017, 06:34

jdc {l Wrote}:I use C the way i want, and i don't control other people topics. Nor do i make ironic comments, how to manage project's that i have no intention to help out. Talk comes cheap!

I was reading the forums, and seen this attitude before, people are doing some stuff that they like when others see some kind of competition, or project, they try to black out other people projects.

Great that this community try to help out others, and the administrators are active in looking in to this kind of situations.

I only appreciate constructive criticism and this one is not one of them.


Uh, I don't see you as "some kind of competition". Look, I've been programming in C since 1987. Based on what you've written, you seem like a novice at C. Very much so. I'm trying to tell you that as a novice, you shouldn't be offering advice on how to write C code. That's all. But if you insist, proceed. Just do not be surprised when people find your advice wanting. I'm trying to save you from further embarrassment. Not that you couldn't ever offer advice on how to write C code, but you're clearly not yet ready for that. (It's possible that you have some amazing new paradigm for C programming I'm too dumb to understand, but I don't think so, based on what I've read so far... e.g.

Pointers are just a address to a variable they are not, a variable this means that it loads less stuff.

int large_number = 00987987987989890;

Because that constant begins with 0, that means it's octal, so it's not nearly as big as it seems, and because 9 is not an octal digit, this doesn't even compile:
{l Code}: {l Select All Code}
error: invalid digit "9" in octal constant

If you intend to instruct others, you need to test your examples.

*int_pointer = large_number;

if we use our *int_pointer to pass it to a function, we don't move the variable around this is where we are saving resources. In our structure, we are saving lines of code by not re declaring stuff and by having pre build in variables.

What? On most systems nowadays (64-bit) an int is 32-bits and a pointer is 64-bits, so passing the pointer instead of the int is wasting memory at the very least. Passing a pointer doesn't make it any better. Not only that, why use the artificial "*int_pointer" rather than just:

{l Code}: {l Select All Code}
    my_function(&large_number);


You need to know at least the basics of C before you can instruct others, or write a reasonable library in C that you expect others to actually use. I'm trying to help you, not bash you. Spend some time with C, writing some programs, gaining some experience (years) before trying to tell people how to write C code.
smcameron
 
Posts: 318
Joined: 29 Oct 2010, 23:44

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

Postby Lyberta » 14 Dec 2017, 21:54

smcameron {l Wrote}:Based on what you've written, you seem like a novice at C. Very much so. I'm trying to tell you that as a novice, you shouldn't be offering advice on how to write C code.


He said that C++ objects are slow because someone somewhere told him that they are slow. At this point I just gave up. Here's another great video: https://www.youtube.com/watch?v=fX2W3nNjJIo

I couldn't find the segment by jumping to random points in the video right now but there's a part where Bjarne says that there is always one student that thinks that they know everything and start using pointers and stuff thinking that know performance while they're actually only starting and trying to solve problems that people already solved decades ago and the solutions are already in the standard library in case of C++.
User avatar
Lyberta
 
Posts: 663
Joined: 19 Jun 2013, 10:45

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

Postby jdc » 15 Dec 2017, 12:56

outdate post...
Last edited by jdc on 22 Oct 2019, 04:55, edited 1 time in total.
jdc
 
Posts: 74
Joined: 29 Jun 2017, 16:48

Who is online

Users browsing this forum: No registered users and 1 guest