What I Would Use to Make a Tiny Christmas Game Playable in Browser
I really like PureBasic.
However, it doesn't build for web. They have SpiderBasic for that.
I've narrowed my choices down to:
- TIC-80
- Javascript Canvas API
TIC-80 has a 240x136 resolution - way too high for my needs. 😅
So I'd program the game for a 120x68 resolution then scale it up by doubling the default window scale:
scale(2)
TIC-80 has built-in sprite and map editors. Programming is done in Lua.
It builds natively for Linux, MAC and Windows and also for web. On the web page, the game will already be scaled up and also supports Full-Screen toggle.
For Javascript Canvas I'd use 160x90 resolution.
<canvas id="gamescreen" width="160" height="90"></canvas>
And scale it up 7x7...
#gamescreen
{
width: 1120px;
height: 630px;
}
I'd program the toggle between full-screen and browser window. I already have my own map and retro sprite editors.
And I'd disable smoothing to get clean pixels! Actually, I'd need to disable that on any window resize too. 🙄
const screen = document.getElementById('gamescreen');
const graphics = screen.getContext('2d');
graphics.imageSmoothingEnabled = false;
Yes, I don't use standard naming like canvas and ctx for the "Context".
I prefer clarity over convention... simplicity > abstract technical crap.
There's my technical term. 😂
Both seem like solid options.
I guess I should do a bit of prototyping both ways.
Whichever path proves to be the easiest, fastest is the best one in my opinion. 😊