#joapet99 could you approximate how much time it needed for you to earn 40$? (100mbitcoin) I think I can do this as well, since I am almost glued to computer most of the time, I would like to know.
@Trufa actually, you might want to apply gravity to the velocity all the time, and just reset the velocity's y component when you hit a top of platform
@Trufa A naive approach: If you aren't jumping velocity is 0; When you jump you set your velocity in whatever way moves your character up. In your code I think that techincally means subtract velocity but I could be wrong. Then you let gravity act upon this new velocity naturally and your character will eventually slow down, very momentarily stop, and then start moving in the opposite directoin
@Trufa for simplicity, y > 0 means the object is moving up. y < 0 means the object is falling. y=0 means the object is neither moving up or down. When it jumps you could set velicity on y to be 10 pixels / second. First frame it would move up 10 pixels! Add gravity which we'll set to -1pixel/second for simplicity, and the next frame you will only move up 9 pixels, this continues until you've reached the top of the jump where it will move zero pixels, followed by -1, -2, and so on
Middle of the night. A car was in the other lane coming from the opposite direction. The shoulder was... lets say you didn't want to drive off it. And all of a sudden... DEER CARCASS IN THE ROAD. -_-
@Jon car is fine I'm pretty sure. Haven't ran out of any fluids and no funny noises anyway. Just some hair bits stuck to the bottom and a funny smell for a while. Seems to be all better now. We'll see what they say next time I get my oil change.
Hey people. Could I get a quick refresh on Delta Time ? :) Right now I am just updating the players position each loop by adding 1. How do I do this via delta time again?
@SpartanDonut one more question if you don't mind, what should I (generally speaking) name the variable that sets the minus velocity, is it like force or something like that?
var last = new Date();
function gameLoop () {
setTimeout(gameLoop, gameLoopSpeed );
var now = new Date();
var dt = (now - last) / 1000;
player.position.x += player.speed * dt;
last = now;
}
@Lasse Wait, do i have to install any libraries or stuff to be able to make simple games in C# with monodeveloper or does C# have like a standrad library with the basics?