Hello, and welcome back to The 8-Bit Guy.
So, most of you know by now I spent most of my free time in 2017 designing this Planet
X2 video game for the Commodore 64.
Now, a lot of people were perplexed why I waited so long to tell anybody about it.
And, the reason for that was because I was afraid people wouldn’t understand what the
game was about, and so I would code a little bit and I would think, yeah, I’d really
like to show this to people.
And then I would think, no, people really won’t understand so let me just finish this
one more feature, and then I’ll show it to everybody.
And so, I’d finish that one feature and then I’d go well, maybe just one more feature.
And, I just kept going through this loop over and over again until I got to the point I
was almost done with the game and then at that point, I thought well I’m so close
to being done with the game, let’s just finish it first.
And so, that’s kind of how that happened.
However, a lot of people said they would have enjoyed seeing a more detailed series throughout
the production of the game showing what challenges I faced.
And so, that’s what I’m going to do this time.
I essentially finished the last piece of code on November 9th of 2017.
And On November 10th, I immediately started thinking about a sequel.
Now at first, I wasn’t even sure what computer platform to port it to.
But, I knew I wanted something with a little bit more RAM.
Because, on the Commodore 64 version, the main problem I had was just not enough RAM
to implement all of the features that I originally envisioned the game to have.
I did a poll on my facebook page and found that the overwhelming majority wanted me to
port it to MS-DOS.
Of course, that raises a whole new set of questions.
You see, if you look at the Commodore 64, it was in production for like 12 years.
And during that 12 years, it stayed pretty much exactly the same.
It had the same 64K of RAM, the same video chip, the same audio chip, and nothing really
changed.
MS-DOS, on the other hand starts in 1981 with the IBM PC 5150, which had a 4.77 Mhz
processor, 16K of RAM, and a CGA graphics card.
But that architecture continually improved over the next 15 years or so that MS-DOS games
were being made.
I like to break it down into 3 eras, although in reality there are no dividing lines as
it was really a gradual change.
Nevertheless, the question remains, which of these systems do I want to target?
Throughout the era of DOS computers, you had a lot of video card choices, including
CGA, Tandy, Hercules, EGA, VGA, and SVGA.
So, I considered this question for some time.
I also had another poll, asking which graphics mode was most important to support.
As you can see VGA was by far the most requested video mode.
Despite that, I wasn’t sure if that was the way to go or not.
For one thing, MS-DOS already has several real-time-strategy games.
For example, there is Command and Conquer, Dune II, and of course WarCraft.
All of these came out in the 1990s.
And if you look at the system requirements for these games, every one of them requires
VGA and usually a 386 or 486 processor.
One thing I was sure about, if I followed the exact same design concepts as I did the
Commodore 64 version, then there should be no reason why my game wouldn’t run on even
the slowest of MS-DOS computers.
But not only that, I feel like if I supported VGA only, then I would also be in competition
with those other real-time strategy games and I simply cannot compete with those because
those were designed by an entire team of people.
I’m just one person plus maybe you know an artist and a musician.
I decided that my base target platform would be this Tandy 1000 EX, which came out in 1986.
Let’s have a look at the specifications I’m dealing with here.
The CPU runs at a whopping 7.16 Mhz.
The memory is just as impressive, a whole 256K.
As for graphics modes it supports traditional CGA graphics, along with it’s own special
Tandy modes.
For a hard drive it has, none.
Instead, it has a single 360K floppy on the EX model and a 720K floppy on the HX model.
Now, when I say this is my target platform, don’t think for a minute that the game won’t
run on better or faster MS-DOS machines, because actually I plan on supporting a wide variety
of both video cards and sound cards and CPUs, etc.
Of course, I can’t support everything in the world because for every graphics mode
I support, I have to not only write the code to support that graphics mode, but I also
have to create tiles and artwork and everything to also support that graphics mode.
So I decided right off the bat that I would not support Hercules.
I doubt there are many computers still around today that even use that card.
As for EGA and VGA…
I didn’t want to support both.
I figured I should support one or the other.
And to be honest, I felt like 16 colors would be plenty for the type of game I was
creating and of course all VGA systems are backwards compatible with EGA, so that means
lots of supported machines.
But to be honest, there really aren’t that many EGA systems around anymore.
In fact laptop computers essentially never supported it.
Laptops seem to have gone straight from CGA to VGA.
They just skipped the whole EGA for some reason or another.
I’ve never seen a laptop that supports EGA graphics, so they’re.
I think there are a few but they’re really rare.
The other thing is, I think most desktop computers that had EGA were probably eventually upgraded
to VGA, so I just don’t think there’s very many laptops or desktops out there that
are still using EGA.
Another deciding factor was ease of programming.
It turns out EGA is kind of a pain in the rear to program for, looking at the design
of VGA, it’s actually much much simpler so I think that from a programming perspective,
it’s easier to deal with VGA.
So, I decided there would be no EGA and no SVGA.
Leaving essentially these 3 video cards to support, which I think will cover 99% of
the machines out there still in use today.
And since VGA was backwards compatible with CGA and EGA, one thing I always loved to do
is test out every new game in all 3 video modes.
So, here’s LHX being played in CGA mode.
Beyond letting me see what the other video cards were capable of, at minimum it would
usually give me a better appreciation of having a VGA card myself.
Anyway, this always became a ritual of mine to try every game in the different video
modes.
And so, I wanted to make sure people could do the same thing with Planet X3.
In fact, one thing I was eager to do was support the seldom used CGA composite mode.
Now, I did a video on this a while back, but for those who may have missed it, here’s
a refresher on that.
the CGA card typically can only display 4 colors at once in graphics mode.
And most games use the default magenta palette.
And while it is ugly, it’s actually probably the best palette available.
However, when CGA is connected to a composite monitor, it can display 16 colors, and even
more with special tricks.
When I looked into it, I found it was dead simple to code for, so I decided Planet X3
should support this mode.
So in the end, these are the 4 modes I’ve decided to support.
*** Pick a Language ***
OK, so now that I decided what computer platform I wanted to support, I had to next pick a
language and a compiler.
And, I really had no idea where to start, so I talked to several people who were familiar
with programming under MS-DOS and I found out that realistically there were three choices
to pick from, which is C, Pascal, and assembler.
And, I actually know how to program in all three of those languages already, although
admittedly, assembler is very different from one processor to the next.
So, I wasn’t particularly familiar with 8086 assembler.
But, I endeavored to learn.
And it’s good for me that I had this book which I’ve had since the 1990s that a friend
of mine gave me.
It’s actually the Intel 8086 programmers reference guide.
And it actually shows everything about how the processor works and every assembler command.
I found programming for the 8086 to be quite a bit different from the 6502 that I was used
to programming for.
Still, I spent a couple of weeks playing around with different languages and different compilers
before I finally did settle on Assembler.
And you know, a lot of people are afraid of assembler, like it’s some dirty word, something
really hard and mysterious, but truth be told it’s actually not that hard once you get
started and you learn how to use it.
You know, the funny thing about it is, I can’t tell you how many times I’ve had people
ask me if I programmed Planet X2 on the C64 in BASIC.
Which, the answer is NO, I didn’t.
It was programmed in assembler.
You can’t program anything in BASIC on these older machines.
In fact, you know, truth be told, on any of the machines made in the early 1980s to even
most of the mid 1980s, assembler was the language of choice.
Any of the commercial games that were released from probably up to 1987 were all written
in assembler.
I mean, there just weren’t any other languages that were fast enough.
So, it’s not like I’m doing anything unusual or unheard of by writing these games in assembler.
I’m actually doing exactly what I would have done had I been developing this back
in that time.
When I wrote the C64 version, I had to first develop some tools such as this tile editor,
and later a map editor before I could really start working on the game itself.
And this is no different, since I’m starting from scratch on a brand new platform.
So, I decided to create the tile editor first for a couple of reasons.
First and foremost, of course I have to have to some tiles before I can start working on
my game engine.
But, secondly, working on a smaller project like this gives me an opportunity to become
more comfortable with programming on this platform.
It gives me a little bit of experience before I start working on the actual game.
So let me show you what the tile editor looks like.
This is the CGA tile editor, which is what I coded first.
So the idea is you can move around and plot pixels like this, change colors of course,
and I even added some helpful commands such as being able to shift the entire tile in
any direction.
Of course, this is all keyboard controlled.
I haven’t gotten into mouse support just yet.
I also added a fill command that fills the entire tile with some color.
Now, if I push the TAB key, it will take me over here to my tile database.
I can load in any of the tiles from this database and edit them.
Up at the top I added this little feature to help me see what different tiles look like
next to each other.
So, for example, if I wanted to see what grass looks like next to plants, then I can
do that.
And I have a total of 256 tiles to work with, which is considerably more than the
48 I had to work with on the Commodore 64.
This program also allows me to define the names of the tiles, as well as certain attributes
such as if you can drive on it, build on it, things like that.
All of this artwork here is more or less temporary.
Most of it was drawn by either myself or Anders Jensen, just to get something to work
with.
Now, let me show you the CGA composite version.
It’s built on 90% of the same code, but I’ve altered it just enough to work in this
mode.
You’ll see the color palette is much larger.
But also the pixels are twice as wide.
That’s the compromise with this mode, you get more colors, but less screen resolution.
Still, I think the artwork looks pretty good and I would definitely say this mode
will be more enjoyable to use for CGA users than the standard magenta 4-color mode.
Keep in mind every tile had to be re-drawn from scratch to accommodate this mode.
Now let me show you the map editor I wrote.
This is the CGA composite version, but the maps I make here will work on any version
of the game as they are not graphics mode dependant.
When it starts there is just garbage here.
So, let me type in a map name to edit.
OK, so this is the one and only map that exists right now for the game.
And it’s just an experimental map at the moment.
But you can see some of the buildings we’ve designed.
By the way, some of these will likely be re-drawn at some point.
But they are good enough for now.
Here’s a mineral field, which should resemble the Commodore 64 version.
Here’s a river with a bridge across it.
And of course, here’s an alien base.
And the way this map editor works, is I can just press enter and scroll through here
and pick a tile, then just plot that tile wherever I want on the screen.
It’s that simple.
I’ve added a few extra commands to help speed up certain things, such as plotting
multi-tile objects like these buildings.
OK, so are you ready to see the actual game?
When it starts it gives you the option of 4 different video modes.
Really it’s just 3 different modes, Composite inverted colors is the same mode as the one
above it, but the color hues are reversed because some CGA machines use different hues
on composite.
I haven’t written anything for VGA yet, but eventually that will be on the list too.
Anyway, I’ll go ahead and select option 1 for regular CGA.
Now, you may notice this looks a bit different.
That’s because I’m using a different tile set that I just got in today from the pixel
artist I’ve hired to draw some better graphics for me.
I’ll talk more about that later.
This is a tank I’m driving around.
You may notice I’ve gone with a different screen layout from the Commodore version.
But the controls work more or less the same.
So, I can press ENTER to bring up the browse option and I can select a different unit.
Now this unit here is a flying unit, so it can go over anything.
There are no sound effects yet, by the way.
Here are some of the enemy buildings.
Now the truth is, I haven’t even decided whether the final version will have flying
units.
I’ll talk more about that in a later video.
So let’s have a look at my base.
Of course, these are really just tiles at this point as there is no actual code to handle
buildings yet.
But these are here just to get an idea of what things will look like.
So, these are solar panels, and they’ll have to connect to a central power plant like
this one.
This is a factory, and here’s a missile slio.
This is a radar station.
And over here is a gas refinery.
Although, this would normally not be in the middle of your base.
In fact, I’ll show you where that would actually go.
So here’s some lava and nearby are some methane gas vents, and that’s where the
refinery should go.
OK, let let me show you some other interesting features.
You can change to the alternate CGA palette if you want.
It doesn’t really have any benefit other than some people may prefer to look at these
colors instead of the magenta colors.
Otherwise, everything is the same.
Another feature is a reduced screen width mode.
This is for slower machines, I’ll talk more about that in a minute.
But suffice to say, everything works exactly the same except the screen size is smaller,
more similar to that of the Commodore 64 version, actually.
OK, now I’ll show you what it looks like in CGA composite mode.
So again, we’re using an entirely different tile set for this mode.
I hope that eventually all of the modes will look more similar to each other, but
we’re still in a process of figuring out what things should look like.
But the game engine and the map work exactly the same here.
So let’s go back up and look at my buildings.
So, they do look at bit different.
The radar station will probably be updated to look more like the other one in standard
CGA mode.
But anyway, this mode is really neat and I’m amazed it wasn’t used more back in
the 1980s as this mode offers color graphics very similar in capability to machines like
the Commodore 64 or Apple II.
It certainly makes for a better gaming experience.
In fact, it’s still hard for me to believe this is CGA graphics because I spent most
of my life thinking CGA could only do 4 colors.
By the way, here’s a little boat that you’ll be able to control eventually.
Next I want to show you the Tandy mode, but for that I’ll show you a real Tandy 1000.
This is the machine I’m doing most of my real hardware testing on at the moment.
I like the HX model because it has a 3 and a half inch floppy drive, which makes it very
easy to copy my game over to.
But, it’s also my only machine that has both types of floppy drive so I can also
use this machine as a go-between to copy the files over to 5 and a quarter inch disks.
That way I can test on other machines too.
Well, let’s start it up.
And I’ll show you the game working in the true Tandy video mode.
This is actually using the Tandy low-res 16-color mode.
The reason I’m not using the hi-res mode is two fold.
The main reason is that it is twice as much data to copy to the screen, and this computer
just isn’t fast enough.
In fact, up until just a few days ago, it wasn’t even fast enough to run full speed
in this mode.
And that’s actually the reason why this reduced screen width mode existed.
In this mode, there is less screen data to update, and so it was the only way to get
the game running smoothly on this machine.
However, my friend Jim leonard had a look at my screen drawing sub routine and gave
me some tips for increasing the efficiency by using some assembly commands I was not
familiar with.
And now it runs fine even in full screen mode.
What’s even better.
With this machine I can also invoke the slow mode which will make it run at 4.77 Mhz
like the original IBM PC and I can test the game with this.
And believe it or not it is still running perfectly fine now at this CPU speed, which
is great news because that means even the slowest of MS-DOS computers will be able to
run this game full screen and full speed.
However, I’m still going to leave the reduced screen width mode in there because
when I implement VGA graphics that will require significantly more CPU power and so if you
had somebody with a slower XT class machine with a VGA card, they might still need the
reduced screen width.
Oh, and the second reason I’m using the low-res Tandy graphics mode is that it allows
me to share most of the same code and artwork as CGA composite mode, so that saves a lot
of time.
Of course, I have a long way to go.
All I’ve really done so far is concentrate on the graphics routines.
I haven’t even touched the background routines, which is going to be a big part of a game
like this.
I also haven’t done anything with the sound routines or even started anything with VGA
graphics yet.
In fact, all of the artwork itself is still in its infancy for the most part.
I think when part 2 comes along, you’re going to see a lot of changes in the way that
the artwork looks.
Oh, so speaking of artwork, I did want to mention that I hired a pixel artist.
He’s from France and his name is Renaud Heidt, I’ll put a link down in the description
to some of his work if you are interested.
I got a lot of artwork submissions after I released Planet X2, but I was most impressed
by his work.
In fact, here are a few sneak peaks at some of the storyline art.
So, yeah, I am going to have these little scenes that will come up between different
levels with some text and music telling you what is happening.
And so this is one of the CGA mode scenes he did.
And I think it looks absolutely great.
Here’s another one of the Protoid pyramid base with some ships rocketing past.
Here’s the same scene done in CGA composite mode, which should look the same in Tandy
graphics as well.
And then, here’s the same artwork done in 256 color VGA mode.
This is the only VGA graphics that exists for the game at the moment.
But I want to assure you that it definitely will have VGA graphics.
So, I am planning on doing a kickstarter for this game.
Now, I haven’t started that yet.
I’ll probably start that around the time the making of part 2 video comes out.
That’s probably when I’ll start the kickstarter.
And, the reason I’m going to do that is because with Planet X2, I only ordered 500
boxes, because I didn’t know how many I would sell, and I was afraid I’d end up
stuck with hundreds of boxes that I just couldn’t sell.
And, well, the truth of the matter is I ended up not having enough.
And people are constantly bombarding me about when I’m going to have more boxes available.
Well, that’s a tough problem because most of these box companies want a minimum order
of 500 boxes.
So, I can’t just go out and order another 50 or something like that.
And so, I figure if I have a better idea of demand up front, then I can order all of the
correct number of materials and have them ready at the time of release.
And so that’s why I think the kickstarter is probably a good idea.
Anyway, that about wraps it up for part 1.
When part 2 comes along, I’m hoping things will look far more interesting at that point.
So, stick around for that, and we’ll get back to some retro content for the next episode,
and thanks for watching!