Delivery Alchemist Postmortem

This is an abbreviated version of my postmortem without screenshots and insight into the midjourney process I used, if you're interested to know more head over to my github repo: https://github.com/jomoho-games/ld53-delivery

space3_title.png

Get ready to embark on a thrilling journey through the cosmos in Delivery Alchemist, a unique game that masterfully combines space exploration, alchemy puzzles, and an element of discovery. As the universe's most skilled Delivery Alchemist, you've been entrusted with a vital mission: to explore distant planets, unlock hidden secrets, and deliver rare and valuable elements to the many civilizations that inhabit the cosmos.

Utilize your alchemical prowess to combine elements and create new materials while completing quests for diverse communities you encounter on your interstellar travels. With over 60 elements to discover and a multitude of quests to accomplish, you'll find yourself lost in a captivating, vibrant universe teeming with surprises.

Key Features:

  • Innovative gameplay: Seamlessly blend space exploration, alchemy puzzles, and discovery as you traverse the cosmos.
  • Expansive universe: Venture through an array of Levels, each with its own unique locations, inhabitants, and challenges.
  • Develop your abilities: Unlock new skills and knowledge as you progress through the game, enhancing your alchemical expertise and delivery prowess.

Embark on a cosmic adventure like no other and become the Delivery Alchemist the universe desperately needs. Are you ready to accept the challenge and chart your course through the stars?

Postmortem Jam Version May 1st 2023

I didn't finish this game in time for the compo and had trouble getting pybag to work, because of pygame_gui. So it will be a Jam or Extra Game.

I wrote this game as an experiment using AI in the form of MidJourney v5 and ChatGPT4. I used pygame + the pygame_gui library and used no music or sound.

I will try to explain what I did what worked well and what didn't and give an overall conclusion, not just on AI but on the whole experience.

what worked well?

  • ChatGPT: works like magic, from coming up with ideas for mechanics and gameplay , to creating the levels and alchemy content, to quite intricate algorithms and clever functions I couldn't have done as much in such a small time without it.
  • Python: python + pygame really don't get in the way much
  • Preparation I spent the Friday before the Jam preparing my setup and writing a small framework. I'm in Germany, so the Jam starts at 3 am on Saturday
  • Spritesheet workflow: I created spritesheets straight in MidJourney and used a tool called sprite-cow to generate a spritesheet, which allowed for a super fast art creation process, more on that later.
  • Random Generation Using Randomness as usual works well to create a variety of content that seems interesting. Pythons randon library is excellent. Nothing new here!

What didn't go so well?

  • pygbag I planned to release the game using pygbag, which allows for pygame games to run in the browser, I didn't test the pygame_gui lib though, which somehow doesn't work.
  • Midjourney prompting While Midjourney creates amazing beautiful pictures it is sometimes impossible to generate exactly what you want. In this case I wanted to have a top down post apocalyptic steampunk world, but ended up having to use the space sprites, as they were more usable.
  • Sound Didn't do anything here I created some music using abundant-music, which haven't made it into the game as of yet. I might spend an hour or two on my windows computer to get sounds for everything and also music, but so far no sound.
  • collision detection As usual rolling your own collision detection and resolution whithin a weekend doesn't work so well, I have tried and failed before, so no surprises here. I abstained from using box2 or pymunk because I wanted to use pygbag to publish and they didn't work. but in retrospect, that could have saved a lot of time and also made the game probly more fun.
  • fun As usual fun is the most elusive variable to chase after and I understand now that it can take quite some time to tweak a game to the point where it is fun, so no surprises here.

ChatGPT: A Helpful Assistant

How ChatGPT Helped

ChatGPT was a game-changer in the development process. It helped with:

  1. Generating ideas for mechanics and gameplay
  2. Creating levels and alchemy content
  3. Developing intricate algorithms and clever functions

With ChatGPT, the development process was faster and more efficient than ever before.

I was able to ask for different game ideas and mechanics. I combined the concepts using simple language and then went into generating systems and datastructure code for python all in one seemless session.

I created a broadphase optimization for collision detection from scratch which uses a list sorted by the objects x value and uses bisect to find object indices for rendering and collisions and also for removing and inserting them when their position changes during updates. All while keeping the references to important game objects like the player. all in all the code base it at 2673 Lines of Code after the weekend:

```sh broadphasetest.py: 145 testmapgen.py: 14 testalchemy.py: 8 game/quests.py: 455 game/mapgen.py: 41 game/windows.py: 250 game/alchemy.py: 253 game/imagemanager.py: 62 game/gameobjects.py: 347 game/physics.py: 279 game/init.py: 9 game/colors.py: 13 game/loop.py: 272 createelementtheme.py: 58 main.py: 421 countlines.py: 32 cleanupspritesheets.py: 14

2673 lines in 17 files ```

Of which at least these are almost entirely chatgpt:

```sh broadphasetest.py: 145 testmapgen.py: 14 testalchemy.py: 8 game/quests.py: 455 game/mapgen.py: 41 game/alchemy.py: 253 game/imagemanager.py: 62 game/physics.py: 279 cleanupspritesheets.py: 14

1271 lines in 9 files ```

So it is fair to say that about half of the code was written by ChatGPT, which sounds great for a productivity junkie like me.

Some cool things I did with the help of ChatGPT:

  • Ask to write a function that times an algorithm to be able to predict how many objects I can use.
  • Ask to write a function that uses timeit to time different versions of an algorithm to choose the faster variant.
  • Developing a working broadphase algorithm from scratch.
  • Working out the alchemy system against the quest system, by letting it write code that checks what materials are needed for each quest. And then compare sets and tell it to fix either the alchemy system or the quests based on missing and superflous materials. Working out a system like that would take me a lot longer by myself.
  • Writing a location generator that places cities across the map within a minimum and maximum radius
  • Coming up with matching colors for each material in the game staright as a python dict