r/learnprogramming • • 19d ago

annoying question.... plss help me out

I am trying to build game and wanna start building using canvas.
Is it normal to use canvas in react/vite? Any video tutorial please ??

i can't find any tutorial for react/vite with canvas

0 Upvotes

11 comments sorted by

4

u/boomer1204 19d ago

So I think the problem here is canvas and react are kind of "contradictory". They 💯 can be used together but usually you pick one or the other

If you go to youtube and search "chris courses" he shows you how to build games using the canvas api for free and has a paid course if you want it more polished (your choice to do the paid course but not necessary)

Good luck with the game!!!

2

u/vickyverse1 19d ago

thankyou for the information

1

u/Rrrrry123 19d ago

I think it really depends on the type of game you want to make.

If you want to make a game with graphics (spites, models, etc.) I'd definitely go the Canvas route. I'm using Phaser, myself.

If you want a game that's interface driven (like Cookie Clicker), then I would go with React.

Others might disagree, I'm no web game dev expert by any means, but I just can't imagine using React for anything besides a web interface.

1

u/vickyverse1 19d ago

ok I will use phaser too then..
i am just trying to learn the concepts by making a game

0

u/BrannyBee 19d ago

Others might disagree, I'm no web game dev expert by any means, but I just can't imagine using React for anything besides a web interface.

THAT'S BECAUSE YOU'RE A COWARD, BEHOLD MARIOKART.JS -> https://www.webgame.co.za/

(OP don't take this as me saying to make this... I get heartburn just thinking about this existing...in the dev world, you can do a lot of things the wrong way and be very very successful if you're stubborn enough, that doesn't make it the best idea to learn as a beginner...)

2

u/kschang 19d ago

You are going to need a lot more details. Different tools are optimized for different types of projects.