This is something I've been putting off for ages, but can't any longer.
My game Don't Panic Dizzy sometimes slows down or even freezes in particular places on the map. It's always in the same places and it's been doing it since it was about halfway complete.
What's weird is that it doesn't happen when the handlers are most busy. In fact, there's two places where it happens, and they're amongst the quietest bits of the game, in terms of the size of the UpdateRoom functions and so forth.
Does anyone have any thoughts on what might be causing it? I realise this is a bit advanced.
Hmmm, depends what you're trying to do in that area I guess. I think the only game I've ever known to slow down was Rock Dash Dizzy when I was developing it, and even then that was only because I was trying to change something like 9 object variables for about 200 different objects, all at the same time...
Assuming it's a standard platformy game, there's no way it should ever slow down that much. If it's still happening, send it to me, explaining what you have to do to get to that point, and I'll try to have a look at it sometime (no promises though).
It could also be a case of something in the map at those places that you've forgotten to change the properties of, or delete and it's conflicting with something else. Sometimes it helps to open up a new map and just add the rooms in questions (with new IDs for the brushes) to see if the same problem occurs. That or just make a copy of the whole game and slowly delete items in those rooms to see if anything is left behind (do the background last and then switch to the 'paintbrush' view to outline the whole room and see if it registers another brush present)
I've sent Noggin an email. I'm pretty certain I've found the problem (although I can't be certain, as my computer runs so fast that there isn't actually any problem when playing it on my computer!)
Basically the problem seems to be massive tiles - in this case, just a huge black background that stretched over about 24 rooms! Remove the massive tiles and the problem vanishes.
Still took me a good hour or so to find that out, but there y'go...
Jamie, are we talking about a smallish 'background' tile (such as 'sky') that is stretched over a large portion of the map, or one massive tile? I remember you explaining about maximum tile sizes, but was wondering if the same applied when adding tiles to the map.
On a different matter regarding 'water play' I now use the 'G_WATERX' etc coding you sorted for respawning back on land and use the default of 'death 5' for water, but I can't find the coding you mentioned about not floating up to the surface but just wobbling for a couple of seconds before drowning. I think it's a change in the Player.GS file in the func PlayerPlayDeadWater that checks for P_MAT_CENTER = MAT_WATER, but I'm not certain how to change it. I've checked your games but can't find it. Grateful if you could point me in the right direction.
Steve, yes the problem was a small tile stretched into a large brush. I was basically just using a plain black 8x8 tile and painting it over anywhere there wasn't a window, so you couldn't see the spacey background through any gaps in the walls. Somewhere I'd got it in my head that it'd be better to use fewer big brushes than many small ones. Jamie's advice was to use brushes no larger than a room or even to use one room sized object and have it move round with the player. Can't help you with the other thing.
On a different matter regarding 'water play' I now use the 'G_WATERX' etc coding you sorted for respawning back on land and use the default of 'death 5' for water, but I can't find the coding you mentioned about not floating up to the surface but just wobbling for a couple of seconds before drowning. I think it's a change in the Player.GS file in the func PlayerPlayDeadWater that checks for P_MAT_CENTER = MAT_WATER, but I'm not certain how to change it. I've checked your games but can't find it. Grateful if you could point me in the right direction. Oh good lord! I can only find Bubble Trouble Dizzy that I changed the drowning script in (obviously didn't want him floating all the way to the top in that!) Yes you're right, it's function PlayerPlayDeadWater() in player.gs that's called. The code is exactly the same as standard, except I removed the following section, which is the bit that moves him up while he's in water material: