We can't find the internet
Attempting to reconnect
Something went wrong!
Attempting to reconnect
Analysis Summary
Worth Noting
Positive elements
- This video provides a realistic look at how a solo developer thinks through refactoring and basic game state management using 3js.
Influence Dimensions
How are these scored?About this analysis
Knowing about these techniques makes them visible, not powerless. The ones that work best on you are the ones that match beliefs you already hold.
This analysis is a tool for your own thinking — what you do with it is up to you.
Related content covering similar topics.
Transcript
[Music] I she [Music] d how do I start episode two episode two episode two death vog dark simulator so what happened what happened so last week I started the series and I started on the game duck simulator what did we do last time last time we just implemented a a a cube that will move around in a quote unquote Pond they're all the Sprites are Place hold for now is just uh it's just a plane and and a cube okay anyways now the cube could move around that's what I had last time uh the problem is the code is absolutely disgusting it's one file it's one function all the code is there I need to refractor it and that is what I did today so how did I clean up the code well I decided of course to split it up into separate files and how I would you know use these files together was I just decided to do objectoriented programming so I would have let's say a game a game class and that class would have stuff like um stuff for 3js so something like the the scene the the camera the renderer for 3js and the game class would also have stuff like you know the pond the duck and all the lights as separate um separate variables and also created a duck class which extends the 3Gs mesh or the object what whatever it is because of course the duck is going to be an object that's going to be rendered and I just added in a update function which should separate some of the code from you know all being in One update function in the game class will separate it out so we can have an update function in the duck class that handles you know all the stuff for the duck like the movement each frame also created a PA class um and also I could but I decided not to I could also add a like lighting class lighting object um but I just decided to have the lighting the uh variables in the game sense uh I don't really need to access the lighting after meaning I don't really have to update the lighting each frame I don't have you know any functions that I would add to the lighting object and speaking of game objects I also made some bread so bread is going to be obviously an important part of the game since that's how the players will you know gain points by swimming around and and eating the bread or collecting it and eating it whatever so bread is also going to be a game object just like the duck and also the pond right they're all going to be objects the pond less so um because it is a pond is pretty much for decoration right they could be Ducks floating in space and doesn't matter right but the bread is going to be important and so are the Ducks so right now the game only has one duck that swims around by itself and I made it so that we can check uh if the duck collides with any bread and we can we can uh like let's say collect bread and we could add points if we want but I didn't Implement that I did implement the detection for the bread and right now the bread just disappears I could very easily add points to that but I think we'll leave that until we get the multiplayer thing go because right now it's still a single player it's still a duck swi around by itself but just falls out of the sky and we go around collecting it I think it'll be more interesting to see how we're going to implement the multiplayer aspect of this which I think will be very challenging cuz I've done you know I've done single player games or games on a singular device but I think when there's going to be a multiplayer online game we'll have to see how the client and the server interact I think next episode I think I'll not I I won't clean up more right I think the code right now is all right I think it's structured in a way that is scalable I can actually work with this and I think we'll clean things up after we'll get the multiplayer aspect finished so next episode I'm going to go start work on the server and I I'll really have to do a bunch of research and learn about how to make a multiplayer game online okay and I think that's it I didn't have many issues restructuring the code I think went pretty smoothly uh there were a few bugs to start with so I wasted a bit of time but overall I think it was all right and you know just just because why not I'm going to um make a another branch on the repository which is going to be the build Branch or I guess the pages um and you can actually visit this site right here I'll put it in the video right here look and in description and anywhere else I can put it and go visit the site go try it out for yourself all right that's it for me peace
Video description
DEV LOG EP 1, Duck Simulator. IM BACK THIS WEEK AGAIN!! Making a game, Duck Simulator, you already know what the game is, IF YOU DONT, watch episode 0. This week, I refactored the entire project (not that much) to be object oriented, with a Game class, Duck class, Bread class, etc. I did some collision detection with the bread and duck, and thats about it :P IF YOU HAVE ANY IDEAS FOR THE GAME, PLEASE COMMENT ! Game ► https://nycrat.github.io/duck-simulator Repo ► https://github.com/NycRat/duck-simulator Twitter ► https://twitter.com/VimSalesman Github ► https://github.com/NycRat My Config ► https://github.com/NycRat/dotfiles/tree/main/dot_config/nvim