Tagged Questions
2
votes
2answers
111 views
Canvas Rotation collision detection on a sprite
I am using this code to detect collisions between two rectangular sprites.
intersect: function(other) {
return this.x < other.x + other.width && other.x < this.x + this.width ...
3
votes
1answer
111 views
Best resources for Canvas Html 5 development
I am at a competition at work for who can make the best canvas game. Theme is a top down shooter... Winner gets dinner for free.
Anyways I have been looking around looking for some good resources on ...
6
votes
2answers
160 views
How to scroll hex tiles?
I don't seem to be able to find an answer to this one. I have a map of hex tiles. I wish to implement scrolling.
Code at present:
drawTilemap = function() {
actualX = Math.floor(viewportX / ...
0
votes
1answer
67 views
Calculating bullet travel knowing coordinates and radian
I have a player sprite that has a x and y coordinate and also a radian. The radian determines which way the sprite faces in a top-down game interface. In this case, the radian points from the player ...
1
vote
1answer
186 views
Collision detection between a sprite and rectangle in canvas
I'm building a Javascript + canvas game which is essentially a platformer. I have the player all set up and he's running, jumping and falling, but I'm having trouble with the collision detection ...
1
vote
2answers
162 views
How to draw objects that have a smaller Y axis first?
In my game there is a large 2D map of various objects. Example. As you see, upon creation objects of the same type (trees for example) are placed correctly, but objects of another type (enemies) are ...
2
votes
2answers
118 views
Animating sprites at different speed than what the game runs at
I am building a Javascript/canvas platformer game, and it's coming along nicely. The only problem I've really run into where I can think of any solution at all is the animation of my player sprite.
...
3
votes
1answer
236 views
How do I implement side scrolling in a javascript platformer?
I'm building a side scrolling platformer with Javascript and the canvas element for a school project. I have the character all sorted out. He runs left and right, and has a different sprite set for ...
1
vote
1answer
87 views
How can I center a circle around a point on an HTML canvas?
I've got a job to make an engine and light game for canvas in HTML5. I like the things I make to be centered on the x,y positions I give it, I don't know why, it just helps me think about them ...
0
votes
1answer
395 views
Has anyone used PhoneGap to make 2D games for the iPhone? [closed]
I love simple casual games. I've been riding the bus a lot recently and so simple, no-brainer games are great fun and well worth the small price I pay on the App Store.
It got me thinking... I know ...
3
votes
2answers
147 views
Calculating the angular direction from velocity
I'm trying to calculate the angular direction of a projectile, knowing it's X and Y velocity I can find the magnitude of its movement, but I'm having a hard time wrapping my mind around getting the ...
1
vote
1answer
173 views
Tile Map Coordinates
I am have now this code: http://jsfiddle.net/DK67k/2/ In here is 2D tile map and when you click on tile you get coordinates on alert. But for get precises coordinate you need click on top left ...
3
votes
2answers
460 views
HTML5 canvas screen to isometric coordinate conversion
I am trying to create an isometric game using HTML5 canvas, but don't know how to convert HTML5 canvas screen coordinates to isometric coordinates.
My code now is:
var mouseX = 0;
var mouseY = 0;
...
1
vote
1answer
185 views
Converting Doom maps to JSON
This is a really cool demo of a Canvas Doom Engine made back in 2006:
http://canvex.lazyilluminati.com/84/play.xhtml
Here is the e1m1 map in JSON format:
http://canvex.lazyilluminati.com/84/map1.js
...
3
votes
3answers
878 views
Chrome Angry Birds engine?
Was Chrome AngryBirds game made using html5 canvas? And if yes: what kind of engine did they use?
1
vote
1answer
595 views
Smooth animation on a persistently refreshing canvas
Yo everyone!
I have been working on an Isometric Tile Game Engine in HTML5/Canvas for a little while now and I have a complete working game. Earlier today I looked back over my code and thought: ...
8
votes
8answers
1k views
How should I sort images in an isometric game so that they appear in the correct order?
This seems like a rather simple problem but I am having a lot of difficulty with it.
What should I do to properly sort images in an isometric game?
In a normal 2d top-down game one could use the ...
10
votes
4answers
1k views
Are there any alternative JS ports of Box2D?
I have been thinking about creating a top down 2D car game for HTML5. For my first game I wrote the physics and collisions my self but for this one I would like to use some ready made library.
I ...
1
vote
3answers
403 views
Where to start, to develop an online Backgammon game?
I would like to develop a backgammon game to play against other players online, as a way of learning more Javascript/jQuery and a little game development. I'm a web developer and most of my experience ...
13
votes
5answers
3k views
HTML5 Game (Canvas) - UI Techniques?
I'm in the process of building a JavaScript / HTML5 game (using Canvas) for mobile (Android / iPhone/ WebOS) with PhoneGap. I'm currently trying to design out how the UI and playing board should be ...
0
votes
1answer
251 views
HTML Canvas drawing - Firefox error
I am getting the following error ONLY when running my game in Firefox (3.6)
Component returned failure code:
0x80040111 (NS_ERROR_NOT_AVAILABLE)
[nsIDOMCanvasRenderingContext2D.drawImage]
...
13
votes
1answer
2k views
Double buffering on HTML5 Canvas game?
My simple canvas game seems to work fine on Chrome and FF on Mac/Linux. I haven't had chance to test it on smart phones or Windows environments yet. It doesn't use double buffering but I have seen ...