Asenna Steam
kirjaudu sisään
|
kieli
简体中文 (yksinkertaistettu kiina)
繁體中文 (perinteinen kiina)
日本語 (japani)
한국어 (korea)
ไทย (thai)
български (bulgaria)
Čeština (tšekki)
Dansk (tanska)
Deutsch (saksa)
English (englanti)
Español – España (espanja – Espanja)
Español – Latinoamérica (espanja – Lat. Am.)
Ελληνικά (kreikka)
Français (ranska)
Italiano (italia)
Bahasa Indonesia (indonesia)
Magyar (unkari)
Nederlands (hollanti)
Norsk (norja)
Polski (puola)
Português (portugali – Portugali)
Português – Brasil (portugali – Brasilia)
Română (romania)
Русский (venäjä)
Svenska (ruotsi)
Türkçe (turkki)
Tiếng Việt (vietnam)
Українська (ukraina)
Ilmoita käännösongelmasta
Also sorry, I meant that I've completely developed the game and compiled it as an .exe application.
If everything else fails you have to hunt for the problem systematically. Make a backup of your latest build project and disable some of your objects and other gameplay features, whatever this may mean in your particular case. If the game compiles well and runs smoothly then you know the problem was somewhere among the stuff you turned off so you can sift through the code and dependencies there. If You still don't succeed, then try to delete everything but the core mechanics and see how it performs. Not the fastest method but still doable.
If you make a daily back-up of your project you could also try to compile those one after the other and find out in what build the bug was introduced, which should also narrow down the problem.
I hope this helps and good luck!
A memory leak would gradually slow the game down before it would crash, and that's not the case here as far as I can tell.
The most common cause for this is while-loops or the do-until-loop.
However, 1 second before the crash, the game just suddenly stops except the sounds and music.
I forgot to mention, my game is exactly like the one from the second tutorial for beginners, with some objects appearing after X seconds without limits (so that they can fill the entire screen after a while). And the crash doesn't happen in a very specific moment, but randomly.
For now I tried removing all the sounds and even some objects, same problem occurs. I suspect this is because of the "create application" gone wrong, because before that everything was fine.
Sorry for my ignorance, what are the while-loops and do-until-loops?
You could upload the .gmk file so we can take a look to see if there's any errors in your code or if it crashes for us aswell
I got the .gmx though.
EDIT: deleting the test project.
I deleted the object and removed it from the alarm in object1 and the application ran for 10 minutes straight, so you might just create this object from scratch again. Could have something to do also with the sprite itself, but I am just guessing.
By the way: For your next project I strongly suggest naming your sprites, sounds and objects ;)
I removed them too and it still crashed my game. Then I removed the dolan ducks and everything ran fine.
I'm afraid it crashes because of too much images/objects. If that's the case, how am I going to make bigger games?
Thanks for taking your time to help by the way, and yes, I will name everything when I will work on my own stuff. Since I'm just following the tutorials for now, I can save some time.
Since I am not using the drag-n-drop options and different events much (the one I use almost all the time is ExecuteScript), I can’t really tell why exactly your game crashes, maybe it has something to do with finding a free spot for an object to place when another moving/jumping object gets positioned at the same coordinates...
But with that said, GameMaker Studio is very robust and can handle hundreds of object-instances easily. For example, the game I am currently working on (► LUFTWIDERSTAND) sometimes has around 800 instances, all with collision checking and other commands every step. And the framerate rarely drops below 100 fps.
So Gamemaker can handle a lot of stuff, but it’s never too soon to think about optimization and where you can save your processor some work, e.g. instead of importing big sprites and scaling them down in Gamemaker, scale the sprites in Photoshop and import them at the right size, etc. Of course, optimization only really comes into play when you write custom code. But I am sure you will get there :)
I had to type the code "if place_meeting true - move_random" for every instance, so that the instances move into a random position if they collide with other instances.
I've also put all the sprites' origin in Center (very important for walls, since they were bugged before and the objects were going past them sometimes before).
Now the problem seems to be gone, never had a crash since then!