Tagged Questions
1
vote
2answers
473 views
Efficient collision detection - tile based HTML5/Javascript game
I'm building a basic RPG game and I'm looking at collisions/pickups etc now.
It's tile based and I'm using HTML5 and Javascript.
I use a 2D array to create my tilemap.
I'm currently using a switch ...
2
votes
1answer
166 views
Collision detection problems - Javascript/Canvas game
What I want to do:
I simply want the have a 2D array to represent my game map.
I want a player sprite and I want that sprite to be able to move around my map freely using the keyboard and also have ...
31
votes
2answers
2k views
In a browser, is it best to use one huge spritesheet or many (10000) different PNG's?
I'm creating a game in jQuery, where I use about 10000 32x32 tiles. Until now, I have been using them all separately (no sprite sheet). An average map uses about 2000 tiles (sometimes re-used PNG's ...
3
votes
4answers
617 views
What would be a good way to implement/render a 2D tiled map for a browser game?
I've made this little RPG Ruby game I did while learning and now I'd like to make it into a browser game. I've already set up Sinatra framework to serve it, so what I am looking for, before everything ...
-4
votes
1answer
303 views
Smooth scrolling a staggered iso map [closed]
I got a staggered iso map that I want to be able to drag scroll with the mouse. I have it almost working but it is a bit glitchy, especially near the borders. Maybe you have an idea how to fix that.
...
3
votes
1answer
774 views
Canvas tile grid, hover effects, single tilesheet, etc
I'm currently in the process of building both the client and server side of an HTML5, canvas, and WebSocket game.
This is what I have thus far for the client: http://jsfiddle.net/dDmTf/20/
Current ...
1
vote
1answer
531 views
How to draw a tileset using HTML5 canvas?
I have a tileset something like this:
0, 1, 2, 3, 4, 5,
6, 7, 8, 9, 10, 11,
12, 13, 14, 15, 16,
17, 18, 19, 20
My tileset draw code looks like this:
var image = new Image();
image.src = ...
7
votes
1answer
572 views
2d, Top-down map with different levels
So, I'm creating a 2d, top down, sprite based (tiled) game, and right now I'm working on maps (well, a map editor at the moment, but it will be creating my maps, so basically the same thing).
The ...
7
votes
2answers
694 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 / ...
5
votes
2answers
804 views
Arrays for a heightmap tile-based map
I'm making a game that uses a map which have tiles, corners and borders. Here's a graphical representation:
I've managed to store tiles and corners in memory but I'm having troubles to get ...