level editor with 3D tiles.

Blitz3D Forums/Blitz3D Programming/level editor with 3D tiles.

Vertigo(Posted 2006) [#1]
Anyone have any thoughts on the subject. Basically Im going to be using primatives to build the level, which has worked in the past. Making each 3d mesh"part" a type and then manipulating them this way with events and triggers... Each block has its own location and orientation and flag values. But im going to be using this for a near top view RPG game, and my fps seem to drop drastically when using this method. And we're only talking like maybe 3000 triangles being rendered. Is there any way to speed this up? Or should I think of a different method?


Dreamora(Posted 2006) [#2]
How large are those tiles?
Do they all share the same textures?

How far from cam are they?

(reasons I ask are: too many surfaces make the rendering slower, too many surfaces near to the cam are especially worse and if each has its own textures it could simply be that it floods the bandwidth with transfering textures to graphic card and back all the time)


Vertigo(Posted 2006) [#3]
Um... for now they are all cubes. 2tri's facing camera at all times. They are 1 blitz world measurement unit in size... the camera is anywhere between 5 and 20 away from that... though id ilke to keep it under 10. This is so weird though... there are so many either ors with this. if one half of them are shown on screen I get 76fps. If not its 38fps. Also I have a blur filter function, collisions detection, and some other graphic effects that one would think would be REALLY processor/video card intensive. However these numbers are consistant whether my graphics overload crap is running or not. So im just rather baffled. There isnt a whole lot going on right now with this... and its either perfect frame rate or sluggish.. no either or... Vwait waiting on vsync always produces the 38fps. I checked for extra render or flip commands no other writes to buffers. I suppose I could just write a frame limiter to skip frames, but that still doesnt explain why its either 76 or 38 no exceptions. I was just looking for some advice on coding the levels. Id like to be able to modify each block written to the level with my script engine(which so far is working wonders) Switching to a static one huge mesh with lots of polys isnt what I was wanting to do. Oh yeah as far as the surface textures go. Its similar to.

For A.part = Each part.
Create objects
load texture$
texture object
next

is that a bad way to load these textures or something? And regardless it has the same performance effect if I didnt have any textures at all.

Sorry for the rant... any help would be appreciated. Also anyone wanting to help with this RPG project is welcome to do so. Im kinda going for a Snes zelda with 3d levels and sprites for characters. Im working on a half ass-ed basic scripting language which so far allows me to create some impressive interactions all from the curdosy of notepad ;)

-scott


jfk EO-11110(Posted 2006) [#4]
if the cubes may be static, you should think about to use AddMesh() to add them together to clusters. Once fused, the number of surfaces will be optimized automaticly. This may speed things up. Choose a clustersize that makes sense, eg. 25% of the screen.

uh, BTW, for AddMesh you need to make sure you don't use the Entity... commands, but the Mesh.. commands instead, eg:

use PositionMesh instead of POsitionEntity
use PaintMesh instead of EntityTexture

You may use PositionEntity in your Editor nevertheless, only in the game engine, where it needs to render fast, you should optimize it this way.


Vertigo(Posted 2006) [#5]
I suppose I could adapt my level editor to do this, but there wouldnt an undo feature if you "welded" a bunch together... unless, they can still be broken up by children probably... Hrm... I just find it interesting that I can take a 10,000 complex poly .3ds ive made and have it zooming around at like 140fps.. but yet you through 300 or so 12poly objects and it chokes. Thanks for the advice though, I will certainly consider adding everything to one mesh and working with child entities.


jfk EO-11110(Posted 2006) [#6]
Yeah, the surface (or material) count is very important. You may have a few hundred surfaces in the scene. But when there are thousands then there's too much overhead in the rendering pipeline.

A further idea would be to work with cubes in the editor, and then make a clone of each cube, add all clones together as described before, then hide the original cubes. So you still can edit the cubes individually. Whenever the user of the editor made any changes you need to update this, but not for every rendered frame.


spilocke(Posted 2006) [#7]
Is there a possibility of joining in the development? When you mentioned near top view RPG game, I couldn't help but ask :)


(tu) sinu(Posted 2006) [#8]
I did a tile editor ages back, its basic but may help you.
I've emailed it you.


Wings(Posted 2006) [#9]
is it somthing like this u mean.



Like create a 2d world to 3d. (This is a dungeon editor iam working on..)


John Pickford(Posted 2006) [#10]
I made a 3D tile editor for Naked War. It's pretty game specific though and it is restricted to square tiles.

There's a video of an old version here:

http://www.zee-3.com/video/map_make.wmv

I use a single texture for the top surface of all tiles. New tiles are blended from multiple tilesets on the fly. The single texture is a kind of tile cache.

In response to some of the discussion above, I cluster the tiles in 10x10 chunks for efficiency. I haven't really experimented with varying the chunks size. Perhaps I should.

The editor has an UNDO\REDO feature which simply saves the entire map before every action and reloads it when required. Not a problem as the maps are only about 4-12K text files. I only store the low level info that matters, all polygon\texture info is inferred from that. So a level with 100K polygons might still compress down to 2K of data when sent as part of a game turn.


Vertigo(Posted 2006) [#11]
sinu, Thanks I really appreciate it. This is very nice however; its not exactly what Im looking for.

The level is made by using types... example.

Type object
field name
field group
field mesh
field entity
field texture
field x,y,x
field sizexyz
field rotationxyz
field active
field selected
field event
field trigger
field controller
field kind
end type

Each time you place a new type or "object" you can place it and change just about anything on it... the texture loads a .bmp file, the mesh loads what it physically looks like(basic geometry planes etc) you can group them together and apply events to "groups". So lets say you make a castle out of these objects. with 2 kinda of groups "castle_tower" and "castle_main". I can call a script that causes the tower's to rotate and fall over, and the main castle to explode outwards all called from my explode castle script file during game play. To me it seems logical, but I dont think its quite the fastest thing out there... I have a dual 3.4 and an ati 9600 pro and can choke it with some not-so-elaborate level designs.

Here is a screen shot of my current editor and example of what im talking about.



Keep in mind this isnt locked to a standard grid... while im using really simple one sized planes now... you can scale them and do practically anything with it... like a modeler etc.

spilocke sure you can join the in the development. Any source youve done in the past thats relative and you think could apply and you could implement thats great. As far as stuff im not doing that that could be added are AI routines and and animation system. Im still not sure if I should make the characters out of meshes or sprites. Im working on the world builder/level editor now, its my main concern, and in my opinion the longest part of the engine. This event->trigger run script system should allow the end user to modify and change any aspect of the game(I hope). Basically I was playing zelda 3 for snes at work and it dawned on me that such and amazing game hasnt been made since then, and since all this 3d stuff no one has made anything like it... they just go with the "whatever looks new and super graphics" totally forgetting the gameplay that made games like zelda the shit back in the day haha.... so I decided to make a freeware action/rpg engine and possible add multiplayer abilities, and allow the players to design their own worlds, characters and interactions... Part of the reason for using sprites for characters... most people have MS paint and notepad... in theory all you should need to make a game with this engine... although if I get a decent animation system you can just use "simple" model parts and build your own characters... I donno.. sorry guys I rant too much. But I am curious what anyone/everyone thinks of this.

Wings:
Yeah I like that... Ive used that method before for a hover-racing game I was working on years ago.

John: that video was extremely impressive... great work with that.


spilocke(Posted 2006) [#12]
I guess I can help out in mesh modelling if you want those characters to be meshes. It's either that or decal a sprite.

The sample screen shot is as below



The background was fully created and rendered by myself. The character was a mesh object with no texture.


Vertigo(Posted 2006) [#13]
To post an image just type the url... no html tags are allowed... well I suppose come up with something... Keep the polys really low... and think fake cel shading.. like um.. remember megaman for the N64 the 3d 3rd person one... how they used minimal colors and black outlines... I kinda dig that effect, helps sync back into the retro thing too if you ask me... just email anything you come up with and we'll see if it fits... if nothing else I could use map makers like a no other... there just has to be a standard... and while this is rather portable and should be reverse compatible.. id hate to have anyone have to recreate a map because a new feature was added... so hang tight... Ive been working on this for a few hours each day while bored at work.. so im sure progress will continue steadily. Lemme know when youve got something... cheers.


spilocke(Posted 2006) [#14]
The model so far was a separate head, arm, leg thingy and not a whole mesh. That demo was created during FF7 time when boning and skinning was not err... that popular yet.

Here is another one



If I create the body parts as separate parts then users can mix and match right? Is that a good thing?


spilocke(Posted 2006) [#15]
Have you tried using Seige editor?




IPete2(Posted 2006) [#16]
Wow!

Do you have a link to seige please?


IPete2.


Matty(Posted 2006) [#17]
Ipete2 - I think that is the Dungeon Siege editor, although not having played it I would only be guessing.


spilocke(Posted 2006) [#18]
Yup it's a dungeon seige editor. It's not done in Blitz3d. I was just thinking of the same concept for the editor type.

http://ds.heavengames.com/dl/siege_editor.shtml

http://www.microsoft.com/Games/dungeonsiege/8.asp


Vertigo(Posted 2006) [#19]
Well I suppose the same concept applies with what im making just not on the same scale. Besides my engine will be heavily scripted. One of my biggest concerns is keeping them all organzed. I wont be using a terrain height map, though if one were really inclined you could create one with an exterior editor and import it as a single object. Basically I'll have quite a few of the same features that the siege editor would have. Triggers, events, entities, items, waypoints targets etc. Ive basically given up with the frame rate.. I'll just allow for frame skipping when it starts to choke, and ive tried it on a variety of systems and its not as bad as I had originally thought with all of these single object "map parts". Im ditching lighting.. I cant use light maps as the level will not and can not be a single mesh(id lose all of the attributes) and a few other things, but for the most part it should be alright. Hell I have fun just jumping around in my test level for minutes on end lmao. Trying to incorperate "cartoony" physics is a tad difficult but its working out ok. I'll probably stop posting on this as my work is going rather well and this thread is getting pretty long for no real reason.. I'll post a new one with updates once I have something.. Possibly a beta soon so see if anyone wants to make some test levels and gimme some feed back on how they broke it haha.


Sir Gak(Posted 2006) [#20]
On the issue of the original question about tiling cubes, remember that when you use cubes side by side, even if your human eyes only sees one side, the program is still trying to render the entire mesh. If you create hundreds of cubes, it's working on multiplied-hundreds of mesh surfaces. Even with backface culling, there's still lots more surfaces being rendered than just the ones you see onscreen.


(tu) sinu(Posted 2006) [#21]
The way i do it is, first set the number of tiles you will use ie 32*32 then when placing them in the editor have them as seperate surfaces but then create clusters of meshes from the 32*32 tile in game so instead of having 32*32 tiles you will have created clusters of 4+ tiles so onscreen you may only have 2 clusters at most which cuts down on the surfaces
If the cam is static with rotation don't even have backs on the tiles.