Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
140 views

How to make objects appear on the map at a certain distance based on scale?

Mode7 - Sprites on Screen / Pseudo 3D Scale x1: Scale x16: I'm trying to recreate this system with JAVASCRIPT: https://github.com/vinibiavatti1/Mode7/blob/master/src/mode7/FlatModeSeven.java The ...
RpgBoss's user avatar
  • 111
0 votes
0 answers
146 views

Add a sprite, move with keys, Javascript example?

I have a small image (30x30 px) I want to use as a sprite on a Javascript screen to show students what Javascript can do. (They want to create games.) How do I link the image file to my Javascript ...
Jonathan Titus's user avatar
1 vote
0 answers
143 views

How to set pivot point for rotating a sprite?

Is there a way to set the pivot point for rotating a sprite? The default option seems to be arbitrarily chosen point on the sprite or the mid point. ...
Naveen's user avatar
  • 111
4 votes
2 answers
709 views

Why use sprite tile maps on the GPU in WebGL?

I'm trying to figure out the best way of rendering my layered tiled maps with WebGL, and have come across this tutorial several times: https://blog.tojicode.com/2012/07/sprite-tile-maps-on-gpu.html ...
Ryan Peschel's user avatar
-1 votes
1 answer
117 views

I do not understand the code version of time based sprite animation?

I'm Universo and for the longest time had coding issues around the concept of time-based sprite animation basically, do not know how to implement it and any code or explanation simple or complex that ...
Dominic Hughes's user avatar
0 votes
0 answers
72 views

solid color to sprite (javascript game)

Hi I recently created a javascript game, in this game, math random is used to pick a random shape. The shapes are in strings, and the associated numbers within the string are then used to show a color....
user145312's user avatar
0 votes
1 answer
431 views

how to join the body of snake in 2D snake game

i'm making a snake game in javaScript from scratch. The problem is that the snake looks disjoint(see image). How can I connect the body(rectangles) of the snake? here is the code of drawing snake: <...
Manik's user avatar
  • 107
1 vote
0 answers
251 views

Junk movement with steady 60fps on Web canvas

I'm new to building games on canvas, and I'm trying to create one. But I encountered a problem with sprite movements. My sprites move is smooth, but sometimes it starts to "jump". FPS is stable 60 ...
Anton Medvedev's user avatar
0 votes
2 answers
483 views

Why is my spritesheet displaying all messed up in game?

I'm having an issue I don't quite understand, where my spritesheet is looping strangely and not showing the full sprite I want, even though I feel like I'm specifying it correctly. My code is in ...
B.Batiege's user avatar
1 vote
1 answer
59 views

How can I have more values in array on X axis than Y axis in my tilemap?

Following my old question Array of map data renders the map the opposite way after I got the answer to it and fixed my problem, I got another problem that occurs. If my ...
Limpuls's user avatar
  • 189
3 votes
2 answers
3k views

HTML canvas how to create big game world and show only a part of it on canvas?

I originally created this question at stackoverflow but got no answers, so hopefully someone will be able to help me here. So for the first time ever I'm making a html canvas game. So far I came up ...
Limpuls's user avatar
  • 189
0 votes
1 answer
73 views

My sprite is not listening to any keyboard keys

First time ever creating html canvas game. Once I finally got my sprite ant tiles drawn on the canvas, now I want to make my sprite interactive. Unfortunately, for some reason it is not working. I get ...
Limpuls's user avatar
  • 189
0 votes
1 answer
169 views

Why my canvas isn't showing anything after I put code in the loop for tile map?

My canvas stop showing anything when I want to display a tile 25 times. No errors. Here is the code: ...
Limpuls's user avatar
  • 189
0 votes
1 answer
94 views

DOM for GUI - display animated objects

I'm creating an HTML5 game using Canvas, but want to use DOM for the GUI for the reasons mentioned in there articles: http://blog.sklambert.com/html5-game-tutorial-game-ui-canvas-vs-dom/ http://www....
user3871's user avatar
  • 1,055
3 votes
1 answer
1k views

DrawImage problem adjacent sprite?

Context I'm building a 2D game from scratch in JS. I'm drawing the map by using rpgmxp tilesets for the moment just to have some resources : Each tile is 32*32 pixels. I'm using canvas API with ...
ElJackiste's user avatar

15 30 50 per page