Psy, how about, instead of selecting the height value you want, when you press the left mouse button, the pixels get thier values increased, and when you press the right, the values get decreased? This is what I did in the code I posted before.
Z.
Printable View
Psy, how about, instead of selecting the height value you want, when you press the left mouse button, the pixels get thier values increased, and when you press the right, the values get decreased? This is what I did in the code I posted before.
Z.
can add another tool for doing that as well ;)
I changed the GUI a bit, got an icon icon on the main form and one on the sub forms.
It now asks to save unsaved things when u close em or exit the app.
Nice going, Psy =).
Z.
As requested =) I have added in an increase/decrease thing. With this tool the scroll on the left on the palette form will do the size (as per normal) and the one on the right will do the amount it increases it by.
At the moment it only uses the circle (aka normal) brush. im going to change the style so it will be so you can:
1) Select a brush shape
2) Select the size
3) Select the style (Single Color or Color Increment)
Somethign like that. ah well. check out all of the parts to it and let me know whatcha think.
Im gonna write a HTML help document to add to the contents button although About is finished on the help menu now =)
Just curious what you folks will think of the game
im creating.
=)
check it out!
http://www.vbforums.com/showthread.p...hreadid=199296
New tool box style.
Let me know if you like:
1) This one the.
2) The old one.
3) The tools on one box and the brush parameters on another.
I think this or the third option.
Whoops, i keep forgetting to add it lol.
Evan, looks quite kewl. are you on your own on that project ?
yep. im going to be doing everything alone.Quote:
Originally posted by PsyVision
Whoops, i keep forgetting to add it lol.
Evan, looks quite kewl. are you on your own on that project ?
Psy, holding the mouse button on increase/decrease shouldnt increase the drawing color, it should increase the affected pixels
Otherwise, the interface is nice =).
Z.
Nifty... got the tile culling going =). Works like a charm =).
Z.
Zaei, it does what you want.
When u select the increase/decrease tool it enables the scroller on the right. use that to select by how much it increases. the one on the left does the tool size.
if that is set to one then it will do the current pixel under the cursor. if you set it to bigger then it uses the oe the cursor is under but also changes the surrounding ones.
its best to have tool size 1 and update of something like 10 ;)
i may change the tool layout a bit but its effectively done.
Doesnt enable the scroll bar =(.
Z.
Just got a 1024x1024 meter map rendering. It is FAR too big (I only got to about 200 meters across before I stopped =). The real thing here is, that, though I had this huge map, the frame rate hits a minimum of 12 fps, when there are 4 tiles onscreen at once. Max is something like 56, and that is saying something.
The real reason that 1024 is too big is because you will run out of memory... Windows had to increase my page file size about halfway though the map loading...
Z.
heh, yea i was half way through changing around the design.
the code isnt working perfectly at the mo. on some colors it blocks it from going high and some it blocks em going low :confused: im gonna take a look into it.
the current get around is to select wither normal mode or increase and then select the rectangle brush. change the slider. then goto cricle and set the brush size to one.
Added a function that GreyScales an Image (tools menu)
;)
New tool menu and replace dialog etc on way
Looks all good.
Sorry I haven't posted, I've been off on a little trip the past 3 days. But to quote the Protoss guy from Starcraft:
"I have returned."
:) You're doing a good job Psy, but I couldn't use the maped on my computer... too little memory and that.
WB, Sas, knew you were away =). By the way, noticed this...
Z.
Cool :)
Well, I was completly destroyed by a cold these past 3 days, so nothing really has gotten done. I am working on the property map for the units and such, at the moment. As I have said, map culling is done, now just need to fix up the terrain rendering itself.
Ive had another strange yet fun idea running through my head for a while... Im sure you have all turned on one of the modern game console with no game in recently. Why not make the mod launcher program the same? If no mod is specified on the command line, a nifty thing pops up, that allows you to select a mod, as well as configure options. This could all be rendered with D3D, and then the Device could be reset when the game is launched, and passed into the mod. I think that would take a bit of the tedium off of the mod developers as well, as well as add a nice professional polish to the interface =).
Let me know =).
Z.
Okies, here is a nifty one for you guys =). I just figured out how to overload an ostream =). So now output to the console will look like this:
=).Code:Console << "Hello!" << endl;
Z.
Personally, i think that wud look a bit cheesey.
I think if no mod is specified the default one should run and u shud be able to select a mod to run from there.
Now i have the heightmap editing pretty much done im working on the tile editing.
Yea i noticed that in some vector code i had from a site. odd lol.
Kewl :)
hmmm, i was thinking.
We should have three files for each map.
1) A configuration file which holds stuff like map size, name, attributes and any other things that need to be included.
2) The heightmap data.
3) The tilemap data.
How should the tilemap be stored ?
I guess you could have an array of the textures. then each vertex just has an index into the texture array ?
It will be one file, binary.
And yes, the tile map will be stored as a list of textures, and then indices into that list = ).
Why do you think it would be cheesy? We could do a lot in there =).
Z.
Well, okay if you want to put something there then do. i wudnt bother with it yet tho. its more of something that needs to be put in at the end.
Of course =).
Z.
I've been thinking of an auto-texture generator. You import the heightmap, and it generates the base terrain (ex. cliff, sand, grass, rock, whatever) based on slopes and such. Then you could add in a sealevel, and change bodies of water to marshes and stuff :)
This could be VB - meaning a part where I could actually help out with the coding... something I've wished I had the ability to do from Day 1...
Anyway, this is my thought on the subject. This is how it 'should' be done but you can change it of course manually, this is a starting point. And how about a random map gen for skirmishes and such? Shouldn't be too hard to create, if I give you guys that know C++ my VB source.
I'd like to see both in the first release of ToW... so give me suggestions that can improve what I've stated here :D
That auto-texture generator, do you mean in effect a 'tilemap' generator ?
That could easily be done, you could have an array of textures, each one has a height value which can be changed. the editor could thenrun through the heightmap and get the current height value and set the corresponding texture to it.
I think we should have the auto generator and the ability to place them on their own.
A random map generator shouldnt be too hard to do.
Yeah, that is what I'm saying. It generates the base texture for you, and then you add roads and marshes and the sealevel and stuff. You can of course change what this has made, but it's a starting point.
okies, kewl.
that sounds good. i have some src that im working the tile map thing off. do you want me to send it on to you ? so you can do this stuff, along with the src for the heightmap editor ?
Sounds good to me, guys. The tentative map format is going to be something along these lines:
And yes to the auto generator =).Code:[map_name][heightmap_width][heightmap_data...][tilemap_data...][future junk...
Z.
Got the property map working... =).
Z.
Cool beans :)
I'm starting work on the random MAP (not terrain) generator, and want to know what kind of formula I should use: I'm looking at Perlin Noise currently and it looks promising. Does that sound good?
I am quite partial to particle displacment. Essentially, pick a random spot on the map. Find its neighbors (NSEW). If the selected point is either the lowest, or tied for the lowest position, inscrease its height by 1. Otherwise, inscrease the position of the lowest neighbor. Repeat around 50000 times, and then apply a smoothing to the whole map. Generally looks pretty good =).
Z.
Hey, anyone remember this? Sas, and Psy, you might get some useful info from this tidbit... found it on something like page 9 of the thread =).
Extract the override.zip into the same directory as the other stuff. =).
Z.
Thats pretty sweet :D hmmmm
Yes I do remember that.... I'm currently working on my own type of terrain generation..
You start with a 8x8 set of quads. Each quad is given a value, of 1 to 5. 5 would be something like a valley, "punchbowl", cliff, or mountain. 4 might be a river, lake, etc. 3 would be a large hill, a plateau. 2 would be a small hill, or a small dip in the terrain. 1 would of course be a plain. Now each is given a "grow" value as well. That's how much it will override when 2 fields mix. Now, the 3rd value of each quad is the tesselation value; that's how many quads are created from it, each one of its children has a value, and it goes on.
Now the map is then created by tesselation, and creating values from all of these. To add natural effects, erosion and particle displacement will be added, and a smoothing feature as to make it "playable".
Now how does THAT sound? :)
Sounds like fun, Sas =).
Z.
okies, once the tile section is done i can probably come up with some renderer for combinging the two and showing it in 3D. i can probably then use that so you can edit the heightmap from the 3D view.
You can use my base code, Psy, if you like =).
Z.
Already at work on it and using ur code. Your using the coordinate system of y = height still yea ?
Always have, always will =).
Z.
okay the editor is going quite well. i got the views working a bit better. i was convertig the code across to my own project and it got messed on the way. its draing now tho not properly. it shud be done soon. ill then have it working off the heightmap (hopefully lol).
Nice. Been working with the property map thing, Am going to impelment object templates tomorrow.
Z.
hey, i was converting your code across into my own app. for some reason its coming out like below (attachment).
i dunno why, i thought it may be the indexbuffer though i checked through and that seems to be fine. same with the vertexbuffer.
any reasons why ?
Dont worry, i started a new project to fix it.
How did you manage that =)?
I was playing around with that code last night too, trying to change the 2D views over to SwapChains, and just render the same data in that view... would be nifty If I could get it to work (didnt spend much time with it though =).
Z.
Whats SwapChains ??
where can i get info on it ?
i know what did it. the indexBuffer was set as type integer to start with. when converting i put it as long but didnt change memory allocations. i think this was the error. its back at integer now and works fine. hmmmm. long would be better though!!
Could be =).
Swap Chains are essentially mini d3d devices... so you could have all three views actually being rendered... one with persepective, and two with orthographic projections so they are 2d =).
Z.
kewl, lemme know if you get that done.
what i was thinking is.
we could either have it so you can adjust the height from the 2d heightmap or from the 3d map.
i was thinking we could also make it so u can just use the 3d afterwards to make it so u can change the x,z value too so that u can kind of create walls and drop offs.
whatcha reckon ?
Cant, Psy. That would require actual collision detection between objects and the ground... because I can just grab the height of the terrain, because I dont know if there is an overhang or not.
FINALLY figured out what was wrong with my GameObject template class... VC should warn if it is using a default copy constructor...
Z.
okies.
at the moment the 3d and 2d are in two seperate apps. tongiht im hopefully going to make it so u can load a heightmap into the 3d editor and it changes the terrain based upon it. it shud then be this data that i save to a map data file.
ill play around and see what i can do.
Zaei, thats good. yea vc is a bit annoying hey :s
Also, can u get me some code to get lighting working in the 3d view. i want it so in 3d view i can see how it looks when shaded without sticking a texture on it to be able to see how it bends.
i uncommented the code u had and it just turned black :s
You would need to calculate normals during terrain generation(which I do not =), and then simply set up a light, and a material. Its the normals that are the tough part =).
Z.
hey, check this ;)
on the image box on the bottom right corner. right click it, then left click and watch.
u can change the image and then re - do this. the image has to be 25 by 25 at the mo.
i will make it so u can have any size later.
Sorry, use this one, its better ;)
Neat! It says "1" and then quits =).
D3D Init error?
Z.
yes, i dunno if the two are related but it bumms out on:
and i changed it to D3DCREATE_HARDWARE_VERTEXPROCESSINGCode:
Set direct3DDevice = d3d.CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hWnd, D3DCREATE_HARDWARE_VERTEXPROCESSING, direct3DPP)
from D3DCREATE_SOFTWARE_VERTEXPROCESSING.
newer version:
its a bit poo but once its incorporated it will work fine (i only advise maps of 128 in size coz on 256 and 512 it gives an overflow).
1) enter 128 in the text box on the details then click new (note the size must be the same as the image).
2) Right click the box.
3) Left click the box.
4) Then click Load texture
5) Then click Solid
N.B use the slider to change the scale of 0 to 255 Byte value to height.
most of this will be automated in the finished version ;)
Once the overflow problem is fixed (int to long changes) it will allow bigger maps. the problem is changing all the memory size allocations for index and vertex buffers. this is what broke it before :(
how do i change the back color ?
i think it shud be different from black with black being invlolved in the heightmap thing. im lookin it up on some direct x vb sites :s
Change the color in the call to D3DDevice.Clear()
Z.