How important is keeping a build plan structure?

I plan on starting my memory card game in React today and have written out the steps of how the game works in psuedo. I'm not really sure how to code the first initial part of the game, but I am fairly confident that I can code the actual game itself (click a card, if yes, add a point, randomly roll cards again, if fail -> game over). I figure if I code what I know I can do, I can then slot in the rest afterwards? or should I try and keep to coding from start -> finish? previously I've done start -> finish (For the most part), and it drags out a long time until I'm able to get help on where I'm stuck.
8 Replies
Joao
Joaoβ€’11mo ago
Funny enough, I was just thinking I've never coded this game myself and was planning on getting started. Overall, I think it's more important to have a clear structure defined specially with more complex projects. It's really no fun at all to have to re-do a bunch of work because you forgot something. For something like this however, relatively small, I will just start coding after I have a general idea in mind which I already have. Since you are using React, think of the potential states of each component and how do they relate/interact to each other. For example, how many states a card can be in? How many states can the game itself be in? What defines the winning and loosing conditions?
CDL
CDLOPβ€’11mo ago
Gosh I hadn’t thought of all of the states… there may be more posts to come πŸ˜‚ thanks Joao! Be keen to see how you do yours if you ever start it!
Joao
Joaoβ€’11mo ago
So far is not looking so good, although I'm using just vanilla JS and codepen so the dealing with images is a pain πŸ˜„ But I'll let you know when I'm done so we can share notes
CDL
CDLOPβ€’11mo ago
Sounds good!
Joao
Joaoβ€’11mo ago
Mmm well I'm sure it can be done in a much better way but this seems to work: https://codepen.io/D10f/pen/ExMQKqa
CDL
CDLOPβ€’11mo ago
good effort πŸ˜„ I kinda started it then realized my fundamentals are relaly really bad, so I'm back to focusing on HTDP for a few weeks with codewars, however I got up to... https://codepen.io/Laing91/pen/WNmMMLJ react so it won't show, but it flips the numbers whenever you click on a card, so that part works. I thought it would be similar to mine but it's not, that's really cool, nice work! I think my memory card game (unless I read the instructions on TOP entirely wrong), is to click a card, and then the next flip you can click a card but NOT the one you just clicked. I much prefer your game though, very cool πŸ˜„
Joao
Joaoβ€’11mo ago
Thanks! I really enjoy making this sort of "simple" games from time to time to keep my sharp on the fundamentals. Whenever I see a blog post or someone here on Discord asking about these things, is a great excuse to get to it. Practice makes perfect so keep going!
react so it won't show, but it flips the numbers whenever you click on a card, so that part works.
In Codepen you need to use the JavaScript settings (the little wheel icon) to process is as babel and also import the React libraries externally. I made a template that you can use as an example: https://codepen.io/D10f/pen/yLwMYJx
CDL
CDLOPβ€’11mo ago
Oh nice, thank you! That just made life a whole lot easier πŸ˜„
Want results from more Discord servers?
Add your server