Gamestudio Links
Zorro Links
Newest Posts
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
Deeplearning Script
by wolfi. 02/26/24 12:46
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/22/24 16:22
AssetAdd() vs. modern asset list?
by jcl. 02/21/24 15:01
How many still using A8
by Aku_Aku. 02/20/24 12:18
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (degenerate_762, TedMar), 519 guests, and 12 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 8 of 10 1 2 6 7 8 9 10
Re: compiler and memory usage [Re: Superku] #466588
06/22/17 10:13
06/22/17 10:13
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
It can not be optionally skipped. The compiler has no function for easily deallocating those data structures. It had to be explicitely implemented.

Re: video memory and d3d_texfree [Re: jcl] #469261
11/09/17 21:38
11/09/17 21:38
Joined: Sep 2005
Posts: 352
Germany
preacherX Offline
Senior Member
preacherX  Offline
Senior Member

Joined: Sep 2005
Posts: 352
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?

Last edited by preacherX; 11/09/17 21:59.
Re: video memory and d3d_texfree [Re: preacherX] #469412
11/15/17 08:25
11/15/17 08:25
Joined: Mar 2011
Posts: 3,150
Budapest
sivan Offline
Expert
sivan  Offline
Expert

Joined: Mar 2011
Posts: 3,150
Budapest
I have the same issue when replacing terrain textures by ent_setskin()


Free world editor for 3D Gamestudio: MapBuilder Editor
Re: video memory and d3d_texfree [Re: sivan] #469440
11/16/17 07:32
11/16/17 07:32
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
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.

Re: video memory and d3d_texfree [Re: jcl] #470735
02/04/18 12:38
02/04/18 12:38
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
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

Check out my new game: Pogostuck: Rage With Your Friends
Re: video memory and d3d_texfree [Re: Superku] #470743
02/05/18 10:04
02/05/18 10:04
Joined: Feb 2003
Posts: 146
RP China
2
20BN Offline
Member
20BN  Offline
Member
2

Joined: Feb 2003
Posts: 146
RP China

Last edited by 20BN; 02/05/18 10:06.
Re: video memory and d3d_texfree [Re: 20BN] #470801
02/07/18 09:56
02/07/18 09:56
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
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.

Re: video memory and d3d_texfree [Re: jcl] #470803
02/07/18 10:54
02/07/18 10:54
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
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

Check out my new game: Pogostuck: Rage With Your Friends
Re: video memory and d3d_texfree [Re: Superku] #470826
02/07/18 21:14
02/07/18 21:14
Joined: Apr 2002
Posts: 1,246
ny
jumpman Offline
Serious User
jumpman  Offline
Serious User

Joined: Apr 2002
Posts: 1,246
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?

Re: video memory and d3d_texfree [Re: jumpman] #474868
11/10/18 04:17
11/10/18 04:17
Joined: Jan 2006
Posts: 245
PA
Garrettwademan Offline
Member
Garrettwademan  Offline
Member

Joined: Jan 2006
Posts: 245
PA
Bummer, just ran into this bug too. Has there been any updates since February? This is really killing me on certain machines.


Current Project: Computer Repair Simulator
https://www.computer-repair-simulator.com
Page 8 of 10 1 2 6 7 8 9 10

Moderated by  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

Powered by UBB.threads™ PHP Forum Software 7.7.1