PDA

View Full Version : 18: Hanging Gardens



Thaumaturge
04-04-2008, 06:26 PM
Competition entry version:

Hanging Gardens (http://gamedev.openhazel.co.za/filecloset/download.php?id=466)

Version that includes glew32.dll:

Hanging Gardens with glew32.dll (http://gamedev.openhazel.co.za/filecloset/download.php?id=469)

http://img363.imageshack.us/img363/8811/entryscreenshotvi1.th.png (http://img363.imageshack.us/my.php?image=entryscreenshotvi1.png)
http://img379.imageshack.us/img379/9572/closeupij9.th.png (http://img379.imageshack.us/my.php?image=closeupij9.png)http://img389.imageshack.us/img389/1060/terracefallhb7.th.png (http://img389.imageshack.us/my.php?image=terracefallhb7.png)

(The latter two screenshots are from a slightly older version than this, but I don't think that they show anything terribly inaccurate.)

~

Hanging Gardens, prototype 1 (http://gamedev.openhazel.co.za/filecloset/download.php?id=446) (Tile selection, height alteration and shadowing)

http://img511.imageshack.us/img511/1140/terrainhx0.th.png (http://img511.imageshack.us/my.php?image=terrainhx0.png)

~
Original post:
~

Okay, this idea is currently very much inchoate, but here is what I have thus far:

Hanging Gardens is a god-game, in which the player controls a world of their own construction. The player is presented first with an empty expanse, in which they can place tiles to construct their (flat) world. Once they have some terrain, they may place creatures and seed plants, which then go about their business, and with which the play can interact.

I would like to have water that seeks to level itself, and thus flows downhill (and have, I think, a good and simple idea of how to achieve that). One intended feature of such a system would be that water would flow off the edge of the world, and thus require either replenishing, or fencing-in. I would like to have living things rely on water, whether in the form of stable supplies or erratic dispensation on the part of the player.

As you can see, there's a lot that I don't yet know.

A few items:

If I use pre-defined tiles, I fear that the effect of the flowing water would be reduced. On the other hand, allowing the player to form the world more freely, while probably more fun, would probably call for more time than is likely to be available.
How do the creatures act and interact?
Perhaps most saliently, I don't yet know what objectives there might be, and what there might be for the player to discover. At the moment I fear that it's a little boring... :/


At the moment this idea could use a lot of work, I think, and so I intend to keep thinking about it. I'm not yet sold on this idea, and may drop it...

|-|1Pp13
04-04-2008, 06:35 PM
I thought about creating something similar a long time ago, keeping the water on the world would be the objective, with the more plants etc that can survive the higher the score, so the longer the waters there the more plants+animals there will be

obviously if a pant or animal is flooded by the water they lose part of their score, so there has to be a balance between keeping the water in and flowing compared to letting some of it out at strategic points

/my 2 cents

Thaumaturge
04-04-2008, 06:42 PM
Hmm... That's an interesting idea. Perhaps I should direct my thoughts more towards a puzzle game...

Thank you for your input, |-|1Pp13. ^_^

infinitely_blue
04-04-2008, 09:58 PM
Sounds good Thaumaturge! :) Look forward to seeing it :)

Fengol
04-04-2008, 10:42 PM
don't forget the point is to prototype, so while you let your idea noodle, work on the design given in the CuteGod page.

Thaumaturge
05-04-2008, 12:52 AM
Sounds good Thaumaturge! :) Look forward to seeing it :)

Thank you. ^_^


don't forget the point is to prototype, so while you let your idea noodle, work on the design given in the CuteGod page.

By "design", do you mean the graphics provided there?

If so, eh-heh, I'm actually wondering how much I can get away with not using - I think that I'd prefer to use my own for the most part. I know that doing so goes against at least part of the competition premise, but I'd much prefer to make and use some of my own...

If I see any in the packs provided that look particularly useful, I might use them, I suppose. ^^;

dislekcia
05-04-2008, 03:00 AM
It's free graphics man! Why on earth wouldn't you use them?

The mind boggles... Teach people to fish and they'd rather be farming :(

-D

Thaumaturge
05-04-2008, 03:22 AM
*laughs embarrassedly* Heheh, I know, I know - and I don't mean to be ungrateful. There are a few things that I am, perhaps, a little... ah, "funny" (read "probably irrational") about, and this seems to be one of them.

Similarly, when drawing, I don't like looking at proportion diagrams, although I'm happy to look at such things as photographs in order to learn those same proportions. (Please don't start on this one - I've already talked about this with an artist friend of mine. ^^;;; )

... *sigh* It might be something that I should work on someday.

I am sorry - I realise that it probably seems rather ungrateful. :/

Gazza_N
05-04-2008, 11:08 AM
Thaum, have you ever heard of a game called Wetrix (http://en.wikipedia.org/wiki/Wetrix)? It seems to have very similar mechanics to the ones you've described in the OP.

For what it's worth, I'm not using the provided graphics for my prototype either. In fact, I'm not using any real graphics for my prototype. :P

Thaumaturge
05-04-2008, 06:17 PM
Urk, you're right! (Although I do see significant distinction between the two.)

Well, water retention and evaporation will very likely not be goals in this game, then.

In fact, having given it further thought, I might well allow the player to place springs, allowing for eternal rimfalls, should the player so desire.

Other further thoughts:

On reflection, tiers are probably a good idea - they should add some nice visual variety at, I think, fairly low cost, and, should I manage to come up with a goal and some interesting gameplay, might contribute to those.
It occurred to me that it might be fun to combine the interaction mechanism of SpaceCute with this game.

instead of selecting any tile in which to create, destroy, raise or lower tiles, the player would "shoot" them from the outside in, in the same manner as in SpaceCute.
Tiles launched fast enough combine with the first tile that they hit, raising it, while tiles launched more slowly attach themselves to the edge of the landmass.
Tile types would be selected by the player for launching; this is not intended to be randomised, in a Tetrix/Wetrix-like manner.
This has the advantage of being odd, and encouraging forethought in the design of the terrain, since tiles that are enclosed become inaccessible for further raising; I would probably not allow terrain lowering in this case.
Various plant types should be growable, perhaps depending on water availability and soil type. Similarly, various plant types might contribute to or detract from the quality of the soil. With enough work, this could look quite nice, with shadowy forests and moss hanging down damp tier-sides.
When water should flow over a tier edge, a particle or particles could be created, allowing for simple waterfall effects. when a particle reaches a new tile, the amount of water "stored" within would be added to the tile at that point, adding water to its system.


One idea that I did have runs something along the lines of Black and White, seeing the player guiding, aiding, hindering or harming a group of sentient creatures (possibly humans). The primary departure would probably be in methods of interaction, and in a lightweight, branching, perhaps even procedural storyline that develops and changes depending on the player's actions and events within the "world". This, however, would not be very well suited to so short a project as this, I fear.

I'm still not sure whether I should include some form of in-tile height manipulation, for more varied environments... If so, are tiles really called for any more, for that matter?

Alas, while this sounds as though it could become pretty, it still rather lacks gameplay, I feel. :/

dislekcia
06-04-2008, 01:00 AM
*laughs embarrassedly* Heheh, I know, I know - and I don't mean to be ungrateful. There are a few things that I am, perhaps, a little... ah, "funny" (read "probably irrational") about, and this seems to be one of them.

Similarly, when drawing, I don't like looking at proportion diagrams, although I'm happy to look at such things as photographs in order to learn those same proportions. (Please don't start on this one - I've already talked about this with an artist friend of mine. ^^;;; )

... *sigh* It might be something that I should work on someday.

I am sorry - I realise that it probably seems rather ungrateful. :/

Not ungrateful, I didn't make the graphics ;)

I just see them as a way to reduce workload and make it easier to develop stuff... You may have noticed that that's kinda what I'm all about ;)

-D

Thaumaturge
06-04-2008, 07:53 PM
Not ungrateful, I didn't make the graphics

Heheh, fair enough, and thanks. ^^;


I just see them as a way to reduce workload and make it easier to develop stuff... You may have noticed that that's kinda what I'm all about

That's fair enough - and indeed, they could reduce the workload. Nevertheless, I think that I'll stick to my own graphics this time.

(To be honest, other issues aside, I find the SpaceCute and CuteGod graphics a little bit of a turn-off. ^^; )

~

In other news, I think that I have a gameplay concept, and would like feedback on it, please:

The game would essentially be an indirect strategy (perhaps strategy/puzzle) game. As in most strategy games, the player would be responsible for a group of entities (I haven't yet decided what they'll be, but I don't think that I feel like using humans in this case; it's a cosmetic choice in any case, for the most part), which would be threatened (or which might threaten) another group of entities.

The variation lies in this: instead of interacting with the player's entities directly, the player may only affect the landscape (and, one way or another, to some degree, the plants on it). For example, one might keep entities from harm by raising walls, or aid them by lower walls or offering the means to get over them.

Potential alterations would include altering water flow (which might allow for barriers, but which will primarily affect the plant life growing nearby - generating climbable vines, for example), raising and lowering land, and creating new land.

Finally, I intend to have tiles that are inherently dangerous to entities - specifically, "deep forest" tiles. These forests would be faerie-haunted, and the faerie would have a habit of abducting entities. Furthermore, they would draw entities to them, increasing their danger, but also causing them to be potentially useful traps for foes or direction-modifiers for either allies or foes.

I have two primary qualms:

Is the player too powerful? If so, how might I limit the player's power, without hamstringing him or her?
Would allowing the player to create new land provide too much power? I imagine that I shouldn't allow the player to destroy land, or at least, to destroy any land. I do like the idea of land previously created in order to aid the player being the cause of trouble later on...


If I allow the player to create land, I might have the enemy spawn on the land, rather than being pre-existing.

Thaumaturge
08-04-2008, 07:08 PM
Argh, I realised today that the above idea is very similar to Fengol's idea. >_<

My apologies, Fengol - I didn't realise that it was so close to your idea. ^^;

I don't yet know what to do about this, but I may well go back to the drawing board.

Fengol
08-04-2008, 07:24 PM
um... it's a god game... it's a genre which means all god games will have stuff in common. Continue with your game and you'll see how completely different our games are :)

Thaumaturge
08-04-2008, 11:37 PM
Heh, true, and thank you.

I still feel that the concepts are a little close for my liking, since they both hinge on manipulating the landscape in order to direct entities. :/

Thaumaturge
09-04-2008, 04:16 AM
Prototype 1 has been added to the first post.

This prototype demonstrates the current tile selection and height alteration and tile shadowing implementation.

Tiles all start as "non-existent" (internally identified as the height being zero or less, as I recall); an initial left click on an empty tile raises it out of nothing, and further left clicks raise it further, up to an arbitrary ceiling. Right clicks lower tiles, but will not lower them back into non-existence (intentionally).

Finally, I have implemented a simplistic shadowing system inspired by that in CuteGod; while far from perfect (I don't have shadows on walls at this point, for example), they nevertheless help, I think.

Press escape and select "yes" in the resulting dialogue to exit.

There's no actual gameplay thus far, I'm afraid. ;P

The game will hopefully start to look prettier once I start to add vegetation and, once I figure out how to control it, water.

Oh yes, there's currently a little z-fighting in the case of the tile selector. I'll probably fix that by simply changing the selector model a little.

Fengol
09-04-2008, 12:41 PM
I love it! What are you making this in, C++ and Irrlicht?

What about different tile selections?

FuzzYspo0N
09-04-2008, 01:20 PM
it cant be irrlicht there is no irrlicht dll (unless its statically linked but i dnt think so on filesize), it works nicely though thaum...

:)

|-|1Pp13
09-04-2008, 02:11 PM
only 1 gripe, the view

i raised the tiles infront too high and couldn't access the ones behind =/

Thaumaturge
09-04-2008, 05:21 PM
Thank you very much, all! ^_^


What are you making this in, C++ and Irrlicht?

C++, using OpenGL and the FOX GUI toolkit. ^_^


What about different tile selections?

Do you mean different tile types? If so, then that's certainly a possibility, although I intend to add at least some variation with the inclusion of water and vegetation.


i raised the tiles infront too high and couldn't access the ones behind =/

You should be able to solve this by either turning the camera around, or tilting it to look down from a higher angle.

(I'm sorry, I forgot to mention that the camera controls are laid out in the readme file that should, I think, be included in the download. ^^; )

Gazza_N
09-04-2008, 08:30 PM
Excellent! This is really cool! :)

Might I suggest, though, that you use the middle mouse button/scroll wheel for camera rotation and zooming, and pan the camera by moving the mouse to the edge of the screen? Perhaps I've been overly conditioned by other games, but the current control scheme feels a little "off".

Your call, of course. ;)

Thaumaturge
10-04-2008, 08:29 PM
Excellent! This is really cool!

Thank you very much, Gazza! ^_^


Might I suggest, though, that you use the middle mouse button/scroll wheel for camera rotation and zooming, and pan the camera by moving the mouse to the edge of the screen? Perhaps I've been overly conditioned by other games, but the current control scheme feels a little "off".


Well, I can always make the control system selectable. ^_^

In other news, I have a little problem at the moment.

I've implemented a small heightmap on top of each tile, which the player can alter by changing the interaction mode (via a button on the right of the screen) and dragging the mouse about the screen. This seems to work reasonably well, and I'm fairly happy with it.

The problem comes in water. Each tile has been given a "watermap" - essentially a heightmap indicating the water depth at that location - and I want to use this to render the water in the scene.

I've begun with a simplistic rendering system, involving calling a single-quad display list that I happen to have (one of my particle lists, specifically). Unfortunately, this is proving rather too slow, it seems, using my current numbers, at least.

(I currently have a 20x20 grid of tiles, each having a 7x7 heightmap and 7x7 watermap, giving 400 tiles and 19 600 watermap points.)

Does anyone have any suggestions?

I've considered rendering the water as a heightmap, creating a single (or set of 400) display list(s), but I imagine that the level of a given point in the watermap will change fairly frequently, calling for similarly frequent re-constructions of the display list.

From what I've gathered of them, this is starting to look like a job for a vertex buffer object. I haven't gotten around to learning their use previously (having been intending for a little while now to move on to either a graphics or game engine), but I'm not sure that there's another good way...

(PS: I may pull the watermap out of the tile class and essentially "lay it on top of" the tiles, in the world class. I don't expect this to impact the rendering of the water significantly, however, except in the opposition of 400 lists/arrays to 1 larger list/array.)

Thaumaturge
11-04-2008, 06:24 AM
Okay, I've decided to go with Vertex Buffer Objects in the end. Initial tests with one have been promising, and their use should hopefully solve my water-slowdown problem.

Thaumaturge
04-05-2008, 04:09 PM
The final version has been added to the first post.

Ugh, I'm not terribly happy with the result - it's pretty far from my original visions, and a rather lesser creation, I think.

In part this is probably as a result of the original idea being perhaps a little large for the timeframe, but I've also been unpleasantly short of sleep this month.

On the plus side, I find it interesting to note the variation in impact of an "off" month as the duration of the project varies: it seems to me that a project with a longer timeframe can better absorb a poor month than can a shorter project. Additionally, the water simulation led me to finally learn the use of vertex buffer objects, or the basics thereof, at least.

I will hopefully resume commenting on threads here a little later today.

I am reasonably happy with the water simulation, however, although it does tend to blow up to some degree under certain circumstances. This could probably be solved, at least in part, by the use of a fixed timestep, but the current version is slow enough as it is, I think, without running the water simulation more than once per update. :/ It took me longer than I like, given the duration of the competition, to produce a simulation that I felt acted as I wanted, and passed through a couple of different variations, including a few diffusion systems of my own, producing a variety of interesting artefacts.

Aside from that, for some time I had a mini-heightmap on top of each tile, which the user could raise an lower using a third interaction mode. I was fairly happy with the results (although they weren't perfect), but it seemed that checking heights per heightmap point for the water simulation became a little slow, as I recall.

Gazza, I'm afraid that I didn't get around to changing the camera mechanism - sorry. :/

On to a description of the final version of this entry:

You start out with a flat expanse of grassland (flat, green tiles), onto which two creatures fall.

Using the default interaction mode (indicated by a tile icon in the cursor), you can raise and lower tiles (although you should find hat tiles will not lower below their initial level) with left- and right- clicks respectively. By clicking on the water-drop icon on the right, the player can cause tiles to produce water via a "spring", or have them stop, again using the left- and right- mouse buttons respectively. (Note that a tile only has zero or one springs, and the spring is always roughly in the centre of the tile.)

The creatures wander about, and attempt to find food with which to sustain themselves (large green fruit that appear in "woodland" tiles - see below). If a creature gets too little food, it may starve and die in a little puff of smoke, a dangerously low "food level" being indicated by a trail of smoke.

Over time, creatures become capable of reproducing - indicated by a trail of hearts. In this case, if they are sufficiently well-fed, they will attempt to find a mate. If two creatures that are ready to reproduce draw close enough to each other in a single tile, are the only creatures in that tile, and there are no creatures in the four directly neighbouring tiles, then a single offspring should be produced, and the two "parents" should cease to be ready to reproduce, for a while, at least.

There are five types of tile: river, reeds, forest, woodland and grassland tiles. Roughly speaking, when a tile has more than a certain amount of water, it becomes a "river" tile. If a tile is sufficiently close to a river tile, and is at most about one tile-level above the river tile, it becomes a "reed" tile. Otherwise, if it's closer than a slightly larger amount, it becomes a "forest" tile. Otherwise, if it's closer than an again slightly larger amount, it becomes a "woodland" tile. Otherwise, it should be a "grassland" tile.

Note that creatures wandering into river tiles should die.

Aaand... that's more or less it, I think. I think that it's more of a toy than a game as it stands, I'm afraid.

edg3
04-05-2008, 07:32 PM
I downloaded the latest file you uploaded (the entry one) and it says im missing dll's. is there anything else that I need to run the game?

Thaumaturge
04-05-2008, 07:47 PM
That's odd - which dlls did it say were missing?

Higushi
06-05-2008, 01:56 PM
glew32.dll is not found.

Anyone know whats wrong?, and what should I download to fix this?

Looks like a sweet game so far, I really want to give it a shot.

edg3
06-05-2008, 02:46 PM
glew32.dll is not found.
Sorry for slow reply, but that is in fact the very dll :)

Thaumaturge
06-05-2008, 04:23 PM
Aah - I should perhaps have thought of that, although I thought that I had statically linked everything. ^^;

I've uploaded a new zip file that should include the appropriate .dll file; I'm leaving a link to the previous version in the first post since I don't know which one Dislekcia will want for judging (given that we're past the deadline, if I recall correctly).

The new version can be found here (http://gamedev.openhazel.co.za/filecloset/download.php?id=469).

If it doesn't work as-is, and no other files are mentioned, you can try moving glew32.dll to c:\glew\bin or c:\windows\system32, although I hope that this shouldn't be called for.

Please let me know if any other files are missing, and thank you for letting me know thus far! ^^;;

Higushi
06-05-2008, 10:19 PM
Bah!! I still get an error. :( Its one of those I could send off to microsoft.. My XP has been giving troubles lately so its prob that. I'm gonna have to sort that out soon.

Thaumaturge
06-05-2008, 10:33 PM
Oh dear, I'm sorry to hear it. :/

How far does it get, if I may ask? Do you see the loading screen at all?

This game aside, I do hope that you manage to sort out whatever trouble you're having with XP...

[edit] For that matter, if I may ask, what troubles are you having with XP?

Higushi
07-05-2008, 12:53 AM
I'm not sure exactly whats wrong, but I suspect it being something wrong with my wireless adapter and network setup (so I'm pretty clueless on why the game doesn't work), my task manager freezes (so I can't end task to anything) and then my internet buggers up and I'm forced to restart. Sometimes it happens within 10 minutes of restarting again... It can be so very frustrating... Know of any diagnostic tools to solve such problems?

I see the loading bar, it runs about 2/3 of the way and then it bombs.

Thaumaturge
07-05-2008, 01:21 AM
Wow, it sounds as though you have a serious problem with your network or internet setup (although it may well be something else, of course). :/

As to the game, I'm afraid that I was hasty in places, one of which was the loading bar - I added initialisation code towards the end of the initialisation function, but didn't get around to updating the loading bar (and may have removed some of that bar's increments, for that matter - I forget, I'm afraid ^^; ). The result (on my machine, at least) is the bar filling up to about the level that you indicate, followed by a pause, and then the start of the game.

So, given that it seems to die at that point, it seems likely that it's either one of the items introduced in that region of code, or something that's happening afterwards. At a guess, it might be the vertex buffer object creation for the water simulation, or perhaps the creation of a 1D texture - more probably the former, I think.

Perhaps your video card or drivers don't support vertex buffer objects, or require that they operate through extension calls?

That would make sense, actually, I think - if I recall correctly, not having the functions defined can lead to a call to a non-existent function, and a crash.

(I'm afraid that I didn't build in safeguards for such cases - my apologies. ^^; )

dislekcia
07-05-2008, 01:25 AM
Perhaps your video card or drivers don't support vertex buffer objects, or require that they operate through extension calls?

That would make sense, actually, I think - if I recall correctly, not having the functions defined can lead to a call to a non-existent function, and a crash.

(I'm afraid that I didn't build in safeguards for such cases - my apologies. ^^; )

Dat sounds like yer bunny.

-D

Thaumaturge
07-05-2008, 01:39 AM
Yup - I got sloppy this past month, I'm afraid (ugh - the code is a mess in places too, I think). >_<

I'm tempted to go back and quickly build in some checks for this sort of thing... I'm not sure that it's worth it for this project, however.

(And, to be honest, I'm kinda glad to have it at my back now and done with. On the plus side, it did get me to finally learn the use of vertex buffer objects, which will, I think, come in handy for a revision of the trail system in Planar Depths, which I want to get back to working on soon...)

Heh, if it's a bunny, I think that it's a Toxic Bunny (http://en.wikipedia.org/wiki/Toxic_Bunny). :P

Higushi
07-05-2008, 01:52 AM
I'm using a Radeon 9250 128MB graphics card. Came out about 3 years ago. Do you think it could be the card?

dislekcia
07-05-2008, 09:40 AM
I'm using a Radeon 9250 128MB graphics card. Came out about 3 years ago. Do you think it could be the card?

I think the card supports it, you just don't have the correct drivers to enable the GL extensions for it. See if you can update your drivers or maybe even look for an OpenGL update you can install.

I know laptop driver support is usually really crap. Try http://www.laptopvideo2go.com and http://www.omegadriver.com

-D

01DT!m3r
10-05-2008, 06:29 PM
Game works fine on my pc . I HAVE FALLEN IN LOVE WITH IT . I just cant get enough of it .

Thaumaturge
10-05-2008, 08:21 PM
Really? Wow, I'm really glad to hear it! ^_^