Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / [SOLVED] When i try to load more than 4 height maps in a row it throws up an error even after using deleteobject(1)

Author
Message
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 28th Feb 2019 20:02
As above . I have two computers and it happens on both of them . It's something to do with the height maps clogging up the memory . Does anyone know how to clear the memory after performing
a deleteobject(1) command . I have experimented with this and I'm pretty certain this is what is happening . If I use a bigger height map it'll only do two . The size I am now using are 20480 x 1700 x 20480.
I know this can be done I just don't know how. I have already scaled down from 40960 x 2000 x 40960 . I have six levels to my game . Any help would be good .thanks.

The author of this post has marked a post as an answer.

Go to answer

puzzler2018
User Banned
Posted: 28th Feb 2019 20:13
and it will happen all the time - even just one heightmap of that scale will upset things.

Why not on each level loading.

deleteheightmap
reload a new one

dont load anymore than 1 for the full app - that will just destroy your memory

People would expect to see a "Loading Level" of some description for each level.

Dont cram all your heights into the first run of the app

Hope you get my meaning



Tier 1 Developer
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 28th Feb 2019 20:26
yes I am trying to delete them once used but just don't know how. And yes it's killing my memory on the 4 th map it slows right down and it won't load the fifth. This is regardless of which pc I'm using .
If I can sort this my game is done . I load a height map use it then delete the object before loading the next one . I'll have a play and see what I can come up with. Thanks for your help.
puzzler2018
User Banned
Posted: 28th Feb 2019 20:34
This post has been marked by the post author as the answer.
what IDs are you assigning them as. use

ID = Createhieghtmap.................

deleteobject( ID )

instead of forcing one

createhieghtmap ( ID, ........)




Tier 1 Developer
puzzler2018
User Banned
Posted: 28th Feb 2019 20:35
didnt chafari once give you an example of been able to create and delete..

Tier 1 Developer
Pfaber1
6
Years of Service
User Offline
Joined: 7th Jan 2018
Location: England
Posted: 28th Feb 2019 21:17
It's ok puzzler it's sorted . I was using different object numbers for each height map and that was the problem . I've only been at this 3d stuff for about a month so am still finding my feet . basically
getobjectfromheightmap(1) getobjectfromheightmap(2) getobject fromheightmap(3) etc and although I was deleting them using deleteobject(1) deleteobject(2) etc they were stacking up in my memory.
lesson learned. I'm learning new stuff every day . Thankyou for your time.
puzzler2018
User Banned
Posted: 28th Feb 2019 21:21
happy 3d game designing....
Tier 1 Developer

Login to post a reply

Server time is: 2024-11-05 23:27:18
Your offset time is: 2024-11-05 23:27:18