rpg interface in torque
by Bruno Lachapelle · in Torque 3D Professional · 11/14/2011 (1:02 pm) · 15 replies
Hello.
Weeee my first post.
I bough torque few weeks ago. Great, the next update is Documentation :D
There is lots of info on forum, but really hard to get uptodate info by the search.
A new doc its well apreciated, I hope it will explain how the "game" work and not only script/code/art
My goal, beside learning, is to build rpg persistent world, how many players...maybe 8-16.
Atm the game can work local/single or connect to the server. (using sqlite3 its easy to keep database into a client/server build)
You can drop/pickup item and equip/unequip weapon/tool type of item.
I will add few tradeskills, crafting, mining and a quest system.
The player will have first/3rd person view and I will try keep the "shooter" style of the game.
In this image its the skills menu. You gain skills when execute task ingame.
The chat menu show the player receiving skill of dodge, because he get hit by a flying projectile.
The skills menu show image of the skill, the rank of the skill and the bar at bottom is the progression to a new rank.
More info in others news.
Bruno
Weeee my first post.
I bough torque few weeks ago. Great, the next update is Documentation :D
There is lots of info on forum, but really hard to get uptodate info by the search.
A new doc its well apreciated, I hope it will explain how the "game" work and not only script/code/art
My goal, beside learning, is to build rpg persistent world, how many players...maybe 8-16.
Atm the game can work local/single or connect to the server. (using sqlite3 its easy to keep database into a client/server build)
You can drop/pickup item and equip/unequip weapon/tool type of item.
I will add few tradeskills, crafting, mining and a quest system.
The player will have first/3rd person view and I will try keep the "shooter" style of the game.
In this image its the skills menu. You gain skills when execute task ingame.
The chat menu show the player receiving skill of dodge, because he get hit by a flying projectile.
The skills menu show image of the skill, the rank of the skill and the bar at bottom is the progression to a new rank.
More info in others news.
Bruno
#2
Nice work with the GUI stuff - that's actually where the docs are very slim and most people have trouble. All you need is to skin it with some sweet graphics and you're in business!
11/14/2011 (2:46 pm)
But a computer game is only script, code and art (video, audio and story).Nice work with the GUI stuff - that's actually where the docs are very slim and most people have trouble. All you need is to skin it with some sweet graphics and you're in business!
#4
The Full example is a basic fps shooter game example?
More detail on the scripted shooter game example, how is intended to work?
What happen when we start a game, witch function is involve step by step.
Tutorial explaining the script gameCore.cs function.
This kind of stuff.
11/14/2011 (3:55 pm)
@ Richard: A computer game its only this, what i mean is example to explain the mechanic of a shooter game. Something about how the Full project demo work in the advance section of the online doc?The Full example is a basic fps shooter game example?
More detail on the scripted shooter game example, how is intended to work?
What happen when we start a game, witch function is involve step by step.
Tutorial explaining the script gameCore.cs function.
This kind of stuff.
#5
A full explanation of gameCore.cs is not included. However, gameCore.cs is only a very small part of the scripts anyway - your best bet is to use Torsion to step through the code and find out where it goes. We'll be fixing and adding to the online documentation, though, so hopefully we'll be able to help you out.
11/14/2011 (5:16 pm)
The new tutorial explains how to build a relatively simple first person deathmatch game and gives some examples of how to control the flow of the battles in your level, how to add some features like killing streaks and how to use triggers to cause events in your game. Since it's a tutorial and only about 550 pages (tons of images) it doesn't go into exhaustive detail, but we did try to point you in the right direction.A full explanation of gameCore.cs is not included. However, gameCore.cs is only a very small part of the scripts anyway - your best bet is to use Torsion to step through the code and find out where it goes. We'll be fixing and adding to the online documentation, though, so hopefully we'll be able to help you out.
#6
11/14/2011 (5:58 pm)
Nice work! Keep it up! and welcome to the community
#7
Thanks for comment.
I will add more interaction of interface with the game, with a better look.
- ...all the 1.2 package is incredibly hot!!
11/16/2011 (5:36 am)
@ Richard: Thanks for all the information, wow the new document is really impressive!Thanks for comment.
I will add more interaction of interface with the game, with a better look.
- ...all the 1.2 package is incredibly hot!!
#8
Each object has to be tied to a datablock which defines pretty much every information that never changes on the object (max speed, gravity, density, etc, etc.) but also let you define it's "class" which is the namespace that will receive all the events related to this object.
So for example if you want to do something to your DefaultPlayer object, when the onDammage() event is raised, if you assigned to it the class "PlayerCallBack" , you would create a function:
function PlayerCallBack::onDamage(%this, %obj, %delta)
and this function will be called everytime your guy gets shot.
Now i'm pretty much a noob but this is the essence of torque scripting, if you need like, new, more specific events, that's where you need to edit the sourcecode of the engine to insert this new hook.
Which is beyond the scope of my lengthly explanation, and beyond the scope of my own competences.
11/19/2011 (12:44 am)
Bruno, basically from the script side you can create instances of specific script exposed engine objects (Player, Weapon, etc...) which also expose "event" functions tied to various things that can happen to these objects.Each object has to be tied to a datablock which defines pretty much every information that never changes on the object (max speed, gravity, density, etc, etc.) but also let you define it's "class" which is the namespace that will receive all the events related to this object.
So for example if you want to do something to your DefaultPlayer object, when the onDammage() event is raised, if you assigned to it the class "PlayerCallBack" , you would create a function:
function PlayerCallBack::onDamage(%this, %obj, %delta)
and this function will be called everytime your guy gets shot.
Now i'm pretty much a noob but this is the essence of torque scripting, if you need like, new, more specific events, that's where you need to edit the sourcecode of the engine to insert this new hook.
Which is beyond the scope of my lengthly explanation, and beyond the scope of my own competences.
#9
Also bruno could you help me out and point my in the direction you took.
11/19/2011 (1:26 am)
Wonderful Job, I'm trying to do the same thing you are. I am also new and trying to find info, and work out ware to put my functions. Kyrah you mentioned altering the engine. would that be Torque 3D Pro 1.2\Engine\source\main.c++.Also bruno could you help me out and point my in the direction you took.
#10
I've never modified any of the torque game objects, sorry.
11/19/2011 (4:31 am)
I've no idea Greyfort, the only thing i ever altered was to add a sha1 computing command to torquescript.I've never modified any of the torque game objects, sorry.
#11
I also am trying to do something similar as posted.
http://www.garagegames.com/community/forums/viewthread/128567
Perhaps together we could help each other, you have found more things then I have been able to but I am still new learning T3D.
Email me if you can help. Greyfort_1@hotmail.com
11/19/2011 (3:38 pm)
Wonderful job Bruno.I also am trying to do something similar as posted.
http://www.garagegames.com/community/forums/viewthread/128567
Perhaps together we could help each other, you have found more things then I have been able to but I am still new learning T3D.
Email me if you can help. Greyfort_1@hotmail.com
#12
@ Greyfort: The inventory as you see it in the video is only scripted. The only source change, is the sqlite3. www.garagegames.com/community/resources/view/18425/
The menu is build with GuiWindowCtrl/GuiScrollCtrl/GuiDynamicCtrlArrayControl
-On the first onWake I build all the slot by script. A container named with a slotID and a bitmap.
-Create multid array to keep each item data (you can use scriptobject if you want)
-Then use onRightClick, onMouseDragged, onControlDropped on each slot name function.
-Get the item data in the array with the slot id.
Search onRightClick in the script manual, it can be use with ceveral button type member, in each of 10 Member list topic.
So you can call myGuiControlButtonType::onRightClick(..) in your gui scirpt.
11/19/2011 (7:14 pm)
@ Kyrah: Thanks, the engine run script function by the class define in the datablock. Everyday its a bit more clear.@ Greyfort: The inventory as you see it in the video is only scripted. The only source change, is the sqlite3. www.garagegames.com/community/resources/view/18425/
The menu is build with GuiWindowCtrl/GuiScrollCtrl/GuiDynamicCtrlArrayControl
-On the first onWake I build all the slot by script. A container named with a slotID and a bitmap.
-Create multid array to keep each item data (you can use scriptobject if you want)
-Then use onRightClick, onMouseDragged, onControlDropped on each slot name function.
-Get the item data in the array with the slot id.
Search onRightClick in the script manual, it can be use with ceveral button type member, in each of 10 Member list topic.
So you can call myGuiControlButtonType::onRightClick(..) in your gui scirpt.
#13
11/20/2011 (5:15 pm)
I see the right and left mouse button but I must have missed middle button. Thanks for the, link the links to the files seem to be broken. But its wonderful information to read through.
#14
Maybe the middle mouse button dont work in the gui.
If you use it as a bind, maybe you can tell middlemouse do different action when its hover something. Depend what you want to do with the middle mouse.
For sqlite im currently testing this:
www.garagegames.com/community/resources/view/21238
www.garagegames.com/community/resources/view/21253
Thanks to Fyodor and all others.
11/20/2011 (5:24 pm)
I dont remember exactly but you can file the file in another place.Maybe the middle mouse button dont work in the gui.
If you use it as a bind, maybe you can tell middlemouse do different action when its hover something. Depend what you want to do with the middle mouse.
For sqlite im currently testing this:
www.garagegames.com/community/resources/view/21238
www.garagegames.com/community/resources/view/21253
Thanks to Fyodor and all others.
#15
11/21/2011 (10:02 pm)
Just stumbled across this thread. Very nice progress! I've only dabbled with various RPG scripts for Torque, but nothing as well thought out as this path. Keep up the good work.
Rich H
Default Studio Name