The Daily Click ::. Projects ::. Twisted Tower - Chapter 1
 

Project: Twisted Tower - Chapter 1
Project Started: 19th December, 2010 Last Update: 5th March, 2017
Project Owner: HitmanN Project Members:
Project Type: Dungeon Crawler Platformer Project Progress:

Problems D:
Posted 6th Feb 11, by HitmanN  
Unfortunately, this weekend's update doesn't really have anything new to show. I spent the whole week trying to figure out two issues I came across suddenly.

If any of you have encountered this problem, or have suggestions where to start looking for a solution, please do let me know.

Problem 1
In future, I was planning to have parallax backgrounds for levels that take place in outside environments. Like town(s), forest/snow levels in further chapters, etc. I simply tried adding a new layer beneath all the existing layers, and the CPU usage spikes rapidly and the framerate crawls to near halt from tiniest of activity in the level. Placing the layer below/above any other layer than the bottom-most layer (which is what has just about everything going on, except for HUD elements) doesn't cause this slowdown. I've managed to track the problem down to the Active Pictures where I load the level graphics from. Somehow it probably messes up the collision mask or something.

A topic about this problem is also on the Clickteam forums, here:

http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=221346&page=1

I've listed some of the things I've tried in there, so before you suggest anything, please do check out the topic. ^^; I need more fresh ideas and suggestions.

In any case, I'd rather not switch from Active Pictures to something else unless it's certain that Active Pictures don't work for my plans.


Problem 2
The framerates of my MMF2 applications have suddenly gone nuts.

Relevant topics at Clickteam forums:
http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=220648&page=2
http://www.clickteam.com/epicenter/ubbthreads.php?ubb=showflat&Number=222159#Post222159

Normally, when I've run an application which has had a framerate of 60 set in the runtime settings, the debugger shows the FPS to flicker between 59/60. Works fine.

Now, whenever I run an application with framerate set to 60, it flickers between 58 and 64, or 57 and 63, or any combination of those. It's like the framerate is constant 58 for 9/10 frames, and every 10th frame it's 63 instead. The result is that the scrolling often twitches annoyingly, like every 10th or so frame is skipped. I've noticed that using v-sync makes FPS normal again, but with the potential of large amounts of random enemy spawns in the game, I can't use v-sync, as having halved framerates would become too common on low-end machines with the large amount of enemies. :<

At first I thought this was because I had updated my MMF2 from HWA build 249 to build 251, but now I'ved noticed that the problem applies to non-HWA MMF2 applications as well. Because I can't remember installing or uninstalling any new hardware lately, that doesn't seem like the problem. I've uninstalled and updated a few applications, but none of them are graphics related, so I dunno if any of them could cause this. I'm quite at a loss with this one. >_<

Looks like this can be solved by changing monitor refresh rate. I didn't need to do that before though, and I still don't know what brought on this requirement, but at least I have a temporary solution for now. Still baffled about the 'Active Picture + extra layer' issue though.

Refresh rates were not a permanent solution, it seems. Problem still persists. *sigh*


So...
Any ideas where I could start searching for the problem and/or solution to either the first issue? Would be hugely appreciated.

It's tough to focus on any new content while these problems keep lingering around. Problem #1 isn't crucial, I can design the game without the extra layers if needed, but the FPS problem is driving me a bit nuts.

I did add some variety to the brick tiles, and a few new frames to the main character's animation during the week, but other than that, no progress.

Posted by HorrendousGames 6th February, 2011

It's a tough call on number 2 without looking at the source code, although I remember a few people claiming that if you are experiencing random slowdowns, you can try copying all the code and objects to a separate .mfa and see if that fixes it, kind of a pain, but if you've got no other options you might try that. The other last resort is to just use V-Sinc and tell the users that are having frame rate issues that they'll need to upgrade.

For the first issue, what are you trying to accomplish using the active picture? I might have a work around.
 
Posted by HitmanN 6th February, 2011

HorrendousGames:
Regarding Problem #2, the same issue happens with just an empty project. I can start up either HWA or non-HWA MMF2, start a new project, run it, and I get the twitchy FPS. No events, no objects, nothing. Unless HWA build 251 somehow managed to mess up both HWA and non-HWA runtimes, it doesn't seem like a problem with MMF2 itself. :/ I haven't tried a complete reinstall though, but I think I will, if I find nothing else that could fix the problems.

Regarding Problem #1, I simply have tilesets (3 of them, each in different active picture, but I've tried with just one, and it seems to make no difference) that I load the level tiles from. The levels are built from small arrays, each representing a 16x16 tile section of a map. There's a maximum of 6x7 of such sections, though usually only 5-20 get used, while others are simply a full wall. The tiles are pasted one by one, with 'add to backdrop' action.

I'm kinda curious though, if there's a notable difference in performance between pasting/blitting graphics or adding them as backdrops, CPU usage -wise. I've gotten the impression that 'add to backdrop' should run well even with thousands of tiles, so I've been using that method.
 
Posted by alastair john jack 7th February, 2011

Clickteam need to make MMF3.
 
Posted by HorrendousGames 10th February, 2011

Sorry I forgot I posted this on here.

Yeah that #2 one sounds tricky, I wouldn't even know where to start with that.

With the level editor, is it a visual editor or do you just edit the array directly?

http://dl.dropbox.com/u/16909290/VengeEdit.zip

This is an editor I'm currently working with, although this was made in construct, it works without loading the images at runtime (or what it sounds like in your case, you're simply resizing the picture). While in this one, it uses a different sprite for each tile/object (with the exception of the fringe tiles), it loads them all using a single line of code, so for each object added in you would not need to create a separate line of code, all you'd have to do is bring the images into MMF2.
 
Posted by HitmanN 10th February, 2011

HorrendousGames:
I've made an editor that uses a tileset (one image in an Active Picture object). In addition to backdrops, I have a bunch of actives representing various spawn point types. Very few items are ever specific, so the graphical look of the spawn points is not relevant, as they could just as well spawn a crate, vase or lamp, for instance.

I'm really more curious about which actions would be the best way to add backdrops, while also being allowed to have a layer below the layer where the backdrops were pasted, without the game crawling to a halt from CPU usage while playing the level. :/
 
Posted by HitmanN 10th February, 2011

Waaaitaminute!

After days of fiddling, trying to get the FPS problem go away, I just loaded the latest version of the project, slapped an empty layer below the gameplay layer and... nothing. Works like a charm. No CPU usage, no slowdowns beyond normal, etc.

There's roughly a dozen reasons what could've fixed the problem, but I haven't the slightest of clue which one did it.

Reinstalling MMF2 and HWA?
Updating GFX card drivers?
Updating DirectX?

Those come to mind first, but there's more.

A shame that I still haven't found a working solution for the FPS problem, though. Anyways, looks like the layer slowdown problem is no more! Yay!
 


 



Project Forums


Favourite

Advertisement

Worth A Click