Project "Round Based Strategy"

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
knightoflight
Posts: 199
Joined: Sun Aug 24, 2003 5:47 pm
Location: Germany

Post by knightoflight »

Hi Endar,
if you look to rfHillterrain.h:
...
constructs a blank terrain.
note that every cell in the heightmap is
a float (usually 4 bytes) and there are
iHeightmapSize * iHeightmapSize cells in the heightmap,
so a terrain can eat a lot of memory quickly.
...
you get the height of a cell with
...
float GetCell( int x, int y );
// determines the height of the map at the given cell.
//
// arguments:
// x, y: the position of the cell.
// range: 0 to heightmap size - 1
//
// returns:
// the value of the heightmap at that cell.
Endar
Posts: 145
Joined: Mon Jun 14, 2004 7:59 am

Post by Endar »

I understand that, I don't think I was being clear enough in my question. :D

How can I use the random gen info to render a terrain in irrlicht? Can you just dump all the info into a file and use 'createImageFromFile'? If so, how do I set out the file so irrlicht can understand it? If not, can you give me pointers (or a complete tutorial :D:D) on how to do this?
"The reputation of a thousand years may be determined by the conduct of one hour."
-Japanese Proverb
Captain_Kill
Posts: 124
Joined: Sun Jun 27, 2004 11:02 am
Contact:

Post by Captain_Kill »

I think what you have to do is pass all those values the system generates to Irrlicht and use something like Irrlicht's drawIndexedTriangleList to render it. Look in irr::video::IVideoDriver for those methods.

You don't have to make a heightmap. Infact, it would be a waste of resources to do so because it's easier just to render it all straight away.
eg.
* Make terrain values
* Store them in an array or something
* Render the array each cycle
This is how most random map systems work as it's way more efficient that making a heightmap at runtime! If you need more help just look at the Custom Scene Node tutorial. It shows how to use those methods.
2.8GHz P4 with HT - 512MB DDR - ATI Radeon 9600XT 256MB - Windows XP - VC++ 6 and VC++ 2003

Dark Reign 3 Home Page: http://darkreign3.notwhatyouthink.org/
Dark Reign 3 Forums: http://notwhatyouthink.org/darkreign3bb/
Guest

Post by Guest »

Hi Endar,
there are thousand and more possibilities, what you program with irrlicht. What you do with a painted heightmap or with a generated like from RobotFrog depends on what you want to do.

You want a total realistic looking terrain ? And it should be quick to fly above ? You should search for terrain-algorithms with search-engine in internet or start for example at http://www.vterrain.org
and you build your own CustomSceneNode (look tutorial).

Or you use a irrlicht-node for each terrain-tile (for example saigumi wrote a tutorial, search in irrlicht-forum).

For example, i want to make strategy and i want not total realistic look, i want that the user sees the tiles where the the units move and something is built and so on. Like i wrote before, i only use the standard-irrlicht-command "addTerrainMesh" and the interface between the heightmap and the terrain is:
...
buffer = world1.terra->getMesh(0)->getMeshBuffer(0);
video::S3DVertex* v = (video::S3DVertex*)buffer->getVertices();
for ( int i = 0; i<viewsizex; i++){
for ( int j = 0; j<viewsizez; j++){
v[i+j*viewsizez].Pos.Y= heightfromheighmap or from robotfroggen;
}
}
...
knightoflight
Posts: 199
Joined: Sun Aug 24, 2003 5:47 pm
Location: Germany

Post by knightoflight »

oops again, i forgot to login. The guest was from me ;-)
Guest

Post by Guest »

Hi community,
made some new little snapshots so you can see, that its not dead.
First pic: The beginning in an unexplored world in the hometown.
Second pic: View in the town of Shadowcastle
Third pic: The normal worldview now with fog, stencil shadown and the first unit (instead of a swordman for example my snowman ;-)
I feel like i've broken a wall. Now i know how i want the GUI-System - theres thousands of possibillities, i choosen a look close to Age of Empires (but only the look, not that you have to find the right house with the mouse to build something, i dont like that...). And the view for the town is going to look right. Still the project is without a name, depends on where it will go (more fantasy or more middleage...). I thought about going in the direction of MoM (11 years ago, many project tried to do such a game and there are rumours maybe Stardock will build MoM2 ?)
I dont know - im on the way to the goal but from here cant see it.
http://zenprogramming.tripod.com
knightoflight
Posts: 199
Joined: Sun Aug 24, 2003 5:47 pm
Location: Germany

Post by knightoflight »

...once again forgot to login (im knocking at my head: "hello is there someone at home, McKnight ?") ;-)
Oz
Posts: 81
Joined: Tue Aug 31, 2004 3:34 pm

Im green with envy

Post by Oz »

Im glad to see your terrain stuff put to good use, there in those screenies :)

I had a thought about building selection, if im right you dont want to use the interface to select buildings when your constructing/placing them?
Have you considered an approach like Black & White? (Which has no ingame GUIl)
(Im a little vague here, havent played it in ages)
When you want to build something a (50% transparrent) "blue print" appears where you have your cursor on the map. This also tells you if you can build there or not, too. (also a benefit)
Then say, pressing the right-mouse button cycles through buildings you can construct. Left-mouse places the "blue print" ready for construction.
I suppose you could click anywhere (or press ESC) to cancel.
Oh and the "blue print" rotates too, so you can adjust the facing of the building by waiting for it to face the right direction.
Just a thought. (hope you dig it)

Keep up the good work! Any idea of when a demo might be ready? If your planning one.

BTW: What is MoM? I cant figure it out from the abbreviation. :oops:
"When we looked at the relics of the precursors, we saw what heights civilization can attain.
When we looked at their ruins, we marked the danger of that height." -Keeper Annals
(Thief2: The Metal Age)
knightoflight
Posts: 199
Joined: Sun Aug 24, 2003 5:47 pm
Location: Germany

Post by knightoflight »

Hi Oz,
- its a misunderstandig, the GUI already works: You click on the ground and then click on one of the little pics down in the GUI, for example a house. That means, you dont have to search first a free worker/baracks to build, then click him and so on.
- MoM was one of the best strategy-games:
http://www.gamespy.com/articles/493/493 ... ?fromint=1
(if you search, you can find a playable DOS-version for windows, free )
Oz
Posts: 81
Joined: Tue Aug 31, 2004 3:34 pm

Post by Oz »

Oops sorry.
I misunderstood this
(but only the look, not that you have to find the right house with the mouse to build something, i dont like that...)
as meaning you wanted an alternative to using a GUI for building things.

"Master of Magic"
How did I miss this one? Ive been under a rock too long. :oops:

EDIT: Ive found it on UnderDogs. Im going to try it though I sometimes have trouble with some DOS games. Others work fine so, lets see.
http://www.the-underdogs.org/game.php?id=687
Last edited by Oz on Wed Sep 15, 2004 10:16 pm, edited 1 time in total.
"When we looked at the relics of the precursors, we saw what heights civilization can attain.
When we looked at their ruins, we marked the danger of that height." -Keeper Annals
(Thief2: The Metal Age)
knightoflight
Posts: 199
Joined: Sun Aug 24, 2003 5:47 pm
Location: Germany

Post by knightoflight »

Dear Oz,
you wrote:
> ...How did I miss this one? Ive been under a rock too long...
Maybe youre only younger. MoM is a 11 years old DOS-game. For some of you stoneage, i know.
Oz
Posts: 81
Joined: Tue Aug 31, 2004 3:34 pm

Slightly off-topic

Post by Oz »

BTW: I also edited my last post so people can download "Master Of Magic".
The reason I never played it is I had no PC when it was released, thats all.
(Hope you dont mind)

Another question for you, knightoflight. Are you thinking of making the map generation etc random like MoM seems to have? It seems like a good feature, but not very easy to implement, maybe? Its something im thinking about in my own project/s.

-thnx
"When we looked at the relics of the precursors, we saw what heights civilization can attain.
When we looked at their ruins, we marked the danger of that height." -Keeper Annals
(Thief2: The Metal Age)
Tyn
Posts: 932
Joined: Thu Nov 20, 2003 7:53 pm
Location: England
Contact:

Post by Tyn »

Was MoM a rogue-like game? I would have been around about '93 but was addicted to X-Com from what I remember.
knightoflight
Posts: 199
Joined: Sun Aug 24, 2003 5:47 pm
Location: Germany

Post by knightoflight »

(hey ive not forgotten to login, im learning :-) )
Tyn: MoM is a variation of Civilization in a Fantasyland instead of Leaders like Lincoln with Wizards like Merlin. Like i wrote, if someone like Stardock or Atari starts MoM2 i will use another scenario, but no SciFi. They used SciFi already in Alpha Centauri.
Oz: Yes, all is random-generated, i wrote at the start of the thread (and theres a tutorial for the land-generation from Bob).Thats the best in such a game, that you can start it and you have a new unknown world. And thats the best for me, cause other games with handmade-levels are no fun for the creator - but i make it for myself, too and i want to start the game and dont know the world. Demo: If i would break the next wall so that its really playable, i will make a demo, yes (when its done - perhaps before they are ready with Duke Nukem Forever :-).
Edit: PS: But yesterday evening i got my new PC with Radeon X800 XT and now i have to "test" and play... hope i will find time to get back to C++ and Irrlicht...
Post Reply