Stay Down Dev Log - Part 10 - Fit Canvas To Window
3 years ago
19
frank poth
html5
js
css
javascript
html5 game
programming tutorial
pothonprogramming
learn programming
programming
code
Hey, everybody! If you are looking for a tutorial on how to make your game's display canvas scale to fit the window without breaking its aspect ratio you have come to the right place. In addition to lots of code refactoring I'll be adding this functionality to my 2D game project. I'm using HTML5 and JS, but you could use the same logic in any application to make one rectangle scale to fit inside another.
What you'll see in this video:
00:00:45 - Refactoring the global object
00:03:45 - Refactoring the Game States
00:19:00 - Resizing the display canvas
00:24:00 - Testing it out
Thanks for watching! Check out the site! https://pothonprogramming.github.io
Loading comments...
-
42:04
Poth On Programming
3 years agoStay Down Dev Log - Part 12 - GRAPHICS!
22 -
35:57
Poth On Programming
3 years agoStay Down Dev Log - Part 16 - Improving The Framework
34 -
12:10
Linux GTK/Glade/C GUI Programming Cookbook
2 years ago31. Window size, Movement and Decorations
24 -
15:05
ProgrammingTuts
2 years agoWPF | Layout Panel | 5. Canvas | HD
20 -
7:22
varanda
3 years agoGimp Tutorial 6 - Canvas size and Image scale
43 -
4:04
GameboyEG
1 year agoLogitech Gaming App Or Scaling Display Fix Small App Resize Tutorial 125 4K
23 -
8:14
WINDOWS things
2 years agoFIXED UP TO 500% SCALE ON WINDOWS 10
35 -
56:15
Knox Game Design
1 year agoJavascript and HTML Canvas - Knox Game Design, January 2023
559 -
1:29
Salty the Geek
1 year agoMaster the Margin Container in 90 Seconds Quick Godot 4 Tutorial
31 -
5:11:15
ReelyCoding
5 months agoHTML5 Canvas Game Loop w/ Javascript
122