Graphics follow the screen if you move too fast? [Stage3dPunk]


(John Andersson) #1

Hi.

If my character moves too fast, some of the graphics from the game (which are part of the terrain, like blocks and stuff) follow the screen (they are stuck to the left of the screen on the edge). It’s a a purely graphical glitch, they don’t register hits or anything.

If I set the spawn on my hero in the middle of the map instead of on the far left, then there is always some type of this glitch occuring.

Any ideas where to start on troubleshooting this?


(Mike Evmm) #2

I had a similar problem, but with Dave’s Stage3DPunk. Just to confirm, are you using vanilla FlashPunk?


(John Andersson) #3

I am using stage3dpunk! Did you solve it?


(Mike Evmm) #4

Be sure to mention it next time, this could’ve caused some confusion! Try setting enableLazyVertexes (or something of the effect) to false.


(John Andersson) #5

I tried it, but it didn’t work.


(Mike Evmm) #6

Talk to Dave, he made the thing! :wink: Either way, it’s happened before to me, but not only it occured randomly, setting tht flag to false fixed it, if i recall correctly


(Ultima2876) #7

Yeah, that’s a bug with the enableLazyVertices (which I really should fix!) and should be fixed by disabling that flag. Did you definitely do that correctly (in Main.as, after your super() call)?

For future reference, please contact me directly through KickBack Games support in future as this forum is for vanilla FlashPunk only! Thanks!


(John Andersson) #8

Okay, I will contact you there in the future, but just to end this conversation here, what do you mean changing it in Main.as? How do I do that? I thought I could just change it directly in Engine.as :open_mouth:


(Ultima2876) #9

Did you check out the example projects that came in the zip? If you look in Main.as in one of those, you’ll see a bunch of flags being set. Wherever your game extends Engine to perform the initial setup of your game (super call etc), you can change those flags. I don’t recommend changing them in Engine.as, because all your flags settings for your game will be wiped if you ever update the engine (though there haven’t been any public updates since launch yet).


(John Andersson) #10

Hi, I now disabled the lazyvertexupdates in main.as, but the problem persists. Also, now that I think about it, why is “super” necessary? I tried removing “super.init();” and the game works just fine…


(Ultima2876) #11

Can you show me your Main.as? That doesn’t sound right to me…


(John Andersson) #12
[SWF(width="1664", height="960")]
 
public class Main extends Engine
{
	public function Main():void 
	{
		super("game", 480, 270, 60, false, false, 1);
		FP.screen.scale = 1;
	}
	
	override public function init():void 
	{
		FP.console.enable();
		FP.console.toggleKey = Key.ENTER;

		super.init();
		Engine.enableLazyVertexUpdates = false;
		
		FP.screen.color = 0x4A8EFF;
		GameWorld.currentLevel = 6;
		FP.world = new GameWorld(Maps.TILESET);