Gamestudio Links
Zorro Links
Newest Posts
Indicator RSI
by sdelatorre
Yesterday at 23:16
Transaction Cost
by tradingest
Yesterday at 21:52
Is it possible to do Trade Mode without live brokerage account?
by AndrewAMD
Yesterday at 20:36
OptimialF values in .fac file mostly zero
by SBGuy
Yesterday at 19:48
MED (or any tool) - change base frame / pose of frame 0 ?
by rayp
Yesterday at 17:55
Rigid Force Alpha - Classic side-scrolling shoot'em up
by Turrican
Yesterday at 16:09
Series within loop
by Spirit
Yesterday at 13:22
AUM Magazine
Latest Screens
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Evonet Beta v1.0 : Online Project Development Template
Lake scene
Who's Online
9 registered (AndrewAMD, alibaba, SBGuy, Superku, Quad, sdelatorre, 3 invisible), 460 Guests and 3 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
jiffdbf, jgtrader, Chefmac, BazGen, pallab1964
18079 Registered Users
Page 8 of 8 < 1 2 3 4 5 6 7 8
Topic Options
Rate This Topic
#466588 - 06/22/17 12:13 Re: compiler and memory usage [Re: Superku]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 26529
Loc: Frankfurt
It can not be optionally skipped. The compiler has no function for easily deallocating those data structures. It had to be explicitely implemented.

Top
#469261 - 11/09/17 22:38 Re: video memory and d3d_texfree [Re: jcl]
preacherX Offline
Senior Member

Registered: 09/09/05
Posts: 341
Loc: Germany
Originally Posted By: jcl
d3d_texbmaps is indeed not reduced by releasing the old textures when switching the resolution. I have put this on the bug list. But you should still be able to find the problem this way when you don't change the resolution.


I'm getting many reports on Steam from people who have problems when switching between programs and then returning to the game that they get "Error E2005: Can't create DirectX texture unnamed" errors and the game stops. I'm not sure if I understand the discussion here correctly, but is this problem the d3d_texbmaps bug? When will this be fixed? I also don't find this on the bug list? Is there a workaround?


Edited by preacherX (11/09/17 22:59)

Top
#469412 - 11/15/17 09:25 Re: video memory and d3d_texfree [Re: preacherX]
sivan Offline
Expert

Registered: 03/07/11
Posts: 3137
Loc: Budapest
I have the same issue when replacing terrain textures by ent_setskin()
_________________________
Free world editor for 3D Gamestudio: MapBuilder Editor

Top
#469440 - 11/16/17 08:32 Re: video memory and d3d_texfree [Re: sivan]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 26529
Loc: Frankfurt
The wrong value of d3d_texbmaps is not a very serious bug and will be fixed in the next update. A deallocation of the compiler data is not planned at this point.

Top
#470735 - 02/04/18 13:38 Re: video memory and d3d_texfree [Re: jcl]
Superku Online
Senior Expert

Registered: 09/13/03
Posts: 6761
Loc: Kiel (Germany)
Originally Posted By: jcl
Ok, I've checked your example. The compiled code size is not 980 MB, but about 10 MB. This is indeed a problem, since the compiler first compiles the script to an interim code and then to the final machine code. The interim code can be much larger than the machine code, up to factor 30.
[...]
There's certainly room for optimization since I think 90% of the allocated memory by the compiler is not needed at runtime. But that's how it works at the moment.
[...]
It had to be explicitely implemented.

Although I've optimized it already over the months and years (not loading any big files like music, creating any big textures only on demand (of which there are < 10) and deleting 99% of all unused code), I've finally reached the point where I cannot play-test my game anymore.
The code is the issue, not other files. Most of the code is already in place but a little more is yet to come.

Mr. Lotter, can you free some of the memory (not 90% but let's say 30%, optimistically, some big chunks) and release a new version? That would be a huge thing/ relief, probably not just for me.
How much time would that take you to do/ implement? I'd throw some money in the company's coffee tip jar if it helped thinking.
_________________________
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Superku The Game

Severely outdated footage: http://store.steampowered.com/app/407570

Top
#470743 - 02/05/18 11:04 Re: video memory and d3d_texfree [Re: Superku]
20BN Offline
Member

Registered: 02/08/03
Posts: 109
Loc: RP China


Edited by 20BN (02/05/18 11:06)

Top
#470801 - 02/07/18 10:56 Re: video memory and d3d_texfree [Re: 20BN]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 26529
Loc: Frankfurt
The problem with freeing the memory is that the Chinese developers that developed lite-C for Atari disappeared a long time ago. We do partially understand the compiler, but its memory management looked totally Chinese to us and we do not like to touch it.

This leaves 3 options when you hit a roadblock with extremely large code:

- you make your code smaller by putting a part of it in a DLL.
- you make it smaller with some tricks, especially replacing large static arrays with dynamically allocated arrays.
- you or someone else undertake the task to free the memory. The license allows us to give the lite-C source not to the public, but to select developers. If someone with enough C++ knowledge volunteers, I'm happy to give him a contract and the source code.

Top
#470803 - 02/07/18 11:54 Re: video memory and d3d_texfree [Re: jcl]
Superku Online
Senior Expert

Registered: 09/13/03
Posts: 6761
Loc: Kiel (Germany)
Thanks for the response.
I went through the code again after my last post, optimizing it and commenting/ excluding temporarily unused code (for levels I'm not working on currently). This saved me about 45MB (compile time 14.9->14.1) which means I could test the game again for now but that's obviously going to change/ break in the near future.

Putting code into a DLL is a neat idea! Too bad I wrote this project's code very acknex-y but I will do that if I have no other choice.

Originally Posted By: jcl
The license allows us to give the lite-C source not to the public, but to select developers. If someone with enough C++ knowledge volunteers, I'm happy to give him a contract and the source code.

Sounds great! I have sent an e-mail to the support.
_________________________
"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Superku The Game

Severely outdated footage: http://store.steampowered.com/app/407570

Top
#470826 - 02/07/18 22:14 Re: video memory and d3d_texfree [Re: Superku]
jumpman Offline
Serious User

Registered: 04/17/02
Posts: 1199
Loc: ny
how much would it cost to hire chinese programmers to read through and translate the memory management section? How can you put lite-C code in a dll? Would a C++ progammer be able to make a "just enough difference" for a new license/product?
_________________________
A8 Pro 8.47

Top
Page 8 of 8 < 1 2 3 4 5 6 7 8


Moderator:  elsewood, old_bill, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de