[Solved] Issues with a new movement method.

Hello all,

Today I implemented a new method of movement and there are things I would like to change but don’t know how.
GitHub repo: https://github.com/WillchillDev/Game
Video: http://youtu.be/x4fNMCjX1Do
Issue 1: The speed is too fast for my liking and I can’t think of a way to slow it down. How can it be slower?
Issue 2: I would like the tiles to be scaled up to 3 or 4 times the size of what they are now.
Issue 3: Any combination of horizontal and vertical keypresses stop movement entirely.

Thanks for your help.

hey,

so ive never worked with lwjgl but i just looked at the docs in order to try to help you and i have to say i reallllyyy dont like it.
Also sadly your code aint really commented at all so i had some trouble, but i think i might understand most of it now.

anyways,
Issue 1: i kinda find it strange to let the level move how you do it(if ive seen that right). but i suppose you could change the speed ?
or if this doesnt work you could :

	Game.level.xoffset -= (int) x * 0,5;
		Game.level.yoffset -= (int) y * 0,5;

Issue 3: now in order to that i would add debug lines here :

		if(keyboard.pressedKeys.contains((Integer) Keyboard.KEY_W) && keyboard.pressedKeys.contains((Integer) Keyboard.KEY_A)){
			System.out.println("[Keyboard] W + A pressed - this works");
			this.playerMove(-speed * Math.sqrt(0.5), speed * Math.sqrt(0.5));
			return;
		}

and in the checks for the other keychecks.
Also i would add something like :

	public void playerMove(double x, double y){
		System.out.println("[PlayerMove] -  X : " + x + " - Y : " y );
		Game.level.xoffset -= (int) x;
		Game.level.yoffset -= (int) y;
	}

maybe this way you can see the problem.

Issue 2 :
cant suggest much there, i just found this:

glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, <texture shrinkage filter>);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, <texture expansion filter>);

which maybe will let you expand or shrink your stuff :smiley:

Thanks for your help. Along with some information from other resources, I have managed to resolve all of these issues.

Thanks!