Sunday, January 25, 2009

Terrain Test: Part 2

I've been thinking about rivers lately. Namely, how do I generate them? My first pass is complete garbage. It's a start, however, and I have some ideas of where to go from here.
My current iteration picks random points in the terrain, places a water 'tile' there, then picks a random lower point adjacent and continues the river flow from there. There's some buffer that allows the river to go uphill a little in case of flat ground and bumps in the way. I also added a floodfill for lakes when the river has nowhere else to flow.



What I get is a jittery mess, followed by bodies of water that are either microscopic or end up filling the entire terrain.

What I'm looking for is something more like this.



Aside from fluviation indentations in the terrain that I'm going to eventually have to deal with, I think it might be useful to try a smoothed 'wander' sort of steering like implemented here: http://www.red3d.com/cwr/steer/Wander.html
The river will probably have a power setting on a per cell basis that will determine how it can overcome bumps in the terrain (smoothing them in the process) as well as dictate turn radius.

I'm still turning around some chicken/egg issues with this and other procedural features that I want to include, form following function or vice versa. Some algorithms involve rivers starting in bodies of water and creeping their way towards peaks, for instance, branching on their ascent. A lot of this will have to be looked at in terms of making the most interesting worlds possible as opposed to retaining ultimate simulational fidelity.

Labels: , ,

Thursday, January 22, 2009

Cog Part 2: Tilemap LOD prototype

Here's some brief footage of the first pass on an LOD based arbitrary scale tilemap engine. It only supports 4 zoom levels right now, since everything is being generated and stored in memory at once (resulting in a 2048x2048 tilemap, in addition to the lower size maps). Next step is making a file structure I can write/read as well as code to selectively load from that file based off of current LOD, position. Another thing I have to tackle is relative positioning and scale to keep the translation values from getting too large over the course of scaling up and down in the game.

After that I plan on making a tilemap editor that supports scaling up and down as well as loading images for tilemaps and getting something very basic in place to view in the zooming around app.




And I'm just now noticing how crappy the compression on the video is. Maybe I'll Vimeo or Youtube this later this evening.

Saturday, January 17, 2009

Terrain Test 1

While I've surfaced briefly, a quick blurb on another side project I've been chipping away at when given windows of opportunity. Can't really say a lot about it yet aside from the fact that it's going to involve procedural world creation. As such, here's an early prototype screenshot, showing random heightmap generation (roughly color coded) plus crude river and lake propagation.



I'm not even sure if the end result worlds are going to be as granular as this. One project I did back in college was a mix between designed and random worlds. I made a few hundred authored 'tiles', somewhat like the screens in Zelda. Each edge followed one of 8 templates, with the middles being fair game.


The tiles were then randomly drawn and assembled, Carcassonne style.



There is the potential in this project for multiplayer and world ownership, which might make designed elements like these look contrived and repetitive, as several people might have the "lake surrounded by 3 boulders" world tile.

More to come, perhaps with a proper project title.

Labels: , ,

Identity: Introduction

Here's a first draft design doc of something that came to me on the commute home tonight. I think I'll probably prototype this over a few lunches next week and see what develops.

Premise
We all have several different faces that we wear when interacting with people. Family, friends, spouses, co-workers, etc. This idea involves mechanics that allow the player to shift identities in the presence of different people through the metaphor of color. Analogous colors will work well together while complementary colors will clash. Each session will take only a few minutes, and at the end the player can see how many friends were made and how much integrity he retained.

Interface
My first thoughts are using 2d and a dual stick controller since I'll probably be mocking this up in XNA. Left stick moves while the right stick will change color. I think that mechanic is going to need instant fine tuned access, so an analogue stick would work well for this. The stick will access a radial menu around the character, perhaps requiring a button press for confirmation. I want to involve the triggers as well to set some sort of intensity or radius for the color being exhibited. It'll take some prototyping to work out.

Colors
As mentioned above, the player can change colors to represent a different personality facet he's exposing. I might include the triggers to slide the value up and down to sort of represent the introvert/extrovert continuum or chroma/purity of the facet being displayed. Closer to grey in this case means sort of wishy washy. You can play it safe and stay near grey, and everyone will sort of tolerate you, but you'll never make any true friends.

Staying close to someone with a similar color will raise their opinion of you. A high enough opinion might result in them following you around more, making it tricky to befriend people of opposite colors. If you're dragging along a deeply green friend and try to chat up the red guy, you'll either piss off the green friend by shifting to red, or go middle of the road and sort of bore them both. I'm not certain if I want to deal with interactions between the NPCs themselves.

Letters
The entire cast of characters should fit within an alphabet of letters. This allows them to be iconic and abstract, but still memorable. The player will easily be able to remember "I really pissed A off this time, while G became my best friend." Full names aren't abstract enough and edge in on a simulation threshold I don't want to cross. Unmarked shapes, however, won't allow the player to track progress as easily or project personalities and relationships into the 'NPCs'.

Each character will be a colored circle with a letter in the center. The color will represent the personality type you have to match. There will be some indicator as to the character's attitude towards the player. It might be represented in the letter on a monochrome white to black scale.

Gifts
Some letters will bear gifts like love and wealth. If the player wins them over through repeat interaction with a similar enough color, he will gain the gift from that character. Wealth accumulates in one large pile. Love could either be tallied by the number of characters that have given the gift, or it could be tracked on a per character basis as something that can be gained and lost. There may or may not be different ways these are obtained from a character.

Timeline
The timeline will direct the pace of the game. It simulates a lifetime of interacting with people. Events on the line will pass by (probably at the top of the screen, as different shapes on a line or something) and change the mix of NPCs on the screen. Big events (birthdays, funerals?) will have a larger variety of people, while everyday occurrences like school and work will offer the player repeat opportunities with the same smaller group of characters. Funerals and the ebbing of life might be a cool thing to look into as well, having letters fade away after a time, as long as it doesn't detract from the core message of the game.

Goal/Endgame
I don't think this is going to be a win/lose sort of experience. There will be trackable metrics that accumulate at the end. The player can amass love and wealth. The player will also have a color at the end that will vary in hue, chroma and value. Each of these axes will tell part of the story of how that player approached things. Once the player has checked it out a couple of times, he can set his own goals and see if he can achieve them, maybe learning a thing or two along the way about the mechanics, and by proxy his own approach to interfacing with human beings. That's a pretty lofty goal, however.

So that's the first pass. Some of the moment to moment stuff is a bit vague, but I think there are ingredients in there for an interesting experience. Posts to follow as prototyping commences.

Labels: , ,