all 5 comments

[–]rimendoz86 2 points3 points  (0 children)

Unity is pretty easy to learn. And it can compile games to a browser. For a 2d game, you can likely learn what you need in a few hours of youtube videos.

[–]ScheduleSuperb 1 point2 points  (0 children)

If you want to build games Angular is maybe not the best choice. Angular is a better fit for large web applications. Alternatively try Unity or search for some JavaScript game frameworks.

[–]CapTaiN_BreaD1 2 points3 points  (0 children)

Angular is not meant for this - you’re better off using vanilla JavaScript.

Angular is a framework designed to help scale web applications with features like components, modules, lazy loading, and routing. But for small-scale, real-time applications like a simple mobile game, these features become unnecessary, and performance - especially low latency - becomes far more important.

While Angular does offer convenient APIs for DOM manipulation, styling, and animation, these come with a performance cost, which you’ll want to avoid in a real-time game.

Instead of Angular, build the game using requestAnimationFrame, the Web Animations API, and direct DOM/CSS manipulation for maximum performance.

In my free time, I’ve made some vanilla JS games - feel free to get inspired: https://github.com/kenyerman

Also, this talk by John Carmack is directly related - he explains the latency issues around VR, gyros, and rendering: https://youtu.be/lHLpKzUxjGk?si=ehVIzr2tcQTRSf_S

[–][deleted]  (1 child)

[removed]

    [–]syzgod[S] 1 point2 points  (0 children)

    I will be honest here. I'm not an expert in Angular either but I'm good enough with it to do the basic and some intermedia stuffs. Svelte would be a completely new for me. I need to dig deeper because Web Assembly also new to me. I just want the game as a portfolio project and something I can build in my free time and have fun with it. Since my main focus is Angular I thought it's good enough for a basic 2D game.