News:

Herr Otto Partz says you're all nothing but pipsqueaks!

Main Menu

Variable options storred in active memory,

Started by Daniel3D, November 08, 2021, 12:20:12 PM

Previous topic - Next topic

Daniel3D

I don't think it will be ~20 minutes for me.
But I'll see how far I can get this weekend..
;D
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

llm

#16
Quote from: Daniel3D on November 09, 2021, 03:49:53 PM
I don't think it will be ~20 minutes for me.
But I'll see how far I can get this weekend..
;D

1. just install VS2019 community (with english language pack for vcpkg)
2. create a dosbox_dev folder
3. clone dosbox-staging git in the dosbox_dev folder
4. clone vcpkg git in the dosbox_dev folder
5. build and run dosbox staging from source

then you are prepared - if i ever get the stuff running :)

llm

the  masm2c project (https://github.com/xor2003/masm2c) started to use dosbox as its porting backend: https://www.vogons.org/viewtopic.php?f=32&t=84572
and Stunts and Bright-Eyes are the testing games for the maintainer

the converted asm code looks not super easy in this example: https://github.com/xor2003/Bright-Eyes/blob/masm2c/src/custom/src/snake.cpp#L87
BUT it runs on every dosbox platform and can be compiled/debugged/extended with every dosbox-able C/C++ compiler (gcc,vstdudio,xcode...)

that is the StuntsBox i've talked about - but far more developed :)

it would be a very good idea to support the author with testing etc.



Daniel3D

Wow, that's great. Haven't had time to look at it yet. But it will be a busy weekend now ..
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

llm

Quote from: Daniel3D on November 10, 2021, 11:35:08 AM
Wow, that's great. Haven't had time to look at it yet. But it will be a busy weekend now ..

more background:
1. the project uses cleanly assembleable MASM/TASM compatible assembler code as base - we've got that :)
2. parses the complete code and transform it into some assembler looking C code - mixed with dosbox for the hardware(VGA,Sound,Mouse,...)/DOS implementation

it should then run completely under Windows/Linux - still hard to read assembler like C code and still needed a dosbox backend - but then in pure 32/64 Bit :)

Daniel3D

Well. That sounds like a good step in the right direction.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Daniel3D

Quote from: llm on November 10, 2021, 02:53:42 PM
still hard to read assembler like C code
Is there software that can clean up C code into better readable C code?
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

llm

No, because most tools do not understand the semantic and trivial reformatting isn't of help

The "hard to read" just comes from the fact that masm2c just ports the assembler code semantic using C, equally hard to read as the original assembler code

There are disassemblers that can translate assembler to "more" readable C but they are either not working good enought and most of them do not support 16bit Segment/Offset code - but even the best disassembler (IDA Hexrays ~2500$, im using that in work sometimes) - which does not support 16bit produces still can produce huge mess (that only looks nicer on first view): https://user-images.githubusercontent.com/680819/48862937-99641200-ed7c-11e8-9e0c-301ecace1cf5.png

All these tools would be fully useable if stunts would be a 32bit dos games :(

Cas

Yep. This is why, while working on the disassembled source is nice and allows for some good tricks, the new engine project is important. I have to get back to work on that. And it's true that I've been doing everything in FreeBasic, but this won't be a problem for C programmers. One reason is that between C and FreeBasic, the difference is just syntax, so the source can be perfectly converted between them keeping comments and all if you wish (because it'll be free software with the source available, of course). Another is that FreeBasic allows for plugging whatever you want to it, so C libraries and mods would work perfectly on a FreeBasic base anyway. I'm also doing the thing in a way that any graphics library can be plugged where the current one is, so even that can be changed. The idea is that the code isn't forcefully dependent on any 3rd party library.
Earth is my country. Science is my religion.

llm

Quote from: Cas on November 13, 2021, 02:18:30 PM
Yep. This is why, while working on the disassembled source is nice and allows for some good tricks, the new engine project is important. I have to get back to work on that. And it's true that I've been doing everything in FreeBasic, but this won't be a problem for C programmers. One reason is that between C and FreeBasic, the difference is just syntax...

But C is way more in use (millions of project compared to some in freebasic), nearly equal in syntax and useable on more platforms and got much much better compiler optimization and better IDEs, there is practical no reason not to use C  ;) but i dont care if its in freebasic or javascript as long as its having the real stunts feeling

Daniel3D

I think that the collision and physics engine are easier to write in C, it has been done before and there is a lot of info on it.
A search on the internet with "physics engine collision" gives about 10 million hits with pages of tutorials and info in c.
When doing the same for free basic, it's under 2 million and just pages with help requests..  ???

I know CAS loves freebasic for many reasons. But ... CAS, don't be so stubborn..  ;D ;D ;D
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

llm

Quote from: Daniel3D on November 13, 2021, 08:15:09 PM
I think that the collision and physics engine are easier to write in C, it has been done before and there is a lot of info on it.
A search on the internet with "physics engine collision" gives about 10 million hits with pages of tutorials and info in c.
When doing the same for free basic, it's under 2 million and just pages with help requests..  ???

I know CAS loves freebasic for many reasons. But ... CAS, don't be so stubborn..  ;D ;D ;D

and there is even a very small clean C/C++ version of stunts: https://github.com/riperjack/stunts_remake (that builds out of the box under Windows/VS2017, but should easy build under linux) that uses the widely in use Bullet physic engine/and OpenGL - that project is so small that its a very good start - also for others because of the used mainstream technologies - but that would be my way to get the stuff running/not fighting with the basics - maybe its just not funny enough for you :)

Daniel3D

It looks promising. It doesn't have a grid based world, and it is not making use of any data the stunts files can provide. Sizes are off. But it uses similar solutions for collision models and road detection if I interpret the description correct.

I see great potential in this.
Edison once said,
"I have not failed 10,000 times,
I've successfully found 10,000 ways that will not work."
---------
Currently running over 20 separate instances of Stunts
---------
Check out the STUNTS resources on my Mega (globe icon)

Cas

I've seen some projects wanting to be sequels or free versions of Stunts, but they all seem to be trying to do something very different from Stunts. Although some of those ideas are very good, I think this differentiation is what ultimately makes them not that appealing for the community and just there for curiousity. My idea is to do something that is as Stunts as possible so that we can continue to work on top of that. If it can use the original files, as many of them, that's much better.

About C vs. FreeBasic, I do see what you guys (and many, many people) say, but there is one very strong rule in my mind for everything and it goes like this: how many people do things a certain way is never a reason to do things that way. Reasons are things like how efficient or affordable or powerful something is, but popularity has zero value. Unless, of course, popularity "is" your project (say, you want to sell a cookie, you want people to like it). Now, I won't deny C has many positive things, but to give it a number, 95% of the good things C has, FreeBasic also has and for the other 5%, FreeBasic has another 5%, a different set, that C does not. And because they're fully compatible and the differences between them are merely a matter of keywords, well...

Now to be honest, I'm choosing FreeBasic here specifically because of FBGFX, the portable graphics library it includes, that gets statically linked to my programs and is syntactically blended into the language instead of being itself a "language". This transparency and independence is what I seek. If I could have a very simple library like this one, free software, totally portable, statically linkable and not crazy big, that I can use with C, I would probably have chosen to write the engine in C to make it more comfortable for the programmers in the community current and future. And this is still open. Find the jewel and you'll get the prize  ;D
Earth is my country. Science is my religion.

llm

Quote from: Cas on November 14, 2021, 05:37:34 PM
About C vs. FreeBasic, I do see what you guys (and many, many people) say, but there is one very strong rule in my mind for everything and it goes like this: how many people do things a certain way is never a reason to do things that way.

just keep it short - you like FreeBasic the most and dislike any micro burdens above it - simple as that :)