Mega
Mega
Posts

384

Following

30

Followers

31

This user leads a small army of cyborg shark-people.

Joined on August 8, 2010, 11:12 AM Visited on July 14, 2019, 1:39 PM
Badges

Mega posted on April 24, 2018 at 11:04 AM

DOS: Tools and More Tools

Ludum Dare happening caused me to forget to write an update post this past Friday/Saturday, so here it is a few days late!

Right now the entire DOS Game Development project has basically turned into a DOS Tool Development... and I intend to fix that, soon. I just need to make my graphics editor spit out engine-usable (And RLE compressed) files and palettes so I can start work on my game.

As for the game, I've decided that making Breakout is going to be too boring with the amount of work I've put into the graphics editor. I'm going to make an attempt to "port" one of my earlier Ludum Dare games to DOS.
This one in particular.

By "port", I of course mean "re-imagine". It's an LD game, I hardly pulled it together to begin with. I'd like to, if possible, make an Ultima-like game by the end of things, even if it's just a short one.

Anyway, back to the toolchain!

The Graphics Editor

It's nearly finished! Nearly! I just need to add in a palette editor, along with the utility shortcuts I've been putting off for nearly a month now (Frame copy/insert/delete).

Also need to actually implement my Save/Load code, but that's pretty simple. The only 'twist' to it is that I want to implement some basic RLE (Run Length Encoding) to save a few bytes of disk space.

Most of the work I did this week (And over LD weekend) was to implement some nice "Quality of Life" changes in the editor.

For one, key-repeat works on the arrow keys, and you can hold down the Draw/Erase buttons and basically erase an entire row or draw a line that way.

The UI now 'shades' itself when losing focus so that multiple layers of UI don't become too cluttered.

Zoom levels have been implemented. The editor can now handle an editing grid of arbitrary size, and zoom in right down to the 8x8 pixel editor for fine-work.

Also finally got over my procrastination and implemented the color chooser again. Had to iron out a few bugs/general protection faults, but otherwise got it working in about 20 minutes.

Here's a few screenshots of the editor in 'action' so far:
Hello.

Shark/Dragon-girl thingy. Hard to translate to 32x32, also the default Mode13h palette is kinda... weird. But I've worked with worse. Workflow wasn't too bad, but I have earmarked a few things I want to add before I call this ready for "production".
Those things being Undo/Redo and Flood Fill.

And that's the UI shading in action.

My next 'big' feature that needs addressing is a palette editor. I'm planning on having a global editor palette that can be saved/loaded from disk.
I also want to look into defining an upper area of the palette for cycling. Maybe the last 32 entries in groups of four, or add some way of marking a cycling palette in the palette file that isn't going to require too many hours of work.

That's it for the editor... now for the rest of the toolchain!

Code Editor

Turbo C++ is... OK. The IDE isn't the most comfortable thing in the world to use, requiring gymnastics to do things like copy/paste snippets of code. Also it has nasty window management.

But the biggest issue I have with it is the display resolution. It can basically run in "Argh, everything's huge" mode or "I can't squint hard enough to see that" mode.
It gets a bit tiring, which is one of the main roadblocks I've been facing while working on this project.

The other one is the fact that VMWare doesn't like to scale guest windows, so I'm actually peering into this when working on the project:

Fun times.

So I decided, after much joking about it, that I'm going to look into creating a text editor next. I could in theory just use Emacs for DOS, but that requires protected mode and a DPMI server... and in the spirit of things I want to keep to writing my own stuff using only the tools I had back in the day.

Now, all things considered, a text editor isn't that difficult to make. I made one last year following the Kilo tutorial.

The issue here is screen resolution. A text-mode editor is still gonna be a text-mode editor.

So I started doing some more digging, and decided to take a look at VESA modes. A lot of older DOS PCs don't support VESA at all, but since my original development hardware was a Pentium that did, I'll use it.

Which is easier said than done, especially when working in Real Mode. If I have a high resolution, only a window of that gets mapped to the usual location in CPU-addressable space (0xA000:0x0000), 64K at a time.
The Window can be repositioned, but only in increments that vary based on the graphics mode (Called the "Window Granularity").
So what I'll have to do before I can use VESA modes is create a driver/library of sorts that allows me to hide away all that nonsense behind some abstractions.

Of course, this constant repositioning relies on a DOS interrupt, so it's not exactly the fastest thing in the world. The 'better' way to do it is by entering Protected Mode or using a Protected Mode Interface, then you can access the entire 32-bit address space, with the VESA mode mapping into upper address space in one big chunk.

So I'm weighing up the pros and cons of the two approaches. Because of the way I'm handling things, I don't want to use a premade DPMI system (CWSDPMI/DOS4GW).
So I'd have to write one myself. I'm planning on doing a bit of research later into what that would entail.
Entering protected mode isn't too difficult in and of itself, but the issue here isn't with entering it, it's that Turbo C++ doesn't know protected mode is a thing.
So you end up having to jump into a lot of assembly and interface abstractions to get anything working.

But in the end, performance might end up being similar in nature between a DPMI TSR and just using VESA with its 'window' addressing.

I'll report on any tests I do next(?) week? Maybe this Saturday, to get back into the 'once a week' blog rhythm.

Also, interesting bit of information I brought up on Discord, but VESA can support some pretty out-there modes for an old standard. How 'bout some 1920x1440 16-bit color DOS?

I'm aiming for 1280x1024, which sounds like it'll be a huge performance hit, dealing with that amount of screen estate in 16-bit DOS mode... but this isn't for a realtime program, with a text editor I can get away with "dirty rectangle" updates on a relatively small scale.

Now, onto the final 'thing' I want to make (But won't, yet).

A graphical shell

All versions of Windows up through 98/ME were, essentially, just really fancy shells operating on top of DOS (And overriding a lot of default DOS interrupts, implementing an executable loader, dynamic linker and so on).

Naturally, all of this digging around into VESA and the like has made me think I'd really like to make my own "OS on DOS", just for fun.
I won't be doing it now though, because otherwise my original project will never see the light of day.
But it's definitely going to be something I'm adding to my list-of-things-to-make.

And that's the end of this week's report. This Saturday I'll see if I can get any example code up for VESA programming, whichever way I decide to do it.

Mega posted on March 09, 2018 at 9:27 PM

Triple Blog

Three blogs in a row? Somebody post something before I accidentally fill the entire feed ._.

So, last week I mentioned that I was getting into 7DRL. I did, for a day or two, but then got sidetracked. First by work, then by Path of Exile, and then by other things.

I basically ended up drawing most of the week away.

I mentioned last time that I was going to do a study on mechs? I did. I basically nabbed a bunch of reference photos, and actually approached the problem of designing a mech from the position of "How would I do this in Blender or Real Life if I was a mad robot maker?", and then again from "Right, now let's draw an unrealistic humanoid mech".

I did both. First, I present to you the Robowolf. Also known as The Robot that Boston Dynamics will make just before the robotic uprising that will occur because Boston Dynamics like to kick their robot dogs.


Oh yeah, I decided for some reason to do a purely black-and-white 'pencil' shade of the bots. Mostly to practice detail without leaning on fudging things with fancy color shading. So I spent ages on this, because it takes forever to make tiny crosshatch strokes on a Wacom Intuos Draw and not go insane.

It was fun though, I have to admit. I spent a few evenings between both, and it was cathartic.

Here's the other robo, more typical of my past work:

I made an attempt at making it seem like it was trudging through sand toward the screen, but perspectives like that are still something I'm working on.

It's also incomplete, because I set a cut-off of 'tonight' for this round of practice work.

I'm happy with the results though, since it was a fun process.

On the programming side, I have no idea what happened (Besides some work, had to fix a laptop or two).
I started out on Sunday with libtcod and C++, ended up with libtcod and Python by Tuesday, and for some reason I'm now tinkering with a completely unrelated bit of code in Java (Yes, Java, not JavaScript).

That completely unrelated piece of code (in Java) is a Pointless Print library I came up with today after having a random thought, and I want to port it to the languages I use on a relatively frequent basis.

See, sometimes when I'm programming and I'm debugging control flow, I'll dump a pointless print statement in a couple of loop scopes to see what's executing, more or less. Usually when I'm being lazy or determine that the problem isn't worth the breakpoints/profiling. Development-time sanity checks, basically.

So usually those print statements are pretty random. Like just a "Hmm..." or "Well fuck" to accentuate my frustration that something is firing off that I'm not expecting.

The "Pointless Printer" basically just formalizes this method. Observe:

// A JavaScript example
if(data == undefined) {
    pointless.print();
}
// Chooses a pointless message to print and prints it like this:
Something happened.
¯\_(ツ)_/¯
Hmm.
HMMMMM.
Well shit...
And so on.

Kinda pointless. Naturally, I advocate not being a Lazy Bastard™ and actually using breakpoints and the debugger your language of choice provides.
Which I've been forcing myself to do in any serious project... but I still get lazy in short test snippets I work on.

That's all for this week. Next week I'm going to return to my retro project, see what I can do with that.

Mega posted on February 24, 2017 at 9:28 PM

A little art, a little look back

So, I decided to do something that's actually pretty difficult: Write a focused blog.

I've had this tendency in the last couple of years to write these big monolithic blogs about anything and everything going on in my life.

The bigger the gap between blogs, the more I have to write about, the longer the blogs get stretched out, and readability goes out the window.

Here's an art blog.



I went digging back through my early blogs, and the second blog I ever posted on this site was an art blog.
The image I posted was this:

This is, I remember, one of the pieces I recall feeling proudest of at the time. I spent ages on it, over a span of a few days, using nothing but a cheap shitty mouse and GIMP.

It was also one of the few pieces I actually enjoyed working on, because I was doing it purely out of a sense of fun.

From there, a lot of what I created was just because I felt obligated to put something up on my DeviantArt page once in a while. Most of my focus moved to pixel art and away from the more complex pieces I was really wanting to work on.

Art for the sake of art, not art for some benefit or other.

These days, I'm drawing way more just because I feel like it. My technical excuse is that my doctor recommended I take up a hobby like art or music to relax with (I took up both).
I also feel way more confident in my initial setup work. Construction lines and scene composition, which I admit I'm still crap at, I'm getting better at working through.

(Some of the stuff I've done in the past couple of days)
Show

These are all 'scraps' from my practice sheets. I've started a habit of filling a sheet of paper and a canvas in SAI/Krita with doodles every day. Some of them I fill out a bit and 'finish', others I just leave. This is, I'm finding, the best way to get better at specific things faster.

A friend told me I can't draw people. I think I 100% without fail captured the look on his face over the next 2-3 minutes.

My family adopted a puppy a couple of months back. A Border-Collie crossed with a Ridgeback... he's 5 months old and already huge.
He's also an excellent reference, when the little bugger decides to sit still. My canines look better than my befuddled attempts from the past.

A quick 10-minute self-portrait from memory using the big mirror in the living room and a bit of imagination. Yes I have that much beard, I swear. Less hair on top though.
I also don't own a 64Digits shirt.
And yes, my primary monitor is suspended on that protrusion. It's actually the side-panel of an ancient steel computer case that I riveted into the top of this wobbly old homemade desk (Desk used to be a standup cabinet for a flat IBM Pentium around 20 years ago, my grandfather and I turned it on its side, gave it legs and basically extended its usable lifespan by those 20 years).

While drawing random 3D objects, this happened. I tried drawing the tent-flap, and a friend sitting next to me said it looked like a person. Couldn't unsee, so I made it so.

Of course that's not all, but it's most of the stuff anybody here will want to see anyway. :P

I used to draw almost every day of my life as a kid (Age Can-Grab-Crayon 'til 12), but that petered out when I started getting into programming.
Eventually it fizzled completely when I decided to "get into" game development, thinking that the game art I'd be doing was a completely different discipline.

I still kick myself for not getting back into drawing sooner.
I'm making up for it now, but I have at least 7 years worth of catchup to do (2010 was when I started getting into pixel-art, and really had no excuse to not get back into traditional drawing again).

Now I've got myself a table full of drawing supplies. Pencils, paper and clipboard. If anything sits still for five minutes, it gets drawn.
If I can ever be arsed to plug the Canon printer/scanner combo I have lying around here somewhere again, I'll scan some of the stuff I've done. Or I'll borrow somebodies phone that has a decent camera.

I'll end this here before I start rambling. This has already stretched on long enough.
TL;DR: Expect more art from me this year, and not just pixel art/'finished' pieces.