Tag Info

New answers tagged

0

Thanks for the help. I solved my own problem. it seems that a simpler way to put it would have to place the game on another html page and then embed it with an iFrame tag! like <iframe src="game.html" height="550" width="800">game not available</iframe> And the text "game not available" is a displayed text when the iFrame fails no embed the ...


-1

If you're looking at something free for now, try the MightyEditor http://mightyfingers.com/editor-features/ Cheers!


0

You can use ctx.translate(dx,dy) to scroll the camera. Alternatively, have a camera object with x,y coordinates, and when drawing game objects, draw at object.x - camera.x.


0

Your code is a little strange. If you want to rotate around the Y axis, then you change the X and Z coords, but you're altering Y and Z. This code rotates smoothly around Y: function rotateCameraY(radiansIncrement) { var x = _camera.position.x; var y = _camera.position.y; var z = _camera.position.z; var signx = x > 0 ? 1 : -1; // get current radians ...


0

I suggest for a quick fix just implement your weapon using collision boxes with trigger assignments then go from there void OnCollisionEnter(Collision col){ if(col.collider.gameObject.name == "Enemy" /*or tag*/){ //apply damage! } } P.S Thanks for helping me fix send message haha I hope this helps you!


0

replace this line: var angle = ((b.GetAngle()*180)/(Math.PI))/SCALE; with this: var angle = b.GetAngle(); the input parameter in ctx.rotate should be in radians, so there is no need to convert it in your code in any way. The output of b.GetAngle() is in radians.


3

You shouldn't use equal intervals for game loop. Instead of this use time_delta (current_time - last_update_time). Send time_delta to game object's update method and update position and other parameters depending on time_delta. For example, simple object moving with const velocity will be: function update(time_delta) { position = position + velocity * ...


0

Seems like this is a issue with most game developers. Similar issue "I'be often heard that phonegap wasn't the best choice when wanting to make canvas game. It's more adapted to web app to native." It seems to be rendering issue capabilities for android phones. There are some engines that can not handle more sprites rendering. I know 10 objects are easy to ...


0

It seemed that the problem was fixed by using the 32-bit version of python instead of the 64-bit.


0

From your code : if (keydown.right) { if (player.frame != 4) player.frame = 4; else player.frame = 8; player.direction = 'E'; player.x += 3; player.color = "blue"; } I can tell that the images are switched every update as long as the key is down. There are all kinds of ways you ...


1

Overview Essentially I think your talking about the problem where objects move to far in a single update step thus allowing them to seemingly pass through walls. This is a common problem, but an understandably irritating one for the player - although sometimes it's fun. Direct Solution The most direct way of answering your question I can think of is to ...


1

You need to handle the player objects velocity vector i.e. it's speed and direction. You also need gravity as a constant downward acting force. Finally you also need to be able to detect if/when the object is standing on firm ground i.e. when they are able to jump (in this case it appears to be fairly straight forward matter of floor y = 0, i.e. if y==0 then ...



Top 50 recent answers are included