3 ms·
You might be very surprised at how achievable it is to build a game, as long as you start small and limit your scope. I’d to steer clear of turn based games if
by JoeyJoJoJr 3y ago
You might be very surprised at how achievable it is to build a game, as long as you start small and limit your scope. I’d to steer clear of turn based games if you are starting out, as they generally entail a lot of complicated UI.
Instead I would attempt to do some kind of action game with the 2D canvas context. You might start by just trying to get a dot moving around with the keyboard arrows. Do a little research into a very basic “game loop”, which is basically.
function update(){
//handle the input
//do some other stuff
}
function draw(){
// render code here
}
Once you get a ball moving around, tweak you program to add something else, like giving the ball gravity. Then add something else, like making it bounce off the sides of the canvas. Keep doing this until you have a basic game. You really only need to know a handful of techniques to get something basic working, and from there you’d be surprised at how far you can go. Don’t worry about code quality or trying to do it right, just try to figure out how you can get the game to the next step.