Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411275 Posts in 69323 Topics- by 58380 Members - Latest Member: bob1029

March 28, 2024, 07:48:57 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsChloe's Game
Pages: [1] 2
Print
Author Topic: Chloe's Game  (Read 8361 times)
negativeview
Level 0
***


View Profile
« on: October 15, 2011, 08:17:53 PM »

Chloe's Game is a game I've been working on on and off for a while. This first post will try to summarize current state of the game. The next post will go into the relatively large amounts of history. It will have many many pictures.

I'm currently describing the game as a First Person, Magic-based Real Time Strategy. The world is randomly generated, and there is a source of evil somewhere in the land. The evil slowly spreads. It is your job to find and eradicate all of the sources of evil and restore the world. Currently the world generation is working, and the first of the (hopefully fairly unique) "weapons" is mostly implemented. The result isn't exactly all that visually pleasing.



The lines in the water are a side-effect of a bug that is my top priority to fix. The lighting is off because it is currently broken due to the same bug. Look at the next post with all of the images for what it looked like before that bug.

The game play will have you manipulating the world in order to fortify locations (evil hates water, it slows evils progression) and fighting evil's minions from the edge of corruption all the way to their home base using combinations of simple magical elements, such as spawning water out of nothingness. There is currently a plan for five magical powers. Water is the only one that's mostly set in stone. Priority will be given to powers that are easy to chain together (Magica inspired).
Logged

negativeview
Level 0
***


View Profile
« Reply #1 on: October 15, 2011, 08:42:51 PM »

Chloe's Game was originally one component of an Alternate Reality Game. The name comes from the overarching plot that the game was supposed to fit into. The game has now taken a life of its own, and the name may change.

At first, I mocked it up in Love2d using a free tileset that I unfortunately have lost the source for (but they're well known, if anyone cares, I'm sure someone here knows where it came from). The elements of spreading evil are in, and you placed stars on the ground to kill the spread of evil. The game wasn't really fun, but it gave me hope that I could make it fun.



After deciding that I was serious about making this game, I contracted with an artist to do some concept work. I really liked the artist, and we made some progress, but eventually he got a real job (boo) and was unable to continue to work with me. This isn't the only piece of art he produced, but it shows off my favorite enemy. I'll have to make the enemy in 3d, but it is likely to still be in the game as one of the weaker enemies. The original game was only going to have three core enemies, and they were going to devolve from less to more evil. I'm now making more enemy types and changing their spawn rate depending on the evilness of the land.



I'm a programmer by trade. I've been programming for around 20 years at this point. I'm no slouch. But 3d stuff has always blown my mind for some reason. I had long since abandoned the ARG/video game, but I managed to get 3d somewhat working one day, and I've been hooked ever since. Immediately I thought about Chloe's Game and making it in 3d! Embedded below is my first working 3d shot. I had started making the heightmap generator thinking that it was going to be another 2d game, which is the only reason that my first 3d shot isn't some cube.



Originally the 2d array was supposed to represent the "evilness" of the land. After seeing it in 3d, I had to make it mountains, and I spent some time tweaking the algorithms to build better mountains. Then I decided that water would slow the spread of evil, and started working on algorithms for having water flow. I wanted it to rain on and off (and the falling water would slightly impede the evil), and for the water to pool (providing passable-with-difficulty barriers to the evil). It was later that I decided to make water a magically castable feature.

My early attempts at flowing water were... bad.



But they got better.



Then I figured out how to make the game first-person instead of floating perspective, and decided that my mountains did not look good. (Note: at this point the mountains were slow to generate and actually drew as they generated. It looked kinda cool, and helped me debug the generation algorithms, but was sloooow. The next screenshot is during generation, which is why it looks so different than the other post-generation shots.)



So I decided to go with 2d perlin noise instead. I may eventually switch to 3d, but 2d for now. I also figured out how to do actual textures (prior shots were colored vertexes, based solely on height/water level).



Now, that looks a LOT like minecraft. The previous shots looked more like normal terrain. I'm actually going for a hybrid style. The flaw I found with the first style is that it's impossible to have things like building walls. They would have to be wider at the base than at the top. No good. So I hit upon the idea of having some areas be "wild" and hilly. Others are "terraformed" and flat with man-made structures in it. The game will build some areas with one rendering style, some with the more minecrafty style. I also technically have a way to have non-cube things in the game. It's NOT voxel based. I unfortunately have not yet built any of the man-made structures, so... you can't see those here. What you can see is the first 3d shot of the hilly type terrain.



Then I switched it to be an "infinite" terrain. It's all sector based now where it can load in new sectors on demand. Unfortunately, something I did during that change broke my normal generation a bit. So the lighting got all screwy. And the water doesn't render right on sector edges. But this is what water looks like from the ground, after I changed it to be player generated and not a random occurance:



The pokey bit is where the water is being summoned. After the player lets go of the key, it'll settle down and flow like the rest of the water.

I turned off the normals completely because they were driving me crazy (entire portions of the map were near-black), and took another shot of the water after it settled more.



Todo (not in order):
* Fix the odd sector bug that's causing so many other bugs.
* Figure out a way to make the water casting not be overwhelming and also be able to create moats without taking 30 minutes to do it.
* Add in basic cube enemy.
* Give player ability to jump.
* Make water a particle instead of summoning 10 units in front of player.
* Make spraying water directly on an enemy hurt them a lot.
* Make an enemy in water take small amounts of damage.

Sorry for the HUGE initial post, but I wanted to provide this info for the curious. Future posts should be MUCH smaller as I'm not trying to explain literally years of history.
Logged

baconman
Level 10
*****


Design Guru


View Profile WWW
« Reply #2 on: October 16, 2011, 05:28:19 AM »

Initial 2D tileset looks notoriously OGA, but what's interesting is to see just how different your outcomes became as you changed your approach.

I kind of agree that your present build would probably work best, although the mountainous terrain looks the most "evil" (IE: least forgiving, and easiest to get shoehorned in); but it could use a little more in the way of the occasional valley in it. Something like that, combined with your current build scheme should give you the perfect playground.



Was this just there for illustrative purposes, or is this an actually generated world here? It's sooo OMFG random! lol A single desert tile next to deep sea at the far south, for instance (although I guess that could suffice as a "beach").
Logged

Pemanent
Level 4
****



View Profile
« Reply #3 on: October 16, 2011, 10:20:24 AM »

I really like the design idea with the stopping the flow of evilness and all. It reminds me a lot of Darwinia, which I really enjoyed.
You say your a programmer so I kinda assume your using a personal engine? If not what engine are you using and what language? I may have missed something so if you did already state that information then just slap me or something.
Your map generation looks great.
I am curious to see where this goes! Nice work!
Logged

negativeview
Level 0
***


View Profile
« Reply #4 on: October 16, 2011, 08:24:00 PM »

Day 2 (totally digging being able to reset my day numbers...)

Found the source of the problem with lines in water. Now there is a triangle chunk taken out of the north west corner of a sector. Same cause, just haven't tweaked the if condition to get rid of that edge case, too. Unfortunately the odd shading is NOT related as I expected. Putting that bug off for another day.

Didn't get NEARLY as much done today as I had hoped. The wife had to go to the hospital because of possible complications with the unborn baby. THANKFULLY everything was okay, but that killed most of the day. I expect more days like today, but I will still try to make at least a tiny bit of progress every day.

No screenshot because it wouldn't look much different. When I get the shading back I might try to make a movie of the water flowing. It actually looks quite nice.

I also started trying to tweak the perlin arguments to match the original 3d screenshot again. Does anyone know a good reference for what these arguments actually MEAN? Persistence and frequency, for instance, seem to do mostly the same thing, but their interactions are ... odd.

TODO (not in order):
* Fix the odd sector bug that's causing so many other bugs.
* Fix the NEW odd bug that's affecting the shading.
* Figure out a way to make the water casting not be overwhelming and also be able to create moats without taking 30 minutes to do it.
* Add in basic cube enemy.
* Give player ability to jump.
* Make water a particle instead of summoning 10 units in front of player.
* Make spraying water directly on an enemy hurt them a lot.
* Make an enemy in water take small amounts of damage.
* Make walking on uneven terrain actually feel like it's uneven.
* Experiment with town/mountain transition areas.

Initial 2D tileset looks notoriously OGA

I decided to look and find it. Here's where I got the original tile set: http://www.lostgarden.com/2007/05/dancs-miraculously-flexible-game.html

but what's interesting is to see just how different your outcomes became as you changed your approach.

Indeed. I hesitated posting here because of the possibility of it changing again. More and more things are sticking (spread of evil, water, etc.) but I'm still also changing things daily. There's quite a few things in my head I haven't written down because I expect them to change. I might post those on slow days if I don't have real progress to report.

I kind of agree that your present build would probably work best, although the mountainous terrain looks the most "evil" (IE: least forgiving, and easiest to get shoehorned in); but it could use a little more in the way of the occasional valley in it. Something like that, combined with your current build scheme should give you the perfect playground.

I had forgotten about this, but I was actually happy with the perlin arguments for the first screenshot. I made it less mountainy in order to get more valleys when I was wanting to put towns in valleys. I've tweaked my idea for how to make towns, so I could actually return to the old values. Now to remember/find what those were...

Was this just there for illustrative purposes, or is this an actually generated world here? It's sooo OMFG random! lol A single desert tile next to deep sea at the far south, for instance (although I guess that could suffice as a "beach").

It was a test game where evil spread from already evil tiles and I had to run around creating blockades and fighting less evil to get to more evil. The terrain was mostly just to provide some level of randomness. In that build you actually could not walk on the water/ice blocks, so each time would provide slightly different challenges in getting to the evil. The terrain was 100% random with no attempt at making things clump.

You say your a programmer so I kinda assume your using a personal engine? If not what engine are you using and what language?

Yup, I've fallen into the engine trap. It's in C++ using raw OpenGL calls to render.
Logged

negativeview
Level 0
***


View Profile
« Reply #5 on: October 17, 2011, 07:10:03 PM »

Day 3: Shading and Water

The shading is much better. The water is only slightly better. No video as promised, because I'm in the hospital waiting on the wife to be induced. In case you couldn't have guessed, progress will be slow the new few days...

Here's an image though of the new shading, and a mass of water. If you look carefully there's also a tiny waterfall (seen from the back).

Logged

starsrift
Level 10
*****


Apparently I am a ruiner of worlds. Ooops.


View Profile WWW
« Reply #6 on: October 17, 2011, 11:17:07 PM »

I like how your symbol for evil is uncannily similar to an Xbawx ring.
Logged

"Vigorous writing is concise." - William Strunk, Jr.
As is coding.

I take life with a grain of salt.
And a slice of lime, plus a shot of tequila.
The Monster King
Level 10
*****


FRKUC im ALWAYS ANGRY AAAAAAAAAAAAAAAAAAAAAAAAnerd


View Profile
« Reply #7 on: October 18, 2011, 12:02:53 AM »

your most evil guy looks like the projected character for my game. i find the coincidence amusing. its not exactly the most original of designs i guess hahaha

(its still cool (else i wouldnt use it))
Logged
negativeview
Level 0
***


View Profile
« Reply #8 on: October 19, 2011, 04:06:19 PM »

This is what I worked on the last few days.



(aka, not much game progress, but we're getting closer to having some time... maybe)
Logged

negativeview
Level 0
***


View Profile
« Reply #9 on: October 21, 2011, 07:09:12 AM »

Okay, so while in the hospital, I've been thinking of things and I have some problems to overcome soon.

I think that I've figured out cities. Cities will always be in the middle of water. This provides many things: it helps hide the seam between mountain and city, it provides players with a clue on where to find cities (cities will be lucrative from a "leveling up" standpoint), and it should look nice. In-universe it also makes sense, as cities built completely surrounded by water would be protected somewhat from the evil that is taking over the world. That part is settled.

Before I can plop cities in water, I need to have pre-generated water. I have been starting to play with that, but so far my efforts have been... bad. It either generates after the fact, or I run into stack busting code as the water flows into neighbor sectors, which has to gen, and then adds its own water, etc. etc. I'm looking for a simpler method, but I refuse to go with the simple "water line is at 64 height" method.

I am also playing with the idea of finite world. In fact, I'm leaning more than 50% of the way there. This game will have an end goal, and as such does suffer if you just go off exploring in the wrong direction. I have a method for letting the player know where the end goal is, but I still am not sure that I want to rely on it. Having a finite world may also help greatly with performance* and the pre-genned water.

Thoughts? I have been writing some code, but it's all problematic and breaking, so no screenies. We are going home today, so I will be at a real Internet connection and can probably make a youtube video of the water flowing if nothing else.

* Currently it generates sectors and the points in them when those sectors become visible. I have to use a very small sector size so that you don't get noticeable lag when moving across the world. Pre-genned world could push all that to make creation time, in theory. I'd love to have 100x100 sectors at least (probably 128x128 to use nice programmer numbers), but right now they're at 10x10.
Logged

negativeview
Level 0
***


View Profile
« Reply #10 on: October 22, 2011, 05:23:24 PM »

Actual Progress! I've been doing a lot of thinking and scheming while I've been unavoidably away from the computer. I've come up with a scheme for dealing with towns that seems workable, and have decided on a solution to my world gen problems: rings.

Think about the standard dungeon crawler. You have to deal with one level before you can go to the next, and it doesn't need to generate the next level until you enter it. I will be doing the same thing without the vertical component. You have to deal with a (totally made up numbers) 10x10 chunk before you can leave it and go to an area that's 20x20 with a 10x10 chunk out of the middle. At least, that's what I'm settling on right now, I might make it more linear and have a second 10x10 chunk next to the first 10x10 so that all of the chunks are roughly the same size.

I've also come to a conclusion with towns. The following screenshot isn't exactly my algorithm, but it's a proof of concept that roughly approximates my algorithm. Next I have to actually make the transition beween generation algorithms and start seeing if L-systems are actually good/easy enough for my plans for towns...



Yellow = potential town area
Logged

negativeview
Level 0
***


View Profile
« Reply #11 on: October 26, 2011, 04:31:11 PM »

Starting to try to implement LOD. Figuring out the best way to do that. As a helper, I can now toggle the LOD (high and low, once I get the basics down, I will probably be able to whip up multiple levels without in depth debugging), and can toggle wireframe mode, which makes it much easier to tell what's going on. Not even remotely happy with the current state, but am getting there.

I'm hovering between two implementations. One is super simple, the other will probably work better.

1) For half detail, literally only sample the underlying structure half as often. So, only go to the even vertexes. Then for the next level down, it'd be every four. This is the stupidest thing that might work (big proponent of that method). It's also the thing that's actually partially implemented (you can see it below).

2) Try to reduce the vertexes that add no info. For instance, all the non-edge vertexes for flat areas. This is trickier, but you can literally go lossless. If I go to this method, I'll probably make a lossless pass even for the highest level of detail and I can be smarter about which vertexes I can cut while losing the least amount of info. In the screenshots below you can see areas I've color coded for potential lossless removals. The other negative of this is that I'm currently using a single IBO for all sectors. If I start intelligently setting up the VBOs, I will need potentially a different IBO for every single sector. This may not impact me all that much, but I want to hesitate if I can come up with a simpler method.

Note, when you go into low detail mode, the borders aren't drawn yet, so there are gaps.





Oh, I can also fly. It currently doesn't intelligently draw based on viewing angle, so I may do that soon too so that you can see further in the distance in these screenshots.
Logged

negativeview
Level 0
***


View Profile
« Reply #12 on: November 07, 2011, 06:58:04 AM »

Okay, time for a mini non-post-postmortem. This game is NOT dead, I'm just using that word to describe detailing what has gone wrong so far.

This is my first OpenGL project. I was using SDL because it was the first thing I could get working. I regret that. I structured the program in the way that made the most sense for the bit I was building (world gen) and it sucks for what I want to do next (enemies, towns, AI, skydome, etc.).

I'm seriously considering treating what I have now as a "tech demo" and purposefully going tech demo on the other pieces as well. The learning experience part was great. That'll carry over into the real game. BUT I need to learn what it means to do the other major parts of the game and then create a base that supports all of those parts.
Logged

negativeview
Level 0
***


View Profile
« Reply #13 on: November 08, 2011, 06:41:09 AM »

Done:
  • SFML integrated.
  • Can put text on the screen, yay!
  • Started Bullet Physics integration, got about 25% of the core.
  • Started building more creatures in the excellent Scultris. Nothing good enough to show yet.

Next:
  • Figure out rotation with Bullet Physics.
  • Build more creatures.
  • Figure out how to animate creatures that start in Sculptris, probably with an import into Blender first.
  • Spend some time really figuring out lighting, not just half-assing it. Specifically, shadows and dynamic lighting.
Logged

negativeview
Level 0
***


View Profile
« Reply #14 on: November 08, 2011, 09:09:07 PM »

Done:
  • Finished integrating the core of Bullet. I know feel like I kinda know what I'm doing, and that I kinda know how to integrate it into the real thing.
  • Started trying to create levels in Sculptris. I'm scrapping the random gen part for the most part. The greater world is likely to be randomly generated once, and manually edited to put all the quest locations into it. At least that's my current thinking.

Next:
Probably lighting. That seems like the next big thing that I almost understand how to do. Almost.
Logged

negativeview
Level 0
***


View Profile
« Reply #15 on: November 09, 2011, 04:09:47 PM »



Currently REALLY rough build of the initial city. The idea is that in the foreground is a large ramp. The city will be on a small peninsula (water hurts the enemy, so the only human civilizations that have lasted have been hastily created ones on places mostly/completely surrounded by water) and the ramp goes to a drawbridge to high ground over the water.

The other side is a large wall that is used as a lookout. The humans never cross over that wall, they use the ramp. I am going round and round thinking about the interior of the base, and the parts I know still need to be heavily tweaked. I am NOT an artist (part of the reason I was going random gen before), but I think that I can make something acceptable with large amounts of time.
Logged

negativeview
Level 0
***


View Profile
« Reply #16 on: November 10, 2011, 08:12:23 PM »

Finally learned at least the basics of GLSL and shading. I'm irrationally proud of the following image. I went back and edited the first "proof of concept" to have something interesting to shade. Cubes bouncing around just weren't doing it for me.

Logged

JackMenhorn
Level 2
**


Sound Designer


View Profile WWW
« Reply #17 on: November 11, 2011, 04:59:57 AM »

That is a pretty cool image.
Logged

Sound Designer<br />www.jackmenhorn.com

Nova-111 OST: https://jackmenhorn.bandcamp.com/album/nova-111
negativeview
Level 0
***


View Profile
« Reply #18 on: November 11, 2011, 03:26:22 PM »

I think the next thing to work on this weekend is:

1) Integrate the two tech demos into one slightly more designed code base. This will allow me to have FPS/physics + terrain.
2) Fix water up a bit. I have some ideas on how to make it work better with less custom code, but it requires having physics + terrain.
3) Get a shader for the water. Water used to be the coolest thing I had, but now with the fog actually working I dunno if that's true anymore.



That's the current state. The water just flowed down that large hill to the left. You can see some tiny water pools clinging to the bumpy hillside. The water isn't technically done flowing, but it's close enough. I'm hoping that the new code will reduce the tiny pools and make flowing more performant + more predictable (the water flow isn't at a constant rate right now. I've tried to fix that problem, and it's slight enough most people probably won't notice, but it bothers me.).
Logged

negativeview
Level 0
***


View Profile
« Reply #19 on: November 16, 2011, 07:26:13 AM »

Progress is slow, but still existent. That's what you get when you go the tech demo route at first.

The good news is that I'm starting to pull things together into a single code base. The bad news is that I'm being extra paranoid about the structure of the code (that was the entire point of the tech demo route, remember?) AND I also had an annoying amount of trouble getting the perlin stuff working. Well, to be fair, that's still not 100% working.

I wanted to have more control over pre-shaping the noise than a pre-built Perlin implementation wanted to give me. I'm also looking at evaluating a 3d+2d hybrid for perlin noise that has the potential to look awesome. Both of those heavily suggested that I write my own perlin with an extra amount of control in various points. I had a lot of very very stupid bugs in there that I am annoyed at myself for letting stay so long, but it's mostly working now.

The current considered-official code base consists of the following:
1) Game Modes. Right now these are menu and world. The important thing is that the structure supports switching between modes, where the core handles as much as it can, but hands off quite a lot to individual modes.
2) Main Menu. This is still very hackish. There's one main menu whose main job is to remind me of the menu options I want. One of the menus goes to a bogus submenu so I could figure out how to do that. Exit exits. New game goes to the game mode. There's no saving currently implemented, so continue does nothing.
3) Game mode generates a single block of land. I can change the size of the land (I am currently unsure what size blocks I will use in the final version). I can press enter to regenerate back at detail level 1 (what it starts on). I can press space to add another level of detail until I hit the maximum.

Next potential destinations:
1) Real shadowing of the generated land.
2) Making land generation generate more than one block.
3) Land simplification, as a precursor to LOD.
4) Material functions to determine what's rock, what's dirt, etc.
5) Add physics in so as to test my idea for physics-based water and see if it works (this is unlikely, as I will want more land to play with, so #2 is likely a required precursor).
6) Add mouse support to the menus to learn how I want to properly handle that and so I'm not accused of "consolifying" things.



Logged

Pages: [1] 2
Print
Jump to:  

Theme orange-lt created by panic