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.

Newcomers AppGameKit Corner / array count limit

Author
Message
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 20th Jan 2016 11:59 Edited at: 20th Jan 2016 12:00
Is there a limit to the amount of array's AGK2 can handle? My app is around 130~140mb in memory, is there a limit to memory AGK2 allocate? (I mean less than the 32bit memory address limit). I use a lot of arrays in my game, and porting it to AGK2 requires even more arrays, well, I use more arrays anyways, for keeping track of things like text objects which I did not have to do before. I have a strange behaviour with text objects created, first time I use integer_array[t] = create_normal_text(x,y,string$), text does not appear, doing it twice will display the text but then I have created two text objects, one nowhere to be seen and the second working fine. I am puzzled

Here is my create text function:

13/0
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 20th Jan 2016 20:09
I would think the only limit is dependent on the device your program is running on.

I see nothing wrong with the function, I believe your problem lies elsewhere in your code. Is there something else on screen that could be hiding the text at the same depth?

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 21st Jan 2016 01:44
why dos each text object have the same depth? shouldn't they have separate depth values?

Sign up for NaGaCreMo!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 21st Jan 2016 07:33
Quote: "why dos each text object have the same depth? shouldn't they have separate depth values?"


In most cases, they don't need different depths. It is unusual to have overlapping text, so it can all be on the same layer.
I think Phaelax is simply asking if your text is hidden underneath something that you expected it to be above.

I also can't see any problem with the posted code. My best guess is that the first time around, text_size is 0.
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 21st Jan 2016 09:17
Quote: " Is there something else on screen that could be hiding the text at the same depth?"


There should not be, and besides, it is the same call made twice, the second one on the line right after the first call to the function. The function sets the text depth.

Quote: "My best guess is that the first time around, text_size is 0"


text_size is set as a global at the top of the app.
13/0
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 21st Jan 2016 10:49
I think we need to see more code. I use text in it's simplest form at the top of every test app. This works, and it is the only text in the program...

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
Cybermind
Valued Member
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: Denmark
Posted: 21st Jan 2016 12:07
Quote: "I think we need to see more code."


I don't what else to pull from the project. There are around 18.000 lines, there could be a lot that have relevance to this. I fixed it by using a variable to store the text object number instead of an array.
13/0

Login to post a reply

Server time is: 2024-04-26 02:35:52
Your offset time is: 2024-04-26 02:35:52