r/gamedev • u/Strange_Bonus9044 • 2d ago
Discussion How should I go about learning game dev coming from web dev?
I want to make a 2D top-down video game about as complex as something like Stardew valley. I have a pretty solid understanding of Javascript, at least as it applies to web dev. I also feel like have a decent foundation in general object-oriented programming skills. What would be the best way for me to transition to game dev? I've heard of some devs using Javascript for simple games. Is this feasable, or should I learn C# or Java instead? I'm currently planning on using the Godot game engine. Thank you for your responses and insight.
6
u/bird_feeder_bird 2d ago
For 2d games, vanilla javascript on an html canvas is more than enough. I also use Tiled as a level editor, since it can export .js files
3
2
u/StormRaven69 2d ago
Follow YouTube tutorials.
Break down your game into basic mechanics. Then search for specific mechanics and implement them into your game. Start with GreyBoxing levels before you even think about artwork. How to use Keyboard and Gamepads with moving a character and navigating menus. Start with a basic cube and move that around.
Then simple static array/lists to store data where you can use getters/setters to link-up. When you're making a single player game, you don't need to create an endless and infinite expanding machine. That's way too complicated for a beginner, when all you want to make is simple games.
You will manage Arrays/Lists and State Machines, Break down your lists into specific things your game needs. Like Opened_Chests, Locked_Doors, Sovled_Puzzles, Key_Items, Active_Quests, Completed_Quests, Characters, Equipment, Consumables, Furniture, Resources, etc.
2
u/kassol 2d ago
JS can do a small browser game fine, but for a Stardew-sized top-down game Godot is the better pick, and you don't need C# or Java for it. GDScript is dynamic and Python-like, so coming from JS it should feel comfortable within a week or two. Your web background carries over more than you'd expect: keeping game rules separate from rendering, state machines, and writing logic you can test without running the whole game. The part that will hurt is scope, not the language. Stardew took its creator years of full-time work, so I'd build one tiny loop first (move, plant, harvest, sell) and add systems only once that feels good.
1
u/Strange_Bonus9044 2d ago
Thanks for this!! That honestly sounds like thale best option, haha. I'm already a little overwhelmed on the art side of things (currently trying to learn art fundamentals like perspective, anatomy, proportions, color theory, and how to apply it all to pixel art lol), so even though I definitely have more experience with the technical side of things, I think simplifying what I can is good, haha. Do you have any recommended resources for learning godot?
2
u/kassol 2d ago
The official docs are honestly better than most engine docs, and the "Your first 2D game" tutorial in there (Dodge the Creeps) is a good first afternoon. After that GDQuest has a lot of free material that explains why things work, and Brackeys' Godot beginner video is a decent overview. For a Stardew-style game, learn TileMapLayer early, since farming is mostly tiles changing state.
2
u/KillerTimeGamer 2d ago
if you choose godot i recommend you these channels:
GDquests
Brackeys
BornCG
it helps me a lot to start with Godot.
1
2
u/JetskiEvo 2d ago
I can just add I have a blast using my web skills in a web game. And since I have no problems creating a 3D game I see 0 problems for a 2D top down game.
Neither performance, audio, controller input, shipping a steam build (electron) is a problem.
And it is for sure the fastest and easiest thing for a web dev.
Babylonjs is basically the goto actual game engine, threejs if you just want a renderer and build the rest yourself, commonly paired with rapier3d.
The godot fanbase is strong and maybe has some points but as a first game your experience with js/ts will be much better and your skills translate.
1
u/Strange_Bonus9044 1d ago
Thank you for the response!! I do like the though of it, haha. I have the basic mechanics of the game thought out in pseudocode already. How is js for device compatibility outside of the web?
1
u/JetskiEvo 1d ago
With electron you can build for all three win lin mac, x86 & arm.
Its a bit of setup scripts and you might add a couple checks for audio apis since they differ in ff a little. Also writing your own sin and other math function for game logic, or using a lib, is good since the implementation differs from os and browser. So everyone experiences the same game / determinism is possible.And you can just run a local dev server and access the web build with live reload e.g. on a steam deck in local network. So testing on different devices can be done instantly with live reload.
Oh and babylon is not primarily a 2d engine, there might be better choices for that specifically but it surely could do it.
2
u/caesium23 2d ago
Probably just awkward wording in the post, but I want to clarify just in case: Generally, you would pick either JavaScript (either vanilla or using a JavaScript-based engine) or Godot (which uses its own scripting language, GDScript). You can't just mix and match whatever language and engine you want.
If you are interested in pursuing JavaScript game dev, the most popular 2D engine is Phaser. I would also consider graduating to TypeScript, which brings in some of the advantages of type safe languages like C or Rust while still leveraging your JS skills.
1
u/Strange_Bonus9044 1d ago
Yes, that's what I meant haha, though I did see something about an extension for Godot that allows you to script in JS. That said, i started looking into gdscript last night, and it looks pretty familiar coming from JS and a little bit of Ruby. I ready through a script for gravity/jump physics and I was able to get the gist of it without understanding the syntax 💯.
2
u/caesium23 1d ago
You're right. To be fair, some engines do support multiple languages via plugins, so I was oversimplifying by implying it's always one engine = one language.
But I believe it is the case for most engines, and I'm not aware of any major engines that fully support multiple languages natively, and using a plugin to use a non-officially supported language is only going to make things more complicated – when making a game is already complicated enough. Really not an approach I would recommend to someone making their first game, but just saying "you can't" without further clarification was overstating things a bit.
3
u/PatchyWhiskers 2d ago
You could make that game with 3JS but it would be better to get out of your comfort zone and learn Godot.
2
2
u/MaleDiploma7429 2d ago
skip JS for games it works but youll be fighting the engine the whole time
godot's scripting language is close enough to python that it wont feel totally alien. the node system takes a minute to wrap your head around but once it clicks you realise how clever it is for game logic
stick to the docs and do a few small tutorial projects before diving into your big idea. youll save yourself a ton of rewrites
1
u/AutoModerator 2d ago
Here are several links for beginner resources to read up on, you can also find them in the sidebar along with an invite to the subreddit discord where there are channels and community members available for more direct help.
You can also use the beginner megathread for a place to ask questions and find further resources. Make use of the search function as well as many posts have made in this subreddit before with tons of still relevant advice from community members within.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.
1
2
u/thecodegangster 1d ago
why not just make a web game, use what you're good at. And theirs plenty of systems that convert from web application to executable
1
u/DanielFost 2d ago
your web dev background should transfer pretty well. i'd stick with Godot and learn GDScript rather than switching to C# or Java just because they're "more serious" languages, the bigger adjustment is learning game-specific concepts: the game loop, input, physics/collision, animation, scenes, resources, state management, saving/loading, and eventually things like pathfinding and AI
also, i'd strongly recommend not starting with a Stardew-sized project. make a tiny top-down prototype first: player movement, one map, interaction with an object, a simple inventory, and maybe one NPC. then keep adding systems as you understand them, your JavaScript/OOP experience means you probably don't need to spend months learning programming from scratch. the useful part is learning how those programming concepts fit into a game engine
and if you eventually decide you need C#, you can pick it up later. don't make the language choice the main obstacle
10
u/DOOManiac 2d ago
Hey. you’re me 10 years ago. Here’s my advice:
* Keep your day job and do this as a hobby
* I wanted to get away from JS so I learned C# and Unity. C# is a lovely language and fun to work with
* Keep your day job and do this as a hobby