way points and nodes from mesh?

Blitz3D Forums/Blitz3D Programming/way points and nodes from mesh?

Pete Carter(Posted 2007) [#1]
Ive been toying with the idea of making a level editor for my Syndicate style game, The idea would be that i make lots of models each being a building or a road section etc, then have an editor where you could make a level on a grid useing these models as building blocks.

I have some questions on how best to do this.

1. Do i need to use bones as nodes? or is there another way placing waypoint/node date into meshes?

2. How whould i go about combining all the data from each model to make a level map for pathfinding etc?

any help or even a point in the right direction would be great


big10p(Posted 2007) [#2]
Can't you just create a 2D array that contains the needed info on all grid positions?


Pete Carter(Posted 2007) [#3]
Big10p: sorry i dont get what you mean, i want to make it so the player can make levels from prefab parts. I can make an array for the pre built levels but i dont know how create this sort of info from user made levels?

sorry you may have to explain your answers in a basic way for me because this is new ground for me.


big10p(Posted 2007) [#4]
Your levels are basically just a 2D grid, where each grid position has a pre-fab part, right?

I mean, just have an array that holds info about each grid position, then you can use that info for path finding etc. Or, have I completely mis-understood what you want? :)


smilertoo(Posted 2007) [#5]
no need for bones unless you're animating.


Pete Carter(Posted 2007) [#6]
sorry yes I see what youu mean, your right. how about placing the nodes, characters, player start points and mission objectives etc. I think maybe im pushing the limit of my understanding with the project, but it could be so good if i could get this working.


Pete Carter(Posted 2007) [#7]
no im not animating i just thought thats one way more than likly a bad way of find a position in relation to a mesh.


puki(Posted 2007) [#8]
Well, some people do put waypoint markers in the geometry - in the same way they stick things in there for lighting and use collision meshes and other things.

I do it manually through code - personally, I think it is easier.


big10p(Posted 2007) [#9]
For start pos etc. just allow it on walkable tiles?


Pete Carter(Posted 2007) [#10]
at the moment ive got the level mesh and a more simple collsion mesh that is used for pathfinding as well. works well but im looking to make a level editor firstly for me to make levels easyer and also to allow the player to extend the life of the game with user made missions.

I have been working on lightmapping too, so after you have arrange your pieces lightmaps are created for the level.


Nexus6(Posted 2007) [#11]
Pete, have you created your own lightmapper or are you using YAL?

I have a simple waypoint editor that you could have, Its based on the A* pathfinding routine created by Andrew Pye, its very simple and i never finished the GUI but from what I remember, it does work. Once the level is created the user places nodes around the map, this is then saved and i have a routine which parses this data into the main program.


Pete Carter(Posted 2007) [#12]
I have a very poor lightmapper that i made based on YAL to be honist i seam to have screwed it up a bit, it can have some odd results.

Id love to have a look at you waypoint editor, im using a* so im sure it would help me alot.


Matty(Posted 2007) [#13]
Hi Pete,

I think Nexus6 has the right idea. Perhaps have the pathfinding nodes placed by the users in the editor if you want to have user generated content. Using bones would work as well with models but would require that the users use some kind of standard naming convention for path finding nodes.

Both methods would work, however creating bones for the models is a one-off step whereas placing waypoint nodes would have to be done for each level map even if it uses the same modular pieces.


Pete Carter(Posted 2007) [#14]
If Nexus6 can find out his way point editor i will test that route out first, seam the best way.

Good point Matty, i want to make a nice drag and drop editor i dont want them to have to worry about naming conventions.

Nexus6: if you do find that editor the email in my profile is my current one. Thanks for helping me out,

if i get my cut down yal working well ill give you both a copy see what you think.


Nexus6(Posted 2007) [#15]
Hi Pete,
Having trouble sending mail to your account, dont know if its my smtp server playing up or your email address.

Paul


Pete Carter(Posted 2007) [#16]
very odd try "removed"


Nexus6(Posted 2007) [#17]
Still having probs, must be my end. I think it may of sent using webmail, let me know if you received it.


Pete Carter(Posted 2007) [#18]
nothing yet? Ill email you on another address


Pete Carter(Posted 2007) [#19]
Nexus6: got your emial ill take a look when i get home. thanks