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 / Application freezes when looping through array/vector

Author
Message
helgs
8
Years of Service
User Offline
Joined: 12th Apr 2015
Location:
Posted: 12th Apr 2015 19:17 Edited at: 12th Apr 2015 19:33
Bought AppGameKit from steam today and are just familiarizing myself with it. I've made a biomes routine to generate terrain for a level and are testing it, but when looping through the terrain to print the generated content it freezes the application

I am using MS Visual C++ 10, here is the code:

biomes.h



biomes.cpp



template.h



template.cpp



Basically the loop in app::Begin is what causes the freeze, but it is out of the application loop so the function should run only once rather than every frame?
helgs
8
Years of Service
User Offline
Joined: 12th Apr 2015
Location:
Posted: 12th Apr 2015 21:54
Why did my post get deleted?
BatVink
Moderator
20
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 12th Apr 2015 22:47
It's a quirk of the forum when you are a new user.

You wrote your post and it went into moderation. I approved it. Then you edited it so it went back into moderation.

Moderation doesn't last long, it's just to combat spambots (we get dozens of them a week). The system will work out you are human shortly!

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
helgs
8
Years of Service
User Offline
Joined: 12th Apr 2015
Location:
Posted: 13th Apr 2015 06:52
Allright then, thanks
helgs
8
Years of Service
User Offline
Joined: 12th Apr 2015
Location:
Posted: 16th Apr 2015 21:58
Just to revisit this, I tried using my code in an ordinary console application, and it printed the random generated "terrain" without any issues. Super fast. In AppGameKit it just stalls

Am I putting the recursion in the wrong function?

Login to post a reply

Server time is: 2024-03-28 08:38:01
Your offset time is: 2024-03-28 08:38:01