Eden : terraformer [update - ecoregion design]

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

Ok, so it's basic algorithmics then, you'd face that in all languages :wink: Just describe your algo or post some code, I guess we could help.
ultramedia
Posts: 175
Joined: Wed Dec 20, 2006 12:04 pm

Post by ultramedia »

Its ok, I'm going to throw another bunch of hours at it this weekend (I don't like admitting defeat - or is that, I'm a sucker for punishment?)

The huge increase in bugginess when I went from the debug version to the release version knocked the wind out of me for a bit over this week, but I actually figured out how to clean up the bugginess substantially (I was writing past the end of dynamic arrays) and now that I've seen it's not an invisible unbeatable monstor I'm ready to go back for another pummelling. :twisted:
lostclimategames
Posts: 331
Joined: Sat Sep 02, 2006 4:11 am
Location: Michigan
Contact:

Post by lostclimategames »

"or is that, I'm a sucker for punishment"

you have to be to be in game programming *sips on coffee on his 39th hour straight of no sleep* :D
___________________________
For all of your 3D/2D resource needs:
Image
ultramedia
Posts: 175
Joined: Wed Dec 20, 2006 12:04 pm

Post by ultramedia »

Well. I'm stumped. I've spent a couple of hours trying to see what I'm doing wrong, but I just can't find it. Normally I don't like asking other people to help cleaning up my messes, but I'm just stuck stuck stuck.

Anyways, here is my zipped MSVC++ 2008 project folder :
http://www.ultramedia.com.au/irrlicht/t ... 080530.zip

I believe the dodgy calcs lay between 288..305 of main.cpp in the bit that sets the height of the vertices based on the heightmap. As far as I know, everything else is actually working fine. I have arranged for a text node to show the scale (X & Z) of one tile from each octave.

(rClick n drag for orbit, wheel to zoom, wasd to move).

If you can see what I'm doing wrong, I'll arrange for large crop circles in the plains accusing you of being a hero.
ultramedia
Posts: 175
Joined: Wed Dec 20, 2006 12:04 pm

Post by ultramedia »

Hey everyone,

Just thought I'd say, I've been looking through c++ code written by other people to learn about proper application structure, and I'm rewriting this project from the ground up to make it more friendly to develop and debug. (So if you were looking at it trying to see what was wrong, don't worry about it, I'm going to make a fresh start).
ultramedia
Posts: 175
Joined: Wed Dec 20, 2006 12:04 pm

Post by ultramedia »

Hey everyone,

After a couple of days (weeks?) of misery learning more about c++ I've been able to get my terrain code up and running again AND fix the stupid bugs I had in it that were causing some tiles to take their height data from the wrong part of the height map.

There is an updated executable here:
http://www.ultramedia.com.au/irrlicht/e ... 131600.zip

and the source is here:
http://www.ultramedia.com.au/irrlicht/e ... 132600.zip

The executable is for windows xp - remember you have to have the c++ redistributable stuff installed - the keys are still wasd to move, mouse wheel to zoom and right click drag to orbit.
ultramedia
Posts: 175
Joined: Wed Dec 20, 2006 12:04 pm

Post by ultramedia »

Yeeha! Another update, from the start I've had nasty problems with terrain tiles flickering. While I still don't really understand what was causing it (apparently some 'vsync' problems with directx on nvidia cards) I was able to figure out that it was a directx problem, and therefore promptly change the hardcoded (sorry) driver to opengl then voila flickering problem solved. VERY happy :)

So for this update, I've turned off wireframe and turned on opengl:

http://www.ultramedia.com.au/irrlicht/e ... 201100.zip

This executable is probably what I would consider the first stable working proof of the system, next job on the list is geomorphing - to get rid of those cracks you can see between the different resolution rings of tiles.
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Hi, Ultramedia. It seem to work. But you could set the distance a little longer before LOD the terrain (I understand it's ok now for testing)
ultramedia
Posts: 175
Joined: Wed Dec 20, 2006 12:04 pm

Post by ultramedia »

hey christianclavet,

There are settings in config.h : tNode_cellWidth, tNode_cellsPerEdge
'Cell' is my jargon for the quads that make up the terrain nodes.

Also, I've got the whole thing working 99% in a resizable wxWidgets app (which I'm very excited about). This will allow me to build a world editor with the engine as I go using all the nice wxWidgets UI controls (especially the tree control for a scenegraph).
christianclavet
Posts: 1638
Joined: Mon Apr 30, 2007 3:24 am
Location: Montreal, CANADA
Contact:

Post by christianclavet »

Wow! I'm happy for you. Right now, with the school, I really have much time to delve into programming again. My editor is the same as 3 month ago.

Congrats on your progress on this!
ultramedia
Posts: 175
Joined: Wed Dec 20, 2006 12:04 pm

Post by ultramedia »

ta, unfortunately, it's not all roses yet - wxWidgets is still putting up a brave fight.

Basically, in wxWidgets, you make a wxApp object, then inside that you make a wxFrame object. It's in the wxFrame object that you instantiate the IrrlichtDevice, but when I add my own classes to wxFrame they can't access the IrrlichtDriver (for some operations) properly. I'm going to do a proper thread asking for help with this at lunch today...

I guess I'll get it soon enough. If I don't I guess I'll have to fall back on the IGUI stuff, but that'd be a pain because I need a tree control...
ultramedia
Posts: 175
Joined: Wed Dec 20, 2006 12:04 pm

Post by ultramedia »

yeeeEEha :)

eden running in wxwidgets. Ok, keyboard and mouse need some cleaning up, but its rrrrrrrrunnin baby....

1:13 am here, gotta go unconcious for a couple of hours - I'll post a youtube tomorrow night (and maybe an executable?)

Also, the codes a lot classier (pardon the pun) thanks to some help from hybridOL, two thumbs up dude, you rock :)
ultramedia
Posts: 175
Joined: Wed Dec 20, 2006 12:04 pm

Post by ultramedia »

Mwoo har har har har...

NEW EXECUTABLE!!!

Same functionality as previous release but now working inside a resizable wxWidgets window. Just a simple file>exit menu at the moment, but now that it's going in wxwidgets, I can use all the nice fancy UI controls they have to build an editor alongside my engine.

http://www.ultramedia.com.au/irrlicht/e ... 000200.zip [2MB]

It's early in the morning again here, so it's time for me to force myself to sleep, but if this runs ok on other peoples (winXP) machines, I'll post the source tomorrow night. (I think this will be more interesting to people as it shows how I'm integrating irrlicht into wxwidgets, including how to do a resizable app and handling mouse and keyboard events).
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Here's the screenie...

Image
Image
ultramedia
Posts: 175
Joined: Wed Dec 20, 2006 12:04 pm

Post by ultramedia »

w,a,s,d to move
mouse wheel to zoom
right click and drag to orbit

I guess I should put some static text in the corner saying this...
Post Reply