Regnuar, It is not impossible to make your own terrain editor. Though it might be a more difficult task than many have patience for. If you really want to get started, you need to have a very good understanding about the language; because you will need to take advantage of everything it offers.
Just like any project, you should start breaking the entire system down into more manageable components. Because unless your some god or godlike genius, it is just not possible to build the entirety in your head and systematically code it. Besides the time it would take to code the first half, you would probably forget the second half.
Anyway, you have already started to do that:
Quote: "
So i am planning to make a Landscape editor but i have a few problems. actyally many problems.
first of all, i need to make a tool witch raises the land every second i keep the tool on the spot.
secondary, i need to make a tool what colors the landscape with selected texture.
and then.. how i can import .X (with object textures) files to the program?
And finally, ofc i need to Export it to .X file for later usage.
"
You have the basics of what your code should start out like.
Rem Project: TerrainEditor
Rem Created: 12/27/2008 9:40:59 AM
Rem ***** Main Source File *****
` Setup code
sync on : set display mode 1024, 786, 32
` Variable declarations
`anything that arises that you will think you need. ie:
global TerrainWidth as integer :` The width of the terrain
global TerrainHeight as integer :` The height of the terrain
global InitialTime as integer :` The initial time the program started
global ElapsedTime as integer :` How much time has elapsed during the loop
global CurrentTime as integer :` The Time at the beginning of the loop
global Debug as integer = 1 :` Whether to show the debug information: 0=false
` Begin the program.
LoadImages()
LoadObjects()
LoadHeightmap()
LoadTerrain()
SetTerrainHeightmap()
PlaceTerrain()
PlaceObjects()
LoadInterface()
DrawInterface()
InitialTime = timer()
do
cls
` Timing information
CurrentTime=timer()
`SelectTool() or DrawInterface()
EditTerrain()
UpdateTerrain()
UpdateObjects()
`DEBUG```````````````````````````````````````````````````````````````````````````````````````
if Debug
text 10, 10 , "fps: " + str$(screen fps())
text 10, 30 , "polys: " + str$(statistic(1))
text 10, 50 , "Elapsed t: " + str$(ElapsedTime)
text 10, 70 , " "
text 10, 90 , " "
text 10, 110, " "
text 10, 130, " "
text 10, 150, "Press Escape to quit"
endif
`DEBUG```````````````````````````````````````````````````````````````````````````````````````
` Draw the screen.
sync
` How long it took to complete the cycle
ElapsedTime = timer() - CurrentTime
loop
function LoadImages()
endfunction
function LoadObjects()
endfunction
function LoadHeightmap()
endfunction
function LoadTerrain()
endfunction
function SetTerrainHeightmap()
endfunction
function PlaceTerrain()
endfunction
function PlaceObjects()
endfunction
function LoadInterface()
endfunction
function DrawInterface()
endfunction
function EditTerrain()
endfunction
function UpdateTerrain()
endfunction
function UpdateObjects()
endfunction
This is a rough draft and will probably change slightly, but the idea is to form a plan and stick to it throughout the entire development process. But as you can see you now have to fill in the blanks for each of these functions so that you can make them work.
You should pick one to start writing. Now, Because some functions will be dependent on others, You will have to periodically write to those as well. And as you go along you will find the need to write new functions not listed. But this at least, gives you a guide to follow.
So you decide, are you ready to tackle this?