6 ms·
24a2: An ultra-minimalist game engine
- saagarjha 6y agoThe examples are cute and gave me a "graphing calculator game" vibe :)
- umvi 6y agoI love artificial constraints like this. Really forces you to innovate
- dropit_sphere 6y agoAnd, in a sense, allows you to innovate, by lowering the bar you feel like you have to clear to make something of "quality."
- CobrastanJorji 6y agoExactly. The demo scene requires innovation, but the bar for entry is high. This also requires innovation, but the bar is on the floor. Great idea! I'd love to see game competitions around these sorts of arbitrary restrictions.
- Nzen 6y agotl;dr A javascript framework with a canvas output of 24x24 grid of dots. These dots can adopt nine distinct colors. Default input is arrow keys or mouse click on one of the dots. Includes a short eight section tutorial and api doc for two classes (game, gameconfig) and two enumerations (color, direction). Has example games for snake and 'skiiing' (wall avoidance on a linear path).
- accidentalrebel 6y agoTldr is appreciated thanks
- ArtWomb 6y agoNice! I think you could do a port of the classic Milton Bradley board game "You sunk my Battleship!" with this ;) https://en.wikipedia.org/wiki/Battleship_(game) https://en.wikipedia.org/wiki/Battleship_(game)
- sn41 6y agoInteresting that you say this. I am thinking of running a python course online, and have programmed a 200-line battleship game with TkInter, since I think it is game that is engaging even when you play against a fairly straightforward computer adversary. I had a lot of fun playing my own game, even when programming it was so simple.
- tootie 6y agoThis framework is based on a game loop that runs an update on each frame which is more intended for real-time controls. I think a turn-based game like battleship is a different paradigm.
- fao_ 6y agoafaik pretty much all games work like that on a deep level? And it's an industry standard for game engines to expose their interface in that way. Anyway, it's in the README: ""24a2 can also run a function [...] when a dot is clicked on."" So it would be pretty easy to make that.
- setr 6y agoYou always have to update every frame -- UI, sounds, animations, etc -- the question is whether you update your game simulation every frame. But really, you don't want to link your simulation-updates to your frame updates anyways, real time or not, because then you get weird behaviors like different framerates producing different physics (I believe it was quake that famously let's you jump further if your framerate is higher).
- jsf01 6y agoIs importing P5 a requirement for this engine to work? I know “minimal” can mean a lot of things to different people, but I don’t think it P5 adds much that you couldn’t trivially do without it in this case, and by stripping that dependency away you’d be able to make a very strong case for this being an ultra minimal engine.
- esperent 6y agoI'm sure it's easy to render a 24x24 grid of colored dots using JS without any kind of graphics engine. But I guess it's a stylistic choice - abstract out the rendering code so that it's just an engine.
- derefr 6y agoI feel like, rather than having no sound at all, the ability to output a PC-speaker-like beep (i.e. turn on/off a fixed-frequency, fixed-amplitude square wave channel) might be nice. No parameters because otherwise you might get distracted trying to trick it into sounding vaguely musical ;) I’ve also always wanted to see something like this but with emoji for the “graphics.” (Emoji are, after all, the standard graphics resource pack of our era—like DOS box-drawing characters were for the 80s.) Maybe stick them as labels on a grid of buttons, resulting in a similar look to Chip’s Challenge.
- prvc 6y agoThat would defeat the purpose of being minimalist, don't you think?
- Waterluvian 6y agoI just love it. I can’t wait to make a bunch of toys with this. I do think some very primitive sounds might be a good option. Don’t even use files. Just use the AudioContext and provide an enumeration of a couple beeps and boops. And I 100% support if the answer to this is “avoiding scope creep”
- flarg 6y agoWould be great for something like core wars!
- xwdv 6y agoIs there a place where games made with this engine are featured?
- vgb2k18 6y agoOnly one I found was the owner's website which has some examples... https://24a2.routley.io/ https://24a2.routley.io/
- dgreensp 6y agoI'd like to see some way to play the games on mobile.
- Impossible 6y agoI love the minimal API, but this would really be awesome if it was a hosted fantasy console style environment with zero boiler plate and shareable links. I know that sounds like a minor difference, but having to write even a little bit of boilerplate in a minimalist environment is a source of friction. Also, as said by many people in this thread, a simple sound API (PC speaker style sounds, sfxr, 10 hard-coded effects, etc) should be added.
- raldi 6y agoWhat's the a2 refer to?
- jmlr 6y ago24A2 sort of looks like 24^2, which is what I originally wanted to call it, and only uses alphanumeric characters. The combination of numbers and letters also reminded me of P5 and pico-8, which were both inspirations
- fierarul 6y agoWhy 24x24 and not 80x25 I wonder.
- livre 6y agoInteresting idea, I recommend adding virtual arrow keys for mobile compatibility.
- kqr 6y agoI have no idea if this is any good compared to existing game engines, but the limits imposed by its simplicity certainly tickle my creativity. If nothing else, it could be a great prototyping space. One question: have you considered making it mobile friendly somehow? Given that all of the examples require arrow keys, it's a bit hard to demo on a phone.
- tobyhinloopen 6y agoNo mobile support is a missed opportunity. Also misses bleeps. Beep boop
- harkal 6y agoI find that any game created with this game engine ends up being far more code-heavy and complex than it would be without using it. In my mind, this invalidates the argument of using an ultra-minimalist game engine at the first place...
- esperent 6y agoOf the two example games that come with the engine, skiing is 113 lines long and snake is 158 lines long. Both include comments and don't make any attempt at a brief style of coding, so their lengths seem reasonable to me. What games have you seen that you feel are too code heavy, written using this engine?
- harkal 6y ago"Code heavy" of course in a relative sense. You can definitely make a snake game with the same aesthetic in less that 158 line, and you won't need to carry along the engine. I would also argue that the plain javascript version will be easier to understand as you will not need to understand what the engine is doing.
- quietbritishjim 6y agoPerhaps I've missed the point, but I'd always expect a "minimalist" framework of any type contain less code in itself but require more application code. That's practically the point. You have to write more boilerplate, but at least you know what all that code is doing because the framework is so easy to understand. By contrast, a more heavyweight framework lets you wrote less boilerplate because there's a helper function for every situation, but then your application code is filled with lots of magical calls into the framework, so to understand your code you need to look at a different bit of the framework documentation for every line. That's not to I say I think either is better or worse, just that those are the expected trade offs.
- jstanley 6y agoWhat complexity do you think this engine adds? It isn't forcing you to do any extra work, it just saves you from having to worry about setting up a canvas, listening for input, or running a timer. That's literally all it does. And it gives you a neat aesthetic with the grid of dots.
- icemelt8 6y agoMake a place to share stuff
- jstanley 6y agoWow, this is fantastic, what a great idea. I've spent the morning knocking up a little Space Invaders clone, it's the most fun I've had programming in ages. It's at https://incoherency.co.uk/24invaders/ https://incoherency.co.uk/24invaders/ and the logic is mostly done, just got some graphics work to do. I got into programming as a teenager by making shitty games, first with Blitz Basic, and then with the Allegro C library. My favourite parts of the Allegro community were the annual "speedhack" in which people create a game over a weekend, and the informal "screenhack" in which you create a game that must fit in 80x25 characters of C code. 24a2 brings back all the joy of those challenges for me.
- nazgulsenpai 6y agoI was a teen also fiddling around those BASIC game programming engines like Dark and Blitz Basic. That was so much fun. All of my memories of Allegro mostly revolve around DJGPP. What an interesting piece of software that was.
- morelisp 6y agoStrong shades of https://perlenspiel.net/ https://perlenspiel.net/ (though probably convergent evolution) - something to look at if you want just slightly more (variable-sized grid, pixel borders, sounds).
- andrewnc 6y agoI just made my first game[0] with the engine!! It was a pretty painless experience. Granted it encourages globals (and JavaScript is not my favorite) but it was pretty great. Maybe with an additional array/matrix library it would be perfect. [0] https://andrewnc.github.io/games/pal_game.html https://andrewnc.github.io/games/pal_game.html
- kentbrew 6y agoHere's Samegame in 24a2: https://kentbrew.neocities.org/samegame/ https://kentbrew.neocities.org/samegame/ Wishing for a mouseover event....
- RobKohr 6y agoThis could be fun to implement in arduino hooked up to a color led matrix that also double as buttons.