The Fantasy Console Club

Share this post

A New Year and a New CLI

pixelvision8.substack.com

A New Year and a New CLI

Dev Diary

Jan 2, 2022
9
Share this post

A New Year and a New CLI

pixelvision8.substack.com

Well, it’s a new year, and my 2022 resolution is to write more dev diary posts highlighting the work I am doing on Pixel Vision 8. For those of you that don’t follow me on Twitter, you may not have seen that I am currently rewriting the core engine, codenamed Pixel 64, or P64 for short.

I’ve spent most of December stripping down PV8 and fixing all of the rendering bottlenecks that kept it from running on SOC computers like the Raspberry Pi. These dev diary posts should offer more transparency into what I am doing behind the scenes.

Today I focused on adding an all-new CLI to the P64. Since the P64 solution is set up like Pixel Vision 8, there are three main runners: C#, Lua, and Roslyn. But I don’t plan on distributing them individually. The goal is to have a single CLI for P64 that handles all of the core functions you’ll need to make, play, and eventually share games. To help speed things up, I started integrating a NuGet package called CommandlineParser, which you can also find on GitHub. Here’s a little teaser of how it’s going to work.

There are four main commands, called verbs, which handle the following functionality:

  • New - Creates a new game project anywhere you want.

  • Configure - Helps you customize your game’s settings and limitations.

  • Run - Plays a game based on the path you supply.

  • Build - Creates a stand-alone EXE of your game for Windows, Mac, and Linux.

It didn’t take me long to modify the example project and wire up P64 to support the ‘run’ verb. P64 already accepted a path to load up a game that I was using for testing, but now it will be a core feature of the new CLI. One of the other things I really like about this library is that it makes adding help incredibly easy. For the most part, it’s built into the system; I just need to supply the text. Here’s an example of what you see when running P64 from the command line without supplying any arguments.

There is still a lot of work left to do, but this is a key feature for rebuilding Pixel Vision 8. Previously, you had to rely on Pixel Vision OS to work with game projects. While I plan on getting the OS to run on top of the new P64 renderer and APIs, it’s going to be a while. So I am moving to a more developer-centric approach to making PV8 games by using this new CLI. And when I get around to porting Pixel Vision OS, it will just tap into the same CLI, so there is one unified system for all the game-related functionality.

This is how I originally wanted PV8 to work, but I spent so much time working on the OS I never got around to implementing a full CLI. For those of you familiar with this kind of development, it’s going to make things a lot easier. It also frees me up to work on the more important stuff, like improving performance on the Raspberry Pi. I already see awe-inspiring results with my early testing of P64 and I can’t wait to share the new project with everyone very soon!

Share this post

A New Year and a New CLI

pixelvision8.substack.com
Comments
TopNewCommunity

No posts

Ready for more?

© 2023 Jesse Freeman
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing