Didn't really notice that it was this long since I last posted about my game...
Well it's still there although I had a really long break from working on it. But I'm back on track now.
I added quite some stuff like slopes and different enemies, new tiles and sprites... and well, stuff
One of the enemies chases the player and tries to jump him in order to suck his blood and you will have to have a good timing to get rid of it once it's stuck on you. It's the smallish thing in the lower left corner of the wip screen and its behavior is based on Deadeye's enemy AI example, thx for that btw!
Had a pretty hard time making those enemies work on slopes. Although I had a very simple solution at first which seemed to work perfectly in a standalone cap. It kind of broke in my game cap, resulting in the enemy getting stuck sometimes when moving from slopes to solid again. I still can't explain why this happened but I finally seem to have a workaround for this problem.
Just recently I ran into a much bigger problem: the framerate drops dramatically causing the whole game to feel very laggy. Sometimes it's even like the player is teleporting instead of proper moving through the level.
I compared it to the cap from the last beta build for my testers, which was still perfectly smooth. Major difference: 197 events as opposed to 348 in the most recent cap. Which means I added 151 events in the last two weeks. And something I added or changed was really bad for the performance.
But I can't quite think of the cause since I mainly added events regarding enemy behaviors while the custom engine remained the same for the most part. I compared the CPU usage too: It's about 20-30% for the older version and 40-50% for the newest one. Pretty damn big difference if you ask me.
Well I don't suspect that it's just too many events or loops. My believe is that Construct is capable of handling a lot. Still I'd like to know if somebody experienced something similar with event-heavy caps or certain events which tend to slow down games significantly. So if you have any experience with this or a similar issue I'd love to hear about that. Till then I'm continuing to investigate the big bad slowdown originator.