Jump to content

Level Construction: What do you think is better


Road Kill Kenny
 Share

Recommended Posts

Hi All,

 

I'm trying to make a very difficult decision concerning level construction in my game and thought I'd bring it forward to see what other people think. Currently my levels are broken up into a bunch of sections. Each section contains a floor which is one mesh for the entire floor of that section and then a number of walls (varying per section). You may have seen this in one of my past blogs called "A Bucket 'O' Walls". Now this has worked and it is possible for me to go all the way like this. However, there are some downfalls namely

  • Every section has to be modelled uniquely (almost) which means a lot of extra artwork and man hours
  • The positioning of these can't really be "snapped" into nice unit lengths because they are all unique.
  • Some rather big pieces with possibly bigger textures than I may want.
  • Kinda pointless making an editor for it when everything has to be modelled in Blender first.

 

Now I have been pondering another method which acts more like a construction kit/set where I pre model a bunch of level parts that I can re-use to make almost any level I want. I could make this work in an editor nicely and you simply put it together like lego and then add assets once the level frame is made. Some example pieces would be like 1x1m floor, 1x2m floor 10x10m floor, 5x3m wall, 1x1m wall corner etc. etc. Everything would be based on unit dimensions (no decimal points) that way the level could be made to snap together nicely. I could also have a set of standard textures that I could slap on them and would fit nicely to make level creation very quick. However, there are problems with this as well that I can see:

  • Possibly too many entities making performance bad.
  • Well yeh that's about it but that could be a killer.

 

So what do you think, risk the many entities or go with the unique level models and extra work. I'm kind of undecided at the moment.

Please keep in mind when r

esponding that my game is completely data driven and for certain reasons I cannot, use .sbx or leadwerks editor to make levels. I also doubt that the CSG editor in LE3 would mesh nicely with my code architecture (subject to testing) so for the sake of my question please pretend CSG & LE3 does not exist even though I may port my game over to it.

STS - Scarlet Thread Studios

AKA: Engineer Ken

 

Fact: Game Development is hard... very bloody hard.. If you are not prepared to accept that.. Please give up now!

Link to comment
Share on other sites

the camera angle that you are using would probably prevent any problems with large amounts of entities being drawn when using the second style of snap-together parts... we did a similar thing in a small project and the cameraview culling items not seen seemed to work just fine... and your camera angle seems to be more topdown than what we had so it should work even better... the scene shown here are all parts snapped together... 2x4 floors, 2x4 walls, etc..

 

http://www.leadwerks.com/werkspace/page/videos/_/xray-shader-kinda-r114

Win7 64bit / Intel i7-2600 CPU @ 3.9 GHz / 16 GB DDR3 / NVIDIA GeForce GTX 590

LE / 3DWS / BMX / Hexagon

macklebee's channel

Link to comment
Share on other sites

So I've got it mostly working though I forsee a problem.

 

I was hoping to just have 1 of each type of "lego piece" (if you will), and then just paint them with different materials. However, when you load the same mesh twice it automatically instances the one that is already loaded and if you paint one you paint them all. This means I can't have a differently textured floor in one room than another unless that different room uses different meshes.

 

So basically for each lego piece I can only have 1 texture on for a whole level. Is there any way to separate them (un-instance) the meshes without having to make duplicate gmf files of every single lego piece?

 

If not I could potential just support a maximum of 3-5 differently named pieces that are exactly the same but different file name but I'd rather not if there is a better way.

STS - Scarlet Thread Studios

AKA: Engineer Ken

 

Fact: Game Development is hard... very bloody hard.. If you are not prepared to accept that.. Please give up now!

Link to comment
Share on other sites

Well I've consulted the Command Reference Documentation in Leadwerks for meshes and found AddMesh(TMesh src, TMesh dst). Not a function I've ever used but may work if it works how I think it does. http://www.leadwerks...es/addmesh-r308

 

So from what I gather it adds the data of one mesh to the data of another. I'm not sure if that includes UVs (but I hope it does). So perhaps I can just make it so that when I have the same mesh with a different texture I can just Add the mesh from one to an empty mesh (which is created with CreateMesh() and then paint it different. I have no idea if this will work though because I don't know the nature of the function but we'll see.

 

Here's a question for Josh. Am I likely to have this same problem in LE3 or does it work differently in LE3?

  • Upvote 1

STS - Scarlet Thread Studios

AKA: Engineer Ken

 

Fact: Game Development is hard... very bloody hard.. If you are not prepared to accept that.. Please give up now!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...