Dialogs RPG System

Hi everyone ,



Can you explain to me how you would do a Dialog System with all the npc on your game ?



I want to have like a database with everyname of npc and everydialogs in there , and if possible to have multiples dialogs by npc.



I also want that the text is progressive not instantanly if someone could just give me an idea of what to do that with nifty gui that would be very nice thanks a lot.

No, theres too many ways to do that

Start by having the NPC’s name show up on the screen in ortho mode. Get the NPC’s location and use the camera class to translate that into 2d screen coordinates, then draw your text (the NPC’s name) at that screen location.

Once you have that, then you can start listening to mouse clicks on areas where the NPC’s names are, and trigger Nifty dialogs to show up when a name is clicked on. How you back those dialog’s content is up to you.

thanks a lot sploreg that’s a good start ,



_ what is ortho mode ?

_ translate the camera into 2d screen coordinate ( you mean X and Z ? )

_ is there a way that i can database every npc dialogs in only 1 file with an ID per npc and link that to the java models ? or is that a better way to do that ?



All of suggestions are welcome

1 - Ortho mode means “not in 3d space”, the text will always appear on screen like a GUI

2 - use tha cam.getScreenCoordinates(Vecor3f v); it returns the screen coord of an object in 3d space (the position of your NPC for example). This is the coord where you print your NPC name gui

3 - As previously said, there are plenty of ways. The one you describe is one way (though i would not use 1 file for the entire game…maybe one file by Area of the game). Try it, that’s the better way to know if it works.

Understood master nehon , it’s always a pleasure to have guys like you to help , this forum is great thank you !