BoardGASM.py: Overengineering/Overthinking

So I tried to create an external state manager for my pawnlist, and had some issues, and realized it was, frankly, silly, to generate a complete pre-existing set of pawns for players to grab if only a fraction of those pawns will ever be used.

Why am I creating an entire structure to manage a pool that, once I dole out the contents, will be worthless?

My initial concern was whether or not a list of objects instantiated in a container/owner object would be on the heap or stack.

I have to admit, reviewing the results of my code, I’m still not quite sure what’s going on, so I guess I’ll have to read up more on the internals of Python’s approach to objects and also lists.

I’m less focused on theory/internals at this point and more on getting it to work (why do I worry that this is going to come back and bite me in the ass ;))

Anyways, after realizing that I should just generate the pawn objects “on the fly” when I create the character and append them to the list.  This saves on having an extraneous manager object.  I think this idea of a ‘game state manager’ to generate a sort of total state matrix is falling on itself.  In particular, when it comes up against the objects themselves.

The other thing I dislike about my approach or how its evolving is that this OO approach actually feels like it’s limiting my genericness.  I suppose since I am making this for a specific board game, and not a generic game state manager utility for any board game, that’s ok.

I feel a little too much like things are poking into other internals.  This idea of “player owns a list of pawns” feels worrisome to me.  How will these pawn objects ultimately feedback into the player object and is this going to lead to some really horrible spaghetti mess of object relations that’s going to be hell to disentangle at a future point.

Then I think – why am I coding this at all.  I should be printing and prototyping physical things with friends, this is supposed to be a board game after all!

Then I think – because I can.  Because I want to flex my brain on a project that isn’t disentangling the mess of virtual wiring that’s my day job.  I may feel as though I’m not as productive here, but once I get the foundation up and running I feel like this may make playtesting easier, and if I can work on abstracting things out from what I’ve learned, I maybe can create a good online testing framework for my boardgames that suits my purposes.

Point being here, I guess is that I was wasting so much time trying to shoehorn things into my own wrong way of thinking instead of letting the natural flow of the code dictate what needs to be done.  Part of that is me getting used to Pythonic ways of doing things.  Part of that is me just needing a better grounding on how to approach these issues.

I’m going to try to implement this new portion of my code into my C# base and see what differences rear their little heads.
I *feel* like I should be able to do what I did with Python in a shorter time (writing it in C#) due to more familiarity with C#.

I’m still torn on how to proceed though.  I like Python and C#.  But I know I want to make it web based, so JS/HTML/CSS is important.  So I’ll still ultimately need some web framework for the UI portion which means figuring out what the best way to go is.  Does any particular framework look like it suits what I want/need/know?

I’d really like to use C#, but hate that it’s basically windows only and traps you into the ASP.net framework, AFAIK.
There is F# and Fable/Elmish…  But again – I’d really have to learn something new with that.  Even thought the syntax of F# appeals to me, I’m even more at a loss w/it than I am python.
Though now that I’ve got VS Code running python properly, maybe I can get Ionide finally setup and working.  Was being difficult previously, so I just gave up.

Rust support seems to work quite fine.  GAAAAAAAAAAH too many languages not enough time, I want to know them all!

Leave a Reply

Your email address will not be published. Required fields are marked *