Post Anc4e2d3D4j42mQDp2 by foone@digipres.club
 (DIR) More posts by foone@digipres.club
 (DIR) Post #Anc0eocMOAXn3uDEga by foone@digipres.club
       2024-11-01T22:01:41Z
       
       0 likes, 0 repeats
       
       Do you ever get the urge to program a deckbuilding game?Because it'd be such an interesting challenge to architect! A good deckbuilding game is full of cards/item/units that essentially alter the rules for that one card, and that's gonna be very interesting to implement.
       
 (DIR) Post #Anc0kPxyxF1MLRzu40 by ailurux@chaos.social
       2024-11-01T22:02:41Z
       
       0 likes, 0 repeats
       
       @foone literally all the fucking time
       
 (DIR) Post #Anc0oHhzbCpntMMWSe by ben@mastodon.bentasker.co.uk
       2024-11-01T22:03:24Z
       
       0 likes, 0 repeats
       
       @foone I'm not gonna lie, my first read of this had me thinking of garden decking.Now... I want *both*
       
 (DIR) Post #Anc0qgtUvlZSaBtJa4 by foone@digipres.club
       2024-11-01T22:03:42Z
       
       0 likes, 0 repeats
       
       Like you have* the Rat: 1 damage 1 health* the Wolf: 3 damage 2 health* the Armadillo: only takes damage on even numbered turns* the Oxpecker: the card to the left has +2 health
       
 (DIR) Post #Anc0uSRab8HkvOdKZE by foone@digipres.club
       2024-11-01T22:04:16Z
       
       0 likes, 0 repeats
       
       How do you implement that without this becoming a nightmare of endless difficult-to-test specialized code?That's the challenge
       
 (DIR) Post #Anc0wFeX7tarpgXjea by darkling@mstdn.social
       2024-11-01T22:04:08Z
       
       0 likes, 0 repeats
       
       @foone You'd have to write a high-level language that's explicitly  self-modifying. So I think you'd need something homoiconic (and I don't mean Freddy Mercury).Never been into deckbuilding games, but this sounds interesting. I would like to subscribe to your newsletter.(No, wait, I already do...)
       
 (DIR) Post #Anc0ylPi0kQauso6Cm by gsuberland@chaos.social
       2024-11-01T22:04:38Z
       
       0 likes, 0 repeats
       
       @foone > the Rat> the Wolfgenuinely thought you were going to describe a Stronghold Crusader deckbuilding game there
       
 (DIR) Post #Anc11HpITLaY1PyjkO by foone@digipres.club
       2024-11-01T22:05:26Z
       
       0 likes, 0 repeats
       
       @gsuberland I was actually thinking more Inscryption!
       
 (DIR) Post #Anc150y95avGtktZ6u by gadgetoid@fosstodon.org
       2024-11-01T22:06:27Z
       
       0 likes, 0 repeats
       
       @foone yes! Long, long ago. Then I realised I was mentally designing a deck building game builder and would never see it through to anything close to functional 😭
       
 (DIR) Post #Anc1OMUBJZyP8K6a0W by foone@digipres.club
       2024-11-01T22:09:59Z
       
       0 likes, 0 repeats
       
       Of course you could always just pull a Nethack and make every line of code endless ternary conditions like the very idea of OO is an insult to K&R themselves.damage=weapon_damage*strength+(lane>0 && playfield[lane-1]==CARD_OXPECKER)?2:0)
       
 (DIR) Post #Anc1QvezVa5wntNxQm by tekhedd@byteheaven.net
       2024-11-01T22:10:20Z
       
       0 likes, 0 repeats
       
       @foone Choosing which is the most elegant level of abstraction is always the challenge!
       
 (DIR) Post #Anc1TA9wZUqqLqvcps by foone@digipres.club
       2024-11-01T22:10:38Z
       
       0 likes, 0 repeats
       
       That times a billion. You can't do anything in the engine without checking 8 different conditions that only happen when you have some other rare item and it's in the right place
       
 (DIR) Post #Anc1VZLRu3aV2gSPxI by foone@digipres.club
       2024-11-01T22:11:15Z
       
       0 likes, 0 repeats
       
       @Xavier oh yeah. But that's a game for human, who are a bit better at free form play than computers
       
 (DIR) Post #Anc1Y5lOLL22AJnL3A by tekhedd@byteheaven.net
       2024-11-01T22:11:24Z
       
       0 likes, 0 repeats
       
       @foone There's probably a "deckbuilderPro" game engine out there somewhere, that will take only slightly longer to learn than writing your own engine. :D
       
 (DIR) Post #Anc1jehGnklPhANffc by static@aus.social
       2024-11-01T22:13:47Z
       
       0 likes, 0 repeats
       
       @foone That's horribly fragile. There must be a way to abstract that properly.
       
 (DIR) Post #Anc2SRTSoGlTiWHMC8 by foone@digipres.club
       2024-11-01T22:21:53Z
       
       0 likes, 0 repeats
       
       @static there is, but Nethack is too far down this tar pit to consider it now
       
 (DIR) Post #Anc2e9MpxMqB2ClJey by sbszine@dice.camp
       2024-11-01T22:23:59Z
       
       0 likes, 0 repeats
       
       @foone I vaguely recall that the Balatro code contains a massive switch / case statement covering every joker individually.
       
 (DIR) Post #Anc2gYWZOW9vdXSh16 by foone@digipres.club
       2024-11-01T22:24:27Z
       
       0 likes, 0 repeats
       
       Inscryption has a neat bit of abstraction: cards have attack/health/cost and then some number of sigils.There's no rules on the cards themselves, but each sigil has associated rules, which you can look up at any time.
       
 (DIR) Post #Anc2kK9GmkYmD2MOBc by foone@digipres.club
       2024-11-01T22:25:07Z
       
       0 likes, 0 repeats
       
       So instead of having the Ouroboros card have rules on it saying that it always returns to your hand when killed, it has an Unkillable sigil.
       
 (DIR) Post #Anc2r0DrGgDoR9gtoe by foone@digipres.club
       2024-11-01T22:26:21Z
       
       0 likes, 0 repeats
       
       And you look up the Unkillable sigil in the in-game rulebook, and it says:"When a card bearing this sigil perishes, a copy of it is created in your hand"
       
 (DIR) Post #Anc2wJNTTeOrIFiiyu by foone@digipres.club
       2024-11-01T22:27:19Z
       
       0 likes, 0 repeats
       
       So they don't have to test the card individually, just all the sigils.This also enables the game to modify cards mid-game: with special events you can copy the sigils from one card to another, making new combinations of sigils.
       
 (DIR) Post #Anc2z4dKkhguQxSIwS by whitequark@mastodon.social
       2024-11-01T22:27:26Z
       
       0 likes, 0 repeats
       
       @foone i feel like this is a perfect application for prolog
       
 (DIR) Post #Anc31sEBKgxYpL1ftY by foone@digipres.club
       2024-11-01T22:28:19Z
       
       0 likes, 0 repeats
       
       So you're effectively rewriting the rules written on a card as part of gameplay.A very neat mechanic and you can see how the sigils-instead-of-rules made it possible
       
 (DIR) Post #Anc34fnG1GoJ8Dld5M by foone@digipres.club
       2024-11-01T22:28:47Z
       
       0 likes, 0 repeats
       
       Sorry I'm having to make really short posts because my mastodon client tends to crash and lose half-finished posts every time I tab over to Firefox
       
 (DIR) Post #Anc3C74uyPr5mUZk7E by foone@digipres.club
       2024-11-01T22:30:10Z
       
       0 likes, 0 repeats
       
       I've been wondering about this sort of thing ever since Sid Meier's Colonization. It's not a deck builder (it's a 4x a la Civilization) but it has a "founding fathers" mechanic where you periodically recruit historic figures, and they have similar game-rules-changing effects
       
 (DIR) Post #Anc3GppoVorvkUlJke by darkling@mstdn.social
       2024-11-01T22:31:01Z
       
       0 likes, 0 repeats
       
       @foone Many years ago, I worked on a small web MMORPG (130k SLOC of Perl) which had a pretty good model of modifying behaviour: every property of an object (say, "damage" for a weapon) was indirected through a .power() method. This passed the property value through a function for every "equipped" object (held or worn) and location, and could produce a new value, either modifying the existing value, or replacing it.From that POV, it feels doable, within certain constraints. 1/2
       
 (DIR) Post #Anc3JBMnQaPN6mJCnA by Canageek@wandering.shop
       2024-11-01T22:31:09Z
       
       0 likes, 0 repeats
       
       @foone *looks it up* OK, nethack is 2 years younger then C++, so it certainly isn't older then object oriented programming (I know C++ didn't invent that, I just wasn't sure how to check that, so I did a quick bounds test)
       
 (DIR) Post #Anc3LkEokRV7q4nZvk by foone@digipres.club
       2024-11-01T22:31:36Z
       
       0 likes, 0 repeats
       
       Like if you recruit Hernando de Soto, the goody huts on the map only return positive results, and every unit's scouting radius increases
       
 (DIR) Post #Anc3QmKyN1oFnW4tqC by foone@digipres.club
       2024-11-01T22:32:49Z
       
       0 likes, 0 repeats
       
       Paul Revere makes it so that if a city is attacked when it had no army but it has muskets in the storehouse, it'll temporarily promote a non-soldier unit to soldier and have them defend
       
 (DIR) Post #Anc3TLTegwEJMUMZwu by Zotmeister@mastodon.online
       2024-11-01T22:32:59Z
       
       0 likes, 0 repeats
       
       @foone Point of order: some cards have intrinsic abilities beyond what the sigils provide, and your chosen example - Ouroboros - is one of them. Other cards can get the Unkillable sigil (I had it on Squirrels once!), but only Ouroboros, as its description says, "gets stronger forever" each time it dies. (And when they say "forever", they mean it!)
       
 (DIR) Post #Anc3VhcZKg6ucPel72 by foone@digipres.club
       2024-11-01T22:33:37Z
       
       0 likes, 0 repeats
       
       That sort of thing.These sorts of "every option involves changing the game rules" things are always fascinating to me, both as a gamer and a game developer.
       
 (DIR) Post #Anc3pdj1WjgQKMBMm0 by adriano@lile.cl
       2024-11-01T22:37:16Z
       
       0 likes, 0 repeats
       
       @foone I just played a game of Regicide, a solitaire that takes the standard card deck and adds extra behavior to both kings, queens, jacks and aces, but also to each symbol, and makes you fight against the top cards. Really fun.
       
 (DIR) Post #Anc4e2d3D4j42mQDp2 by foone@digipres.club
       2024-11-01T22:46:21Z
       
       0 likes, 0 repeats
       
       @eta sadly I'm allergic to playing cards, but otherwise it looks fun
       
 (DIR) Post #Anc4iHevGnUdokJvkm by chocobo13@mastodon.social
       2024-11-01T22:47:07Z
       
       0 likes, 0 repeats
       
       @fooneAnd then there are games like Mosa Lina, which guarantees a level can be completed with some combination of items, but not necessarily the combination you have. If you are clever, it's likely you can make it work, but not a given. First game I've seen consciously  eschew guaranteeing everything works
       
 (DIR) Post #Anc4koABOJBtCs968W by foone@digipres.club
       2024-11-01T22:47:33Z
       
       0 likes, 0 repeats
       
       @Zotmeister I believe that's just a little slight of hand on the game engine's part: there's an invisible "gets stronger ever time it dies" sigil on the card, and invisible sigils don't get copied
       
 (DIR) Post #Anc4n9HdpyJVHzkbOS by foone@digipres.club
       2024-11-01T22:48:06Z
       
       0 likes, 0 repeats
       
       @whitequark honestly yeah.
       
 (DIR) Post #Anc4tMIgM0uFOiCMy0 by foone@digipres.club
       2024-11-01T22:49:04Z
       
       0 likes, 0 repeats
       
       @tauon yeah, I'm specifically talking about Nethack, which is written in Bad C.It's definitely a lot easier with a higher level language
       
 (DIR) Post #Anc4voUIWcVtOknnAu by foone@digipres.club
       2024-11-01T22:49:23Z
       
       0 likes, 0 repeats
       
       @sbszine AHHHHHHHHHHHHHHHHHHHHHHHHHH
       
 (DIR) Post #Anc51HKQit32IJnCMK by foone@digipres.club
       2024-11-01T22:49:48Z
       
       0 likes, 0 repeats
       
       @SpindleyQ nope!
       
 (DIR) Post #Anc53Pxfb4rteFAOqe by foone@digipres.club
       2024-11-01T22:50:55Z
       
       0 likes, 0 repeats
       
       @gemini6ice "what is this grey square babbling about?"
       
 (DIR) Post #Anc58CyJJsqwoEkba4 by foone@digipres.club
       2024-11-01T22:51:45Z
       
       0 likes, 0 repeats
       
       @kevingranade isn't that the webcomic with the magic teenagers who change gender all the time?
       
 (DIR) Post #Anc5QrAKcPLMgHGWoK by foone@digipres.club
       2024-11-01T22:55:15Z
       
       0 likes, 0 repeats
       
       To be honest the #1 reason I'm not currently working on a deckbuilding engine is that I really should play through more of the popular deckbuilding games to be more familiar with the tropes and get some more ideas.But I really don't have time to sink a thousand hours into a dozen games each. I enjoy those games too much to just casually play them while taking notes
       
 (DIR) Post #Anc5nXtIRojRYt7I6C by cstross@wandering.shop
       2024-11-01T22:57:49Z
       
       0 likes, 0 repeats
       
       @foone I think you just reinvented SNOBOL4, only without the computed GOTO's as ternary conditions on every line? And the insane 1960s text pattern matching syntax ...
       
 (DIR) Post #Anc5sNIpF3oUAeMOu0 by SvenGeier@mathstodon.xyz
       2024-11-01T23:00:09Z
       
       0 likes, 0 repeats
       
       @foone Don't need a computer for that: have you ever played Nomic ( https://en.wikipedia.org/wiki/Nomic ) ?
       
 (DIR) Post #Anc65bGiczMFFZgISm by clarity@xoxo.zone
       2024-11-01T23:02:32Z
       
       0 likes, 0 repeats
       
       @foone I call this ā€œmodular designā€ and it’s one of my favorites bc it lets you add pieces to the game without having to keep the whole thing in your head. ttrpgs like Apocalypse World have the same property with their ā€œmovesā€
       
 (DIR) Post #Anc6XahILUWTaQSWGW by tekhedd@byteheaven.net
       2024-11-01T23:07:34Z
       
       0 likes, 0 repeats
       
       @foone sounds like a simulator, where every cycle not only the location but nature of the playing pieces is updated
       
 (DIR) Post #Anc77QfL7VEStodKi0 by Zotmeister@mastodon.online
       2024-11-01T23:14:02Z
       
       0 likes, 0 repeats
       
       @foone That's a reasonable assumption, but it's worth noting that the upgrade total has to be global in nature, as it carries over from one instance of the card to another, even across [REDACTED AF].
       
 (DIR) Post #Anc7a5klx0RMRFqGO0 by grumpygamer@mastodon.gamedev.place
       2024-11-01T23:19:02Z
       
       0 likes, 0 repeats
       
       @foone Watch YouTube. I spend more time watching people play games than I do playing games.
       
 (DIR) Post #Anc93leFMkYOj0VJLs by slacy@mastodon.social
       2024-11-01T23:35:51Z
       
       0 likes, 0 repeats
       
       @foone Isn't it just "each card has a little chunk of lua attached to it"? Imagining an online Fluxx, and that's exactly how I'd do it.  The "game" would be a library of things like "GetListOfAllPlayerKeepers" so that the code for goal like "Milk and Cookies"  would actually just implement the goal condition directly? Things like "Draw 3" would either just say "set draw count to 3" or during the "draw" phase you'd just iterate through all the rule cards and run them...
       
 (DIR) Post #Anc9OHEhdFvAU8Ks8O by gray17@mastodon.social
       2024-11-01T23:39:32Z
       
       0 likes, 0 repeats
       
       @foone a lot of them are moddable, you can see how they work by looking at the mod community without actually playing the game
       
 (DIR) Post #AncA0I3X24TQ22EjSK by foone@digipres.club
       2024-11-01T23:46:25Z
       
       0 likes, 0 repeats
       
       @grumpygamer yeah, same. I was watching someone play Heroes of Might and Magic 2 while posting this. It's got some minor instances of this sort of "every item changes the rules" thing
       
 (DIR) Post #AncB1x8zqx5Dhy9KSG by teamonkey@mastodon.social
       2024-11-01T23:57:49Z
       
       0 likes, 0 repeats
       
       @foone Inscryption has a few cards with logic that aren’t shown on the sigils, such as Long Elk. There are also some sigils that apply some logic that’s hard to generalise, for example the one that allows any card to change into another card of greater form.Plus there’s… *waves hands* all that.
       
 (DIR) Post #AncBiJ8vrXFKnkGR7Y by gertkeno@mastodon.gamedev.place
       2024-11-02T00:05:15Z
       
       0 likes, 0 repeats
       
       @foone casey yano has a lovely blog on such while evaluating godot. Jist of the solution: don’t make a formula! Jut program the cards as scripts, you can express complex math in code, so leverage code itselfhttps://caseyyano.com/on-evaluating-godot-b35ea86e8cf4
       
 (DIR) Post #AncC1XbALG618UdocS by trochee@dair-community.social
       2024-11-02T00:08:59Z
       
       0 likes, 0 repeats
       
       @foone I would _love_ to know what kind of programming paradigm you think might be useful here.Parts of syntax/semantics boundary are kinda like thiseg, raising verbs (& subjunctive mood) assert about the reality of the clause ("they seem to be dancing" says sth about reality of "they are dancing")but RVs make *different* assertions about realities _depending on the specific verb_, & raise to diff syntactic positions"they ought to be dancing" (to S)"I expect them to be dancing" (to O)
       
 (DIR) Post #AncCLeNSqb57x6oytE by crobbler@mastodon.social
       2024-11-02T00:12:42Z
       
       0 likes, 0 repeats
       
       @foone Is it because you wonder if there's a clean way to deal with these types of rule modifiers in a way that's cleaner than if-statements sprinkled everywhere and global game state being referenced everywhere? Because, me, too.
       
 (DIR) Post #AncDMH3t7VdJsqWfyK by Blisterexe@fosstodon.org
       2024-11-02T00:23:59Z
       
       0 likes, 0 repeats
       
       @foone i probably wont make a big game unless there isnt a game like that that already exists, like my idea of a second person game
       
 (DIR) Post #AncKJ0SN6HrTC6MoDY by DrewNaylor@mastodon.online
       2024-11-02T01:41:50Z
       
       0 likes, 0 repeats
       
       @foone Even though it's not a deck builder, this reminded me of how a few days ago I was thinking about it must've been difficult implementing the Deeds system in Xenoblade 2, where buying all the items from a shop lets you buy that shop's Deeds and get whatever permanent effect it grants, like faster running speed or more gold from battle.
       
 (DIR) Post #AncKt8fc2XQD5pn0qW by StompyRobot@mastodon.gamedev.place
       2024-11-02T01:48:24Z
       
       0 likes, 0 repeats
       
       @foone Yeah, I learned collaborative programming on nethack.I refactored it to put all the cursor positioning code in one file. Before that, anything could be printing an escape code...Patches over usenet good times for young me!
       
 (DIR) Post #AncWS9qgkTfGNbs4Vk by dryak@mstdn.science
       2024-11-02T03:57:57Z
       
       0 likes, 0 repeats
       
       @foone different solution: you embed some scripting language (lua?) and each card comes with extra formulas that tweak characterstics.(and think of it: physical cards works like this with english for scripts)But that will limit the creativity to properties accessible in the script system (your oxpecker requires an updated engine with search per position scripts)Re: testing:Well even physical MtG had game breaking cards...
       
 (DIR) Post #Ancr7ifgBNojKsojFQ by Somekindofgarf@mastodon.online
       2024-11-02T07:49:30Z
       
       0 likes, 0 repeats
       
       @foone Way back when (tm) I worked on both Forge, which was and still is great, and my own Magic The Gathering Rule Enforcement Engine, which was doing Command pattern nonsense and runtime compilation and View/Models and protobuf oh my!  in a somewhat misguided, but fun, effort to mitigate the problems of the former.... You're tempting me to resurrect my project, for like the fifth time. That's not a good idea šŸ˜µā€šŸ’«
       
 (DIR) Post #And1eNl7xAlnZlZxBo by GLaDTheresCake@todon.nl
       2024-11-02T09:47:25Z
       
       0 likes, 0 repeats
       
       @foone so like how balatro is programmed in a huge list of if statements in LUA?
       
 (DIR) Post #AndcED8mVTinPz1iQS by UpLateGeek@bitbang.social
       2024-11-02T16:37:19Z
       
       0 likes, 0 repeats
       
       @foone might also want to consider adding ā€don’t want to get sued by Wizards of the Coastā€ to your list of reasons why you’re not working on a deck building engine.
       
 (DIR) Post #AndctaETYZM2uQPyue by sirmino@mastodon.uno
       2024-11-02T16:44:50Z
       
       0 likes, 0 repeats
       
       @foone same here.. Can anyone recommend some simple, almost basic deck-building games? I'm looking to better understand their core mechanics and common tropes. I have a feeling I might get a lot of suggestions like 'Hearthstone,' but I'm interested in games that are more straightforward for learning purposes.
       
 (DIR) Post #AnfbwFKC2JaJINiZzU by arensb@mastodon.social
       2024-11-03T15:43:31Z
       
       0 likes, 0 repeats
       
       @foone I’ve been wondering the same thing, but for a 4X-type game. I think the answer is to abstract the shit out of it.Each unit has a set of base attributes (HP, AC, whatever) and a set of attributes with modifiers applied. There’s a phase where each card object is told to apply modifiers. So the armadillo adds +2 to its neighbor’s AC.Testing will still be a bitch.