Tag: space carrot

  • d/Paranormal Pickle, v/0.3.x

    As I reach and stretch for new features to add into Space Carrot, the 0.2.x phase of development focused around the goal of “creating a navigable world” I have opted to conclude this particular push and move into my next phase of work.

    Space Carrot ends with a few notable features that are technically world navigation functions but really are starting to bleed over into the player management, action managment and UI realm, all work for later.

    I added a light switch. That may not sound very impressive, but what it really means in code speak is that I added an action trigger that only functions during a very particular collision event to conditionally change the visibility of a “shadow” over the current room, simulating a lighting event. A lot of little systems (all of which will be useful later) had to be implemented to make this a reality.

    I also added my first animation.  This is a simple conditional animation of the player walking versus standing based on movement.  This should have been really simple, but I had (again) shortcutted my design work and leaned into single use sprite pngs. Going forward as I bring the world to life in my next phase of design and development I have a bit more confidence about creating animated objects and more.

    Paranormal Pickle is the next phase of work, and it begins today, less than two weeks after Space Carrot.

    This phase is really very much me leaning into populating the world, filling it with colour and art and objects and life.  I have dabbled in this a little as can be seen from the handful of decorative things like switches, doors, and pallets.  But I have a whole store to design, and these then 33 other rooms to fill with shelves and furnishings and wall decorations and windows and more and more and more.

    In other words, this is kind of a creative phase more than anything.

    That doesn’t mean I’m stepping away from the codebase tho. 

    The other side of this is the other layers of the game like the menus and a welcome screen and even just a splash logo (because all games need a studio logo and title cards, right?)  There is a lot of coding and button interaction and the like which I need to study up on and figure out.

    To all that effect, what that means is that in the first subphase of Paranormal Pickle, 0.3.1 I’ll be focussing on three main enhancements to the game:

    First, a title card, which will allow me to implement a mechanism to delay starting the game pending player interaction. Right now the program just jumps right into the game on load. Games don’t ever really work that way, do they?

    Second, I want to fill the world with furniture and life. I’m going to start with the main room: the store front, filling it with shelves and decorations. In this effort, I also want to add something I’m calling (to avoid confusion for myself in the code) lively decorations, which are essentially background objects that have animation cycles.  Think flashing neon signs or trees rustling in the breeze or steam blossoming off of something hot. All of this brings the space to life, and I think I actually know how to do this. It’s just rolling up my sleeves to make it happen.

    Third, I want to add a basic popup menu system. This is pretty self explanatory, but it will need to be something that grows and adapts, so maybe I’ll narrow this down to two “tabs” of things I want the player to interact with. 

    So, there it goes. The game progresses.

    It’s funny. I have started following (and being followed by) other developers on social media, and as proud as I am of the work I am making from scratch and this being my first attempt at a real game and all, I still look around and feel a bit out flanked by so many great game devs out there building amazing things. My game is going to be pretty 8-bit in style and play, so hold that up to  a full 3D triple-A production and it all seems about thirty years too late. I have always had an interest in retro games, of course, having lived and played through that era, and now I’m finding that the retro vibe very much fits with my coding abilities. What I guess I’m trying to explain is that maybe this is all impressive to some and way less impressive to others. But I’m aiming for something simple and fun and achievable with Pleck’s Mart. And right now it feels like I’m aiming just about right.

  • story and art and code, oh my

    This game has become something of an obsession. Or, as the folks over in the meme-posting land of LinkedIn would tell you, a follow-your-passion moment worthy of some stock photography of me running through a field with my arms flung into the air.

    Seriously, in this few weeks of downtime between leaving my part time job and starting back up some professional upgrading and curricular activities—and still, given that the weather is in deep-winter mode—I have little else to occupy my time besides consuming books and Netflix or making something cool.  So the video game design project has won.

    All that is to say that I’m made some serious progress.

    I am nearing the home stretch of Space Carrot, which was my design phase set on building out the equivalent of a game board.  Yeah, there is still more to do as the game design progresses, but this phase was all about building the world in which the game takes place, and in addition to previous updates I’ve made on this phase in the last few days I have added a lot more stuff.

    I think the biggest of these is the furthering of my story system. Tweaks, again, will continue, but the core of it is in place.  The story-proper is a collection of ordered text events that appear on the screen moving the “plot” of the game along. When a room is first entered, when an area is first accessed, when anything of interest happens that could benefit from explanation, this all triggers a bit of the story to be loaded into the game and displayed on the screen. The game, as I have alluded to in other bits of writing, started as a story that I decided would make a good game, so there is a bunch of lore and narrative and characters that are all part of playing it.

    Another big behind the scenes piece is the database system that is coming closer to a solid initial implementation. Behind every good game is a good database, after all. Databases in games store more than just player information and scores, but are sort of the malleable memory of the game itself. I can set all the pieces up as a starting point in the code and have it all initialize when a player first starts the game, but from there the whole point is the player moving, changing, unlocking, and advancing the game itself. Every time something happens the game can try to keep track of this and save it at some point, or—as I am doing—it can basically save as it goes. The advantage of the first method is that someone can reload and go back. That is by design not an option in a rogue-like because the point isn’t to save and progress, but to play over and over again trying different approaches, so a point-in-time save file makes no sense for that. Instead, the state of the single play-through is pushed to the database frequently unlocking and changing the state of the game so that when the player “loses” the game goes back to an almost fresh state—but certain aspects stick and are unlocked ever after and for the next play. A tool. A room. Et cetera.  The foundations of that are now in place as I creep closer to the end of Space Carrot phase.

    And along with these two big bits of work I have not only done some bug clean up but also some key refactoring of the code as I (a) learn better approaches to things because I’m learning the language better and (b) encounter decisions that impede progress because of how I tackled it the first time. Not only does this mean simpler algorithms and code-reusability, but also building little functions that are like little single purpose tools to transform some data or extract a bit of something and give it to something else. 

    Oh, and I’ve leaned into public constants. As I build it’s often easier to hard code numbers into things for the sake of speed and debugging, but as things grow and complexify, one realizes that changing over, say, a number used eleven times to define a spawn point to a constant makes it easier to update when the map shifts ten pixels to the right because of a design change. I spent an afternoon just replacing hard-coded numbers.

    In the end, what this all means is that I am probably one more subversion away from declaring the end of Space Carrot phase and moving into the next one.  More on that later. So stay tuned.

    The obsession is palpable.  Maybe, those LinkedIn people are right and when you lay awake at night puzzling over a code problem and are not laying there dreading the morning, but rather considering creeping downstairs at 3am to try it out—maybe that is a passion project. Grab onto that, huh?

  • after more seriously cold coding, progress abounds

    I hunkered. It helped that it’s been twenty-five degrees below zero outside and I can’t do much besides sit in the warm house and look out through the frosty windows. No dog walks. No running adventures. No casual outdoor excursions. Instead, I’ve spent two full days coding.

    I wrote just a couple days ago about my intention to work on this current phase of development (Space Carrot) and barely forty-eight hours later I’m posting again to say that I’m moving my efforts to a new sub-sub-version. I updated the milestone log with the results of 0.2.1 and I’m moving on to 0.2.2 as of my next coding session.

    What goes into writing a game like this?

    I’m not an expert, I’ll remind you. I’m winging this and hoping something comes out of it.   I’ve been working on some game story lore, fleshing out the mapping system on (digital) paper (ie sketching out things on my tablet) and sitting down to think about the mechanics of creating a game space. 

    After all, the whole point of Space Carrot (I realize that some people might read that as the name of the game and not just a development phase) is to create a navigable world for the game-proper to exist in.

    First, I worked through the nuances of creating a collision detection system that doesn’t weigh down the processor checking everything constantly. Now you can’t walk through walls. And since I have now forced every movement to happen inside the boundary of virtual walls, my player sprite can navigate around without falling out into the void. Testing will continue on this, but so far it works.

    Second, I had to figure out the strangenes of door-to-door inter-room navigation. This, also a foundational aspect of the game, seems simple at first but in reality it’s a kind of interplay of a player “colliding” with door, waiting for an action to be triggered, and then figuring out what door she collided with is (specifically) and where it leads. Since this whole thing will exist as a series of  virtual rooms, any given door maps to a corresponding door on a different room map, all of it encoded into a few lines of data and “match” statements in the little door collision detection function. In other words, a door collision is detected and if that happens a trigger action can be accepted and validated, and if that happens the player’s location can be updated, and if that happens the code goes uh-oh, I’m displaying the wrong room because the player isn’t here anymore and then the code despawns wrong room and then spawns the new room where the player is now located and also standing at the cooresponding door she just walked through.  And all that happens in a fraction of a second so it seems to the player (maybe you) that your little dude just walked through a door into a new room. Sketch that out in a math equation, huh?

    Finally, I wanted to add a bit of explanatory text to the scene. Specifically,  this comes in the form of a little corner notice room label, when a new room was entered (it’s going to get confusing otherwise, believe me) and any other little notices that might help the player poke around the game.  This was relatively the most simple part, but I did need to figure out Bevy’s new (0.15) Text system, which has not been updated in almost every 3rd party tutorial and code sample. Every explanation of how to use this leaned into the TextBundle constructor which has been deprecated in the latest version. Good thing this whole langauge is starting to make more sense to me with each new function I create.

    So. That’s that. Two solid days in front of Visual Studio and a compiler—and countless times typing the run command and debugging my buggy code until I incrementally added all this stuff and it seems to work.

    But then, this is just a few more basic building blocks of a much bigger plan.

  • d/Space Carrot, v/0.2.x

    I am really digging into the exposition here.

    Call it New Years Day hangover blues, or call it coder procrastination but I’m feeling the vibe to write while I let the game development-proper marinate for a day.

    I may not have actively timed it precisely so, but it turns out that after some frantic coding while I waited for my party guests to arrive on New Years Eve, I hit something of a proof of concept milestone.

    Some of my (very early) playing around code just-trying-to-experiment and practice coding was labelled under a version number of 0.1.0.  I dumped most of that in the archives of never to be compiled again history.

    But the latest bit of “this might actually work well” code? That was written under the version number of 0.2.0. And that code? It isn’t terrible. I mean, it’s cluttered and a bit inefficient, but I can work with that. Thus, I’m kinda drawing a line at midnight of last day of 2024, and calling that chunk of compilable, runnable, actually-does-something code my proof of concept phase. And so, as we enter 2025 I’m going to move forward with this project but with a lot more structure and a lot more of a plan.

    The next wave of development is called Space Carrot which should take me up through version 0.2.x to a 0.3 candidate. 

    (Of course the way I write all this it sounds like I’m releasing something, but honestly don’t expect anything public until at least a 0.6 or 0.7 version!)

    Alas, Space Carrot is my attempt to build the virtual geography of my game. Such a thing will ideally include the ability to navigate through as much of the map architecture as possible. That is to say some high level things that I am envisioning as features as I work on this next phase should include:

    • doors that traverse room maps
    • wall collisions
    • action triggers
    • game pad controls
    • mouse click controls
    • modal text information boxes
    • more efficient database i/o for rooms
    • a data-driven world map
    • at least a rudimentary tileset that I can refine and improve
    • and, of course, probably a dozen other things I’m not even thinking about yet because coding is like an adventure where you kinda know where you’re going but are bound to encounter things along the route you can’t even fathom as you set out

    I wrote in my last post that I have a bunch of scattered amateur coding experience—including essentially taking the first year of a computer science degree as options while I was working on my major—but I am really very much learning here, working on the code incrementally with a big picture in my head, and lots of little itty bitty steps closer each time I sit down at Visual Studio. 

    Maybe you’re reading this because you are a developer yourself and are curious to see what I’m working on or peruse my code. It’s early, yet, for that, but I am logging all this into a git repo with that plan in mind for some point in the future.

    Maybe you’re reading this because you are just fascinated by the process. I can’t really shine much insight into it. Not yet, at least. Maybe as I go. Maybe that’s why I’m writing all this. Maybe?

    I have read a few books on such things that are largely anecdotes and I know there are terrific stories in the trials and tribulations of normal folks rolling up their sleeves and learning to do such things as build games that work and are fun to play. Check out the Boss Fights book series (I bought a bunch on a Humble Bundle once) or specifically I am thinking of “Blood, Sweat and Pixels” by journalist, author and podcaster Jason Schreier.   There are tales therein that are often just as interesting as the games themselves. So, at least if the game fails—well, maybe I’ll have an interesting story (and some padding onto my coding resume!)

    I don’t know why you’re here, but I’m glad you are interested or curious or—well, whatever you feel that brought you here. 

    In the end? This isn’t a project about money or fame or success. At the end of the adventure all this really is, is me trying to learn with a purpose—and also I’ve been thinking of making a game for two decades without really knowing where to start.  So. I’ll learn. You’ll read. And the code will emerge. Because I think I finally figured out how to get started.

    Stay tuned.