Perun
Public Area Guest
Issa (Vis) [1:76:24]
Posts: 2,506
|
Post by Perun on Oct 30, 2004 20:30:59 GMT
I've made a suggestion to J-Y which could result in having a variety of zero-height terrains, such as bodies of water, deserts, wastelands etc. What is difference between wastelands and plains? Just climate/height or something else? There's also that problem with realistically drawing bodies of water bigger than one cell. Modifications would be in more different terrain types, right? Code for drawing borders should be rather simple, like one property that describes what's being drawn there - frozen wastes, desert, ... Is there something else that I'm blind for?
|
|
|
Post by celebaglar on Oct 30, 2004 20:50:57 GMT
What is difference between wastelands and plains? Just climate/height or something else? Oh, that was just an example really. I haven't defined a set of differences, but I'm sure we can think of any number of properties that would differ between the two. They could affect store production in adjacent strongholds, or affect various races in various ways, or prevent creatures like horses or wolves living there... Well, wassisname on the mailing list managed a passable rendering with just the basic method of using water billboards, but with a bit of refinement and a change of approach you can actually do even better than that. Well, I haven't seen the tables used, but I would assume that would be a minimum, yes. New terrain types would introduce new properties. Agreed. Things like deep water, impassable mountains etc could all be used for bordering the map at various places. No need to surround everything with icy wastes. Not so that I can tell. It's not rocket science, and the only obvious impact would be server side in creating the views. At this point I can't guess how much of a performance hit it would have, but there would obviously be more to do than would be done with the current set of terrain options.
|
|
Matija
Morkin Member
The Turtle Moves!
Posts: 1,696
|
Post by Matija on Nov 2, 2004 11:50:02 GMT
My new scenario features plaines called desert, and downs called dunes. And, naturally, in the middle of the desert, there's an oasis.
|
|
Ringthane
Public Area Guest
Ardet nec Consumitur
Posts: 5,446
|
Post by Ringthane on Nov 2, 2004 12:43:12 GMT
I'm gonna draw a veiled assassin character for your map!
|
|
|
Post by celebaglar on Nov 2, 2004 12:49:19 GMT
My new scenario features plaines called desert, and downs called dunes. And, naturally, in the middle of the desert, there's an oasis. It would be cool if they actually were deserts, dunes and oasis, rather than just plains, downs and lake, no? Unfortunately, a few hours of experimentation has started to build me a dislike for the gd library. I still think it can do what I want it to, but the documentation and examples I've found so far are pants, and functions just don't behave the way they are supposed to. Vary frustrating, specially after working with the SDL, where stuff tends to behave as documented. Grrrrr...
|
|
Perun
Public Area Guest
Issa (Vis) [1:76:24]
Posts: 2,506
|
Post by Perun on Nov 2, 2004 15:41:38 GMT
Unfortunately, a few hours of experimentation has started to build me a dislike for the gd library. I still think it can do what I want it to, but the documentation and examples I've found so far are pants, and functions just don't behave the way they are supposed to. Vary frustrating, specially after working with the SDL, where stuff tends to behave as documented. Grrrrr... What's the problem? I found GD to be quite good in what it's supposed to do... Even quick enough. Could you give some more details, please?
|
|
|
Post by celebaglar on Nov 2, 2004 16:03:18 GMT
What's the problem? I found GD to be quite good in what it's supposed to do... Even quick enough. Could you give some more details, please? I put it down to ignorance on my part combined with a lack of detailed and accurate documentation - or my perhaps my inability to find such. The problem I have at the moment concerns transparency in PNGs, and my failure to get gd to handle it properly (or at all). The technique I need to implement concerns pasting images with transparency over a background image, then making a certain colour on the resulting image transparent. As far as I can tell, there is no reason why gd can't handle that, but it certainly isn't as straightforward as it was with sdl. Did your demo of the gd landscaping use png images for the terrian? I want to get the basic image creation functions working as I want them, then I'll try and learn just enough php to put a demo of what I'm talking about together. Sometimes seeing something in action has a much bigger impact than just being told about it. The alternative would be to mock up the process with something like the GIMP and turn it into a presentation for someone else to implement. That would be easier but less effective.
|
|
Perun
Public Area Guest
Issa (Vis) [1:76:24]
Posts: 2,506
|
Post by Perun on Nov 2, 2004 18:15:29 GMT
The problem I have at the moment concerns transparency in PNGs, and my failure to get gd to handle it properly (or at all). The technique I need to implement concerns pasting images with transparency over a background image, then making a certain colour on the resulting image transparent. As far as I can tell, there is no reason why gd can't handle that, but it certainly isn't as straightforward as it was with sdl. Did your demo of the gd landscaping use png images for the terrian? Yes. Here's a sample: //create image resource $im = @imagecreate($img_width,$img_height) or die ("Cannot Initialize new GD image stream");
//set transparent color to red [255,0,0] [#FF0000] $col_trans = imagecolorallocate($im,255,0,0); imagecolortransparent($im,$col_trans);
function dispbb($path,$src,$x,$y,$w,$h) { $bbimg=imagecreatefrompng($path); imagecopy($src,$bbimg,$x,$y,0,0,$w,$h); if($bbimg) imagedestroy($bbimg); }
Function "dispbb" pastes billboards onto $im canvas. I agree, color handling is made somewhat... silly. Btw, can we move this discussion over to... Icemark forum?
|
|
|
Post by celebaglar on Nov 2, 2004 18:47:23 GMT
Of course.
|
|
|
Post by Old Shendemiar on Nov 2, 2004 20:37:50 GMT
I've made a suggestion to J-Y which could result in having a variety of zero-height terrains, such as bodies of water, deserts, wastelands etc. That could remove the need for surrounding everything with icy wastes as well as opening up new gameplay. It would obviously need modifications to the database tables as well as the implementation of server side gfx creation via the GD library, but who knows?... Seconded. In fact i made some Middle-earth experiments back at TME times, and had something that looked about a sea from most viewpoints... Just by editing the graphics.
|
|