5 ms·
City simulator I made in Scratch
- deleted 2y ago[deleted]
- eliben 2y agoThis is very impressive, amazing work! One question: how do you manage large code bases in scratch? Is it easy to find a piece of code? Something like grepping for specific things seems difficult. I've recently been really warming up to Scratch since one of my kids picked it up and really enjoys it. I love the built-in concurrency model - it's a bit like CSP. Gets kids to think concurrently from day 1.
- Rendello 2y agoScratch is not conducive to complex (traditional) projects, which I think is sort of the appeal for seasoned programmers. For my part, I woke up one weekend knowing I had to make a recursive bisection demo in it [1]. The effort I knew it would take vs the banality and lack of game play was really funny to me in an absurd way. Scratch lacks functions with return values, but if you hack global variables to be like registers, you can emulate them and even do recursion. At least that's how I did it. The Cartesian plane has (0,0) in the centre, which is annoying if you're used to traditional graphics. I have a young cousin who's intimidated by making the jump from Scratch into traditional game dev. I tell him that Scratch simplifies a lot of things, but it also makes a lot of things harder if you're used to regular programming. "Recursive Bisection on a Cartesian Plane in the Horizontal and Vertical Axes." (hold shift when you press "go" for fast mode): https://scratch.mit.edu/projects/1098438053 https://scratch.mit.edu/projects/1098438053
- jgwil2 2y agoThat's really clever, bravo.
- ashater 2y agoMy younger daughter, who is pretty good at making games in Scratch is not that interested in jumping into text/code based programming. I do think Scratch makes things a lot easier and text based programming is not thar appealing to kids. I will try to start her with Pygame but even that might make it seem very arcane and not very visual.
- hdjrudni 2y agoMaybe try something with instant feedback? I'm not sure what precisely, but I'm picturing a split view with text on the left and the output on the right. I do this in web dev, React + hot reload is wonderful. For games, I've done it with instantly recompiling shaders but not much else.
- Rendello 2y agoPICO-8 [1] might be a good choice. I always consider that kids want their friends to try their games, and so being able to easily distribute to the web is awesome. They can link their game from the site [2], or with some parental help they could even serve them from their own website, which could be very empowering for a kid. 1. https://www.lexaloffle.com/pico-8.php https://www.lexaloffle.com/pico-8.php 2. https://www.lexaloffle.com/bbs/?cat=7&carts_tab=1&#sub=2&mode=carts https://www.lexaloffle.com/bbs/?cat=7&carts_tab=1&#sub=2&mod...
- sen 2y agoAnother vote for Pico-8. It’s such an incredible little package. The simple IDE and forced constraints makes you really focus on the basics like fun gameplay loops and minimal graphics, and the fact you can do the code, graphics, sound effects, and music all in one little program is a really smart way to teach you all different aspects of game dev. It’s also so ridiculously easy to share your creations, outputting a simple HTML/JS combo that works perfectly on mobile and desktop even if they don’t own the program.
- HanClinto 2y agoMy daughter (12) got her start in Scratch, but had a hard time jumping into Python. She's enjoyed GBStudio, and has made a number of small games in that environment, and enjoys loading them onto a flash cart to run them on an old physical Gameboy.
- Annulus 2y agoIt is really hard to search when there’s a lot of code - I just had to be pretty careful with how I laid out everything, so I roughly knew where everything was
- fatant 2y agoI think for me it was something that came with practice and intentionally organizing my code in a way that made spatial sense to me.
- varun_ch 2y agoApart from keeping your code tidy and succinct, there's also third party extensions like https://scratchaddons.com/addons/ https://scratchaddons.com/addons/ which can make writing code much more enjoyable - notably the `middle-click-popup`, `folders`, and `editor-devtools`. There's also an entire Debugger addon, which lets you log stuff, set breakpoints, see running threads.. Scratch Addons is awesome.
- LukeDunsMoto 2y agoOh man I love a city builder - this is very cool thanks for sharing
- timojaask 2y agoThis looks very much like Polytopia https://polytopia.io/ https://polytopia.io/
- chrisan 2y agoon firefox at least, the WASD controls seems inverted?
- mixdup 2y agoSafari as well, and I couldn't get any other keys to work besides WASD
- SamBam 2y agoYou have to click a square of land first, and then space will add a building (or whatever you cycle to with the arrows). (Edit: at least in fantasy mode. I haven't yet worked out what to do in reality mode.)
- turnsout 2y agoOn Dvorak, WASD never works; game designers should use arrow keys or find a lower-level way to access key events that doesn't depend on the software layout.
- Aloisius 2y agoUsually game developers use keyboard scancodes which are layout agnostic rather than the character generated when pressing a key, so it works on dvorak, AZERTY, etc. I don't know if Scratch supports them though. Seems like it would given it's game focus.
- turnsout 2y agoWhatever the reason, in this case, it's broken
- mrheosuper 2y agoyeah it's broken for like 0.000001% of user
- mubou 2y agoThis looks really cool. Kindof a random question, but how did you come up with the biome names? Are they inspired by something or just totally random? I like the world-building touch, either way.
- mubou 2y agoFound a bug (on Chrome, reality mode): if you open and close the achievements/settings screen enough times, eventually things start to disappear and you can no longer place buildings.
- damnitbuilds 2y agoHas anyone made a way to write Scratch in plain text?
- varun_ch 2y agoquite a few! https://scratch.mit.edu/discuss/topic/792714/ https://scratch.mit.edu/discuss/topic/792714/
- tamat 2y agobut... WHY?
- gowld 2y agoAre any of these bidirectional, so you can near-seamlessly edit the project in alternate sessions of Scratch and text? Scratch for high-level sprite/event management, and text for nitty-gritty coding of algorithms?
- damnitbuilds 2y agoThat could even be useful for writing real programs!