Exile - In depth

Posted by Astryl on June 11, 2012, 1:56 a.m.

I was getting bored merely posting updates to my videos/screenshots of progress, so here, have an in-depth blog about the design and features I have already. :3

First, a screenshot with the new renderer:

Looks the same at first glance, but it now has lighting along with shadows. Both are faked, but so long as the effect is controllable, predictable, and good-looking, I'm happy with it.

I managed to bump down the CPU usage by 90% or so, by adding in some early-out conditionals, a simple occlusion test and a new piece of code to render the walls and floors.

Well, time to go on a feature trip.

Fake Shadows and Lighting

Note, fake. No stencil-buffer in sight here, nor shaders. The way this works is simple, and effective. Each sector (A grid-based location in this game) has an RGB set associated with it that starts off at 50% illumination.

In TileStudio, using MapCodes, I can put down a 0x46 (Shadow) or 0x47 (Light). These are spread by the level loader over a region, and slowly faded. I blend them with the tile color. Light results in a higher overall blend, Shadows in a lower one. Result: Cheap and effective fake lighting system.

I also use a single diffuse spot that provides some basic ambient light.

Why didn't you use shaders/the stencil buffer?

Two reasons. One is the visual style I'm going for, which is something akin to the earlier iD software games (DOOM, QUAKE), albeit constrained to a grid.

Reason two is that my current framework won't take to the stencil buffer too well, nor the GLSL extensions. :P

Cheap Occlusion

Once again, my framework has proven to be a problem in this area; notably the fact that I'm not able to integrate vector math too easily. So I opted for the quick method out. I'm using the patch-selection method I used in Arbiter, Arceus and SFTTD, which uses the player coordinates as a lookup in an array and renders a rectangle of about 20 blocks in radius.

I use some well-placed fog and some planes surrounding the level to make it all look alright.

One good thing about this method is that I am guaranteed a constant level rendering time.

Another good thing is that I can literally load a level of any size I want with no impact (Besides memory usage).

Variable height, but no jumping

Yes, that's right, no jumping. Not real jumping, anyway. I'll get to that in a minute.

The levels I'm creating are all designed in TileStudio. As some of you doubtless know, TileStudio is a 2D level editor. I'm using mapcodes to elevate blocks using an offset. 32 is standard, anything up to 64 is raised, anything below 32 is lowered. Archaic, but it works. And that's all that matters.

OK, so why no jumping?

Let's just say that it's on my list of things to consider doing sometime soon. The player has a Y coordinate, and a Base Offset coordinate, as well as a Jump Offset coordinate. The final position of the player is basically Y+Base+Jump. Then that's where I need to dance the tango with the collision detection system I have at the moment, for raised platforms. I'm definitely doing this at some point, but for now, no jumping.

Entity Editor [Not yet done]

I found out not too long ago that if I wanted to have levels of variable height, and lights, along with the usual things one adds to a game, without it all being randomly generated, I would have to create a secondary data file for the level being loaded.

This is essentially a binary file that will dictate where to place entities (Each one determined by an ID, and given an X and Y position. The height is determined on load).

I'm also going to switch the lighting and shadow codes to be handled by this file, allowing me to define either points (As I have been doing) or entire rectangles (Far more useful).

I have lots of ideas for entities, and they don't only include enemies. Effects (Like the old Build Sector Effectors) are a definite possibility too, for flickering sectors, raising/lowering platforms, doors, etc. :3

The World [Design ramble]

So, I've been thinking about what the world is going to be like. And I came up with a conclusive idea. I'm not going to go for a Daggerfall style of gameplay. Instead, I'm going to be going for a more action-orientated style, with RPG elements of course (Magic, Skills, Levels. Perhaps an NPC or ten).

The world itself is going to be a dark medieval (Dark Dark Ages :P) where some evil group of wizards/warlocks/whatever (Still vague on this) have taken over the world (le usual story). The technology of the era is going to be somewhat limited at first, until you start discovering areas that are powered or affected by Magic.

As for the physical layout, I'm planning on a large/medium sized 'overworld' from whence you set forth to the multitude of 'dungeon' levels. I might make a few smaller dungeons that you can play as a challenge for a reward, but I'll have to see what happens. :P

Currently, I am actually able to start creating the world, and it won't be flat and uninteresting; but as per usual, I'm kinda having fun with the actual engine at the moment.

OK, enough about my game…

Hey look, it's a section about Minecraft. I'll just hide this here

I've mentioned it occasionally, but I often run a Minecraft LAN server for my friends… And I've been doing so for nearly three months now, with a single persistent world. Of course, with only a handful of people at best, not much gets done, but it's fun (Especially for me, with Punishmental :P).

Anyway, the game on my server has been an interesting one so far. It started with this:

Humble beginnings of Castle Mega

If that looks weird, it's because I was using shaders. :3

Anyway, after some time, my poor subjects, after being subjected to many a Flash Freeze, Solar Flare and Instant Hippie Hut on the Roof ™, waged a shortlived war, and eventually a truce was called…

So time went on. There's only one person really who plays on the server these days, and that's a friend of my brother's. He brings a crlaptop around and fights tirelessly against Admin Wrought Trolling (I can't help it. They dare me :3).

Anyway, here's a chronology, or brief history of recent developments.

Last week, I had just finished a tower to the sky town I started building (Also a Runecraft warp hub). After being invaded time and time again (And the other guy bugging me with those annoying villagers), I decided that my castle wasn't Mega enough.

Keep that last little screenshot in mind.

A house that has fallen under Darkness…

The darkness the house fell under

Ooh, I wonder who could possibly live here?

Go left to break conformity.

Ah, that's not so…

… bad… Oh shi-

Mega's throne-room. Stand in the center and be unceremoniously flushed into a dark sewer.

Warps hidden everywhere. Can you find them?

If not, you have a long climb ahead of you… (Current record: 4 minutes by myself. The rest jumped out the windows halfway up)

Yup. Long way up.

OK, no so much a history as a 'lol look what I built'. And I actually built most of that without using creative mode. Until I got sick of the Mine->Build->Fall->Repeat cycle. About 80% of the castle is hand-built by myself. Yes, I have a lot of free time.

Oh well, can't wait to see the looks on the faces of anybody visiting for a Minecraft game this week. Especially when they get flushed down my elaborate piston trap.

OK, Minecraft done with.

Anyway, a quick life-update. I'm currently being considered for a job. And by that I mean that I was contacted by a company that I applied to last year, that passed me over back then.

So, not a big deal, right? Wrong.

The job is as a Junior C++ programmer, creating programs to analyze large sets of data and display results in graph format (Which sounds boring, but clients include the Government and other big-wigs. Also, it's the domain of 'systems' programming (Creating stable systems to process data), which is something that I love doing).

Oh, and the starting salary is around $1500 a month. I'm just waiting for them to contact me again to arrange an interview.

Either way, this opened my eyes to one thing: I'm being considered a legit C++ programmer, not because of any degree (Because I don't have one), but because of my independant work, which proves itself.

So even if I can't get this job, I'll feel much less nervous about approaching other companies.

In the style of our glorious Number #1+1 member, who also happens to be our administrator, have a video. A music video. Now discuss stuff.

This song is epic, and even more so if you're a Megaman fan. Why? Megaman's brother Protoman. Band named Protomen. Go figure. Paints an interesting alternate portrait of the Megaman universe.

Yes, I still appear to be a Megaman nut.

Get with it.

Go play moar Megaman games and join the Capcom bashing.

Comments

Haizen 12 years, 3 months ago

I've always been fascinated by 3D projects, never really tried making one 2D's more my thing. And good luck sir with that job consideration I hope you get it. $1500 a month isn't bad, thought I hope you aren't talking Salary?

Astryl 12 years, 3 months ago

Believe me, $1500 a month where I'm living (South Africa) is more than sufficient, in fact, it's uncommonly large for a starting position's salary (And by salary I mean monthly renumeration).

Cesque 12 years, 3 months ago

Quote:
So, I've been thinking about what the world is going to be like. And I came up with a conclusive idea. I'm not going to go for a Daggerfall style of gameplay. Instead, I'm going to be going for a more action-orientated style, with RPG elements of course (Magic, Skills, Levels. Perhaps an NPC or ten).

The world itself is going to be a dark medieval (Dark Dark Ages :P) where some evil group of wizards/warlocks/whatever (Still vague on this) have taken over the world (le usual story). The technology of the era is going to be somewhat limited at first, until you start discovering areas that are powered or affected by Magic.

As for the physical layout, I'm planning on a large/medium sized 'overworld' from whence you set forth to the multitude of 'dungeon' levels. I might make a few smaller dungeons that you can play as a challenge for a reward, but I'll have to see what happens. :P

Sounds a lot like Hexen. Another good inspiration!

And fake shadows are the best shadows.

Astryl 12 years, 3 months ago

Quote:
Sounds a lot like Hexen. Another good inspiration!

And fake shadows are the best shadows.

Next up: Per sector illumination and flickering lights. :P

Yeah. Hexen is a major inspiration; I've been playing it quite a bit.