Please test my game! :)
Re: Please test my game! :)
Yeah that's what I meant in post above.
Haven't figured out how to make an "unload level" or just how to delete the entities
Haven't figured out how to make an "unload level" or just how to delete the entities
Re: Please test my game! :)
After you learn about dynamic memory, that will be easy as pie bro. BTW, I'm working on a fast loading version, maybe with alpha blending. Just to tease youYumtard wrote:Yeah that's what I meant in post above.
Haven't figured out how to make an "unload level" or just how to delete the entities
Chili
Re: Please test my game! :)
Wow that's a lot faster! Is that using multi threading?
Re: Please test my game! :)
It seems like I figured out a simple way to fix the issue of reloading levels. Seems to work perfectly now
When the player die I used to call reset on all managers which looked like this
the reset for drones just reset the entities positions and states.
Now I go like this
So I delete the objects and then the level is loaded again when you start the game and the objects are created again. So you can now switch difficulty between deaths and keep playing if you die without issues
When the player die I used to call reset on all managers which looked like this
Code: Select all
void DroneManager::Reset()
{
for (int i = 0; i < nDrones; ++i)
{
drone[i].Reset();
}
}
Now I go like this
Code: Select all
void DroneManager::Reset()
{
for (int i = 0; i < nDrones; ++i)
{
// drone[i].Reset();
drone.pop_back();
}
nDrones = 0;
}
Re: Please test my game! :)
Yumtard wrote:Wow that's a lot faster! Is that using multi threading?
Yup, putting the loading of each mp3 and animationframes object on its own task. They're also made deferred, so the program can continue even if not all resources are loaded, but it will block as soon as a resource is attempted to be used if it isn't full loaded yet. So it loads resources in the backghround of the title screen and even after you start playing.
Chili
-
- Posts: 4373
- Joined: February 28th, 2013, 3:23 am
- Location: Oklahoma, United States
Re: Please test my game! :)
Hey man, instead of pop_back, why not just use the clear() function?Yumtard wrote:It seems like I figured out a simple way to fix the issue of reloading levels. Seems to work perfectly now
When the player die I used to call reset on all managers which looked like this
the reset for drones just reset the entities positions and states.Code: Select all
void DroneManager::Reset() { for (int i = 0; i < nDrones; ++i) { drone[i].Reset(); } }
Now I go like this
So I delete the objects and then the level is loaded again when you start the game and the objects are created again. So you can now switch difficulty between deaths and keep playing if you die without issuesCode: Select all
void DroneManager::Reset() { for (int i = 0; i < nDrones; ++i) { // drone[i].Reset(); drone.pop_back(); } nDrones = 0; }
Code: Select all
void DroneManager::Reset()
{
drone.clear();
nDrones = 0;
}
If you think paging some data from disk into RAM is slow, try paging it into a simian cerebrum over a pair of optical nerves. - gameprogrammingpatterns.com
Re: Please test my game! :)
omg im so triggered right now. i finally made it to the boss, and the game froze! DX
could be something with the deferred loading code is messed up for the boss sprites ; /
could be something with the deferred loading code is messed up for the boss sprites ; /
Chili
Re: Please test my game! :)
@albinopapa
Either because I didn't know about the function or I had forgotten about it:p not sure which! Changed them to clear now. Thanks
@chili
shit you're right, your version crashes when you reach the boss :S
"Yup, putting the loading of each mp3 and animationframes object on its own task. They're also made deferred, so the program can continue even if not all resources are loaded, but it will block as soon as a resource is attempted to be used if it isn't full loaded yet. So it loads resources in the backghround of the title screen and even after you start playing."
Sheesh don't really understand this at all :p
What do you mean with deferred?
Do you think this is something I should try to figure out atm or ignore for now?
Either because I didn't know about the function or I had forgotten about it:p not sure which! Changed them to clear now. Thanks
@chili
shit you're right, your version crashes when you reach the boss :S
"Yup, putting the loading of each mp3 and animationframes object on its own task. They're also made deferred, so the program can continue even if not all resources are loaded, but it will block as soon as a resource is attempted to be used if it isn't full loaded yet. So it loads resources in the backghround of the title screen and even after you start playing."
Sheesh don't really understand this at all :p
What do you mean with deferred?
Do you think this is something I should try to figure out atm or ignore for now?
Re: Please test my game! :)
What I mean by deferred is, the loading process is started, but it is not actually checked / completed until the first time the resource is actually requested. At that time, if the loading is finished it can be used, but if it is not finished, the program will block until the operation is complete.Yumtard wrote:@albinopapa
Either because I didn't know about the function or I had forgotten about it:p not sure which! Changed them to clear now. Thanks
@chili
shit you're right, your version crashes when you reach the boss :S
"Yup, putting the loading of each mp3 and animationframes object on its own task. They're also made deferred, so the program can continue even if not all resources are loaded, but it will block as soon as a resource is attempted to be used if it isn't full loaded yet. So it loads resources in the backghround of the title screen and even after you start playing."
Sheesh don't really understand this at all :p
What do you mean with deferred?
Do you think this is something I should try to figure out atm or ignore for now?
Don't try and figure out this stuff yet. Definitely ignore it for now. It's not super hard, but threading/asynchronous programming isn't something you should approach half-assed either. It will wait.
Chili