Pathfinding & other questions

Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the
ambiera forums
Post Reply
chaoswings
Posts: 2
Joined: Fri May 29, 2009 1:58 am

Pathfinding & other questions

Post by chaoswings »

I'm new to Irrlicht and creating games in a 3D space. I have a few questions.

1) Do most people (I'm talking in a non-professional setting) find it worthwhile to create a world editor for their game no matter the size?

2) As for pathfinding I understand the concept I'm just not 100% certain how to implement it using Irrlicht.

Do I just use a line3d object and sweep the level looking for collisions (or the absence thereof) and proceed to store the data in a file for future use?

3) Do most people tend to develop a scripting language? If so what are some good tutorials? I already found a few at GameDev.net.

4) For character animation I was considering using one .b3d file per model and sectioning off each animation in frames. For similar characters such as NPCs I am considering simply copying over the same skeleton from one model to another.

Using this method their are many duplicates of the same skeleton. Is there any way to easily make multiple models all use a single skeleton?

5) If you attach a helmet or a chest piece will Irrlicht still render the unseen geometry that is covered by clothing?
CuteAlien
Admin
Posts: 9734
Joined: Mon Mar 06, 2006 2:25 pm
Location: Tübingen, Germany
Contact:

Re: Pathfinding & other questions

Post by CuteAlien »

chaoswings wrote:I'm new to Irrlicht and creating games in a 3D space. I have a few questions.

1) Do most people (I'm talking in a non-professional setting) find it worthwhile to create a world editor for their game no matter the size?
Really depends on the game. Sometimes using an ini- or xml-file can already be enough. For many games you can use one of the already existing editors like irrEdit, so check-out other editors before doing your own. The advantage of an own editor is that you can easily add specific stuff which you only need in your game. For example for a racer-editor I had functions which automatically looked for the borders of the tracks - you won't get such stuff in a common editor.
chaoswings wrote: 2) As for pathfinding I understand the concept I'm just not 100% certain how to implement it using Irrlicht.
Once again that depends a lot on your game. The pathfinding-algorithms themself are usually rather similar for most games (A-Star is extremly common). But the real work is often in preparing your levels in a way so you can actually use an algorithm like A* on them. Also following the path is not always trivial (especially with physics). If you are not experienced then I think it's best to start either with a game that has a grid-layout (like nethack) or a game where it is ok if your characters follow fixed lines from point to point (NPC's do that in many games). Then you can use for example invisible nodes for the endpoints of those lines and a the connections form a graph which can be searched for the shortest way.
chaoswings wrote: Do I just use a line3d object and sweep the level looking for collisions (or the absence thereof) and proceed to store the data in a file for future use?
Hm, I programmed automatic way generation once and I won't recommend doing that. The simplest way is to use an editor where ways are marked. For a start use the invisible nodes and make sure that nothing is in between. Once you got that working you can think about improvements, for example marking polygons as walkable. A nice website for advanced AI is http://aigamedev.com/
chaoswings wrote: 3) Do most people tend to develop a scripting language? If so what are some good tutorials? I already found a few at GameDev.net.
If you are not experienced you will probably not need it. Most larger games use some scripting - LUA and Python and Ruby are commonly used for that currently.
chaoswings wrote: 4) For character animation I was considering using one .b3d file per model and sectioning off each animation in frames. For similar characters such as NPCs I am considering simply copying over the same skeleton from one model to another.

Using this method their are many duplicates of the same skeleton. Is there any way to easily make multiple models all use a single skeleton?
I splitted b3d files into animation data and skeleton data by modifying gandalfs blender exports script. You can find my patch here.
chaoswings wrote: 5) If you attach a helmet or a chest piece will Irrlicht still render the unseen geometry that is covered by clothing?
Yes, it will still render that. If you don't want to render parts you have to remove them.
Creating a really flexible animation system where you can exchange armors, share skeletons etc will be a lot of work.
IRC: #irrlicht on irc.libera.chat
Code snippet repository: https://github.com/mzeilfelder/irr-playground-micha
Free racer made with Irrlicht: http://www.irrgheist.com/hcraftsource.htm
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Hmmm I wouldn't advise a waypoint graph, especially for 3D space... You'd want something like a navmesh I guess.. You'd just mark out 3D shapes where you can or can't go and then pathfind within those, maybe by using their vertices or something... It's not a particularly simple thing to get decent pathfinding going on so it may depend on how good you want it to look... If your game is mostly in space with most of the space being traversable then maybe you could just use a really simple approach such as keep going ahead until an object is detected near enough in front of you to make you want to move around it. Then you go into some algorithm to find the best way to go around that object, which could be as complex or simple as you like.. i.e. you could just start turning in one direction until you can't see it anymore and then continue onwards and then trace your way back behind it. Or you could determine which direction you should turn in to get round it quickest...
Image Image Image
Post Reply