8 years ago
by Bum
I have title screen that is very detailed with BIG sprites. The gameplay the sprites are 16x16 and too small. I tried scaling the game, but only the canvas scaled and not the sprites. I need help scaling my game so that the gameplay screen is just as big as the title screen.
8 years ago
by Joncom
I tried scaling the game, but only the canvas scaled and not the sprites.
Your sprites should be drawn larger if you're increasing scale...
Can you show the line of code where you're increasing scale?
It should be the one starting with
ig.main(...
8 years ago
by Bum
Code here:
http://pastebin.com/Tdd37b1b
Title Screen fits the canvas but that's because I drew big sprites
Then I transition to the gameplay screen and the canvas is tiny located at the top-left corner of the screen
8 years ago
by Joncom
Based on your code, I don&039;t see why your canvas would be one size at the title screen, and a different size in-game. I only see a #resize
function that changes the canvas size if the browser window is resized.
I see you're using a "splash loader". Perhaps that is what you are calling the "title screen", and your 'gameplay screen" is what follows after that?
8 years ago
by Bum
The title screen and gameplay screen are both levels.
I tested by starting out with a smaller window and scaling before and after the level loads. Similar results.
I'll try forcing a scale on startup for both scenes and share what the results are.
Page 1 of 1
« first
« previous
next ›
last »