G
Girelle44
Guest
Hello, Game Developers!
After new update I faced pretty tricky problem. Out of Memory Errors are common for new developers, as I've found out. But mine is special. I'm a beginner developer, most of my skills are from Shaun's Spadling videos.
So my problem is here:
1) Game works perfectly in all cases, but when player dies (global.lifes < 0) The out of memory error occures
Global.lifes is a variable, stated in control object to the maximum of three.
[/IMG]
2) I use Save ini files in this project. If player restarts game with r-button command or fall out of screed loadgame script works normally. If player dies because of enemy bullets due to following script:
Game crashes. This script is a part of obj_player script tree.
3) I used lighting surface system in my game
4) Only one big sprite is used (1024*768)
5) Lotta step events are taking place
[/IMG]. For each object that mooves. (More than 30).
6) Compiling information:
7) I've already fully uninstalled Gamemaker and downloaded new version in Steam. It didn't work out.
So, to sum up, game crushes only if room restarts due to players death (global.lifes < 0)
Looking forward for your help, ready to answer all your addition questions. Thank you in advance.
After new update I faced pretty tricky problem. Out of Memory Errors are common for new developers, as I've found out. But mine is special. I'm a beginner developer, most of my skills are from Shaun's Spadling videos.
So my problem is here:
1) Game works perfectly in all cases, but when player dies (global.lifes < 0) The out of memory error occures
Global.lifes is a variable, stated in control object to the maximum of three.
2) I use Save ini files in this project. If player restarts game with r-button command or fall out of screed loadgame script works normally. If player dies because of enemy bullets due to following script:
Code:
if global.lifes < 0
{
scr_continue();
}
3) I used lighting surface system in my game
Code:
surface_set_target(surf);
draw_clear(c_black);
with(obj_light)
{
draw_set_blend_mode(bm_src_color);
draw_sprite_ext(spr_light,0,x*other.surfscale,y*other.surfscale,lightsize*other.surfscale,lightsize*other.surfscale,0,c_white,lightstrength);
draw_set_blend_mode(bm_normal);
}
with(obj_light_man)
{
draw_set_blend_mode(bm_src_color);
draw_sprite_ext(spr_light,0,x*other.surfscale,y*other.surfscale,lightsize*other.surfscale,lightsize*other.surfscale,0,c_white,lightstrength);
draw_set_blend_mode(bm_normal);
}
surface_reset_target();
draw_surface_ext(surf,0,0,1/surfscale,1/surfscale,0,c_white,0.77);
5) Lotta step events are taking place
6) Compiling information:
Code:
Run_Start
StartGame()
StartGame() - DONE
Total memory used = 116636006(0x00499649) bytes
**********************************.
Entering main loop.
**********************************.
Out of Memory allocating 28382711564247072 bytes
So, to sum up, game crushes only if room restarts due to players death (global.lifes < 0)
Looking forward for your help, ready to answer all your addition questions. Thank you in advance.
Last edited by a moderator: