All Questions
Tagged with sprites javascript
40 questions
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 ...
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 ...
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.
...
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
...
-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 ...
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....
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:
<...
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 ...
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 ...
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 ...
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 ...
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 ...
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:
...
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....
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 ...