Student seeking inspiration!
by Ashley Wallace · in Torque 3D Beginner · 03/27/2014 (4:47 am) · 15 replies
I'm Ashley - I'm a second year student in university and for my Game Development and Design module of this course i'm creating a "psychic" detective'esk style game in torque, like "la noire" but the character has past visions when he interacts with a clue...
sorry for my noobie'ness.
Regards - Ashley
https://www.dropbox.com/s/2gnxf1oiabzp69k/in%20torque%20-%20looks%20awesome%21.jpg
This is an example of a demo - quite proud of it ... the issue with the bookcase is now fixed by changing the alpha settings in the materials editor and I'm also using a vignette filter which is not really visible in this image... i wanted to give the "game" an eerie feel and horror vibe as i'm going to try and implement subtle ghostly figures to pop up for a second in the players view to outline the characters "medium" ability... when the player interacts with a clue it will trigger a cut-scene which is a past vision on how the clue was placed there. The player can interact with any item in the room but it will throw a message in the GUI that says "this isn't important" if its not an important clue.
I would much appreciate any tips/hints/advice/inspiration/resources that you guys could possibly offer?
Ive got to do 200 hours of work and i've got 92.5 logged and 4 weeks to go D:
sorry for my noobie'ness.
Regards - Ashley
https://www.dropbox.com/s/2gnxf1oiabzp69k/in%20torque%20-%20looks%20awesome%21.jpg
This is an example of a demo - quite proud of it ... the issue with the bookcase is now fixed by changing the alpha settings in the materials editor and I'm also using a vignette filter which is not really visible in this image... i wanted to give the "game" an eerie feel and horror vibe as i'm going to try and implement subtle ghostly figures to pop up for a second in the players view to outline the characters "medium" ability... when the player interacts with a clue it will trigger a cut-scene which is a past vision on how the clue was placed there. The player can interact with any item in the room but it will throw a message in the GUI that says "this isn't important" if its not an important clue.
I would much appreciate any tips/hints/advice/inspiration/resources that you guys could possibly offer?
Ive got to do 200 hours of work and i've got 92.5 logged and 4 weeks to go D:
#2
Also I wanted to implement the ghost in the next level which is like a maze, I was hoping to have the figure in the world as a static shape made invisible but when the cross hair crosses its path it will pop up for a few seconds? or perhaps basically a trigger object which plays an eerie sound and makes the object flash up for 2 seconds (providing the player is looking at it)
03/27/2014 (7:22 am)
that could be one way to do it. the coder in my group is currently looking at the torque cookbook and there is a tutorial on there on how to click on objects in the scene using the cross hair (client side).. with that collision method can you have it so the function is only active when the player is a certain distance away from the clue? i don't want the player to interact with a clue from the opposite side of the room if that makes sense.Also I wanted to implement the ghost in the next level which is like a maze, I was hoping to have the figure in the world as a static shape made invisible but when the cross hair crosses its path it will pop up for a few seconds? or perhaps basically a trigger object which plays an eerie sound and makes the object flash up for 2 seconds (providing the player is looking at it)
#3
Here is the engine document block (from source/scene/sceneContainer.cpp):
As for the ghosts, triggers probably would work great - you can set an object's visibility using its Visible property:
Actually, it might be a fun thing to use a particle effect with....
03/27/2014 (9:17 am)
I have to review the method in the cookbook - I believe Dave just did the raycast straight into the scene from the camera node down the camera vector (thus achieving the crosshair target). You can restrict distance using either method (if my assessment of Dave's method is correct) by simply reducing the range (length) of the ray cast -// find end of search vector
%ray = VectorScale(%ray, 2000); // change 2000 to the world unit length you want
%end = VectorAdd(%start, %ray);
// set up to look for the terrain
%searchMasks = $TypeMasks::TerrainObjectType; // alter this to include object type masks that you need.
// search!
%scanTarg = ContainerRayCast( %start, %end, %searchMasks);Here is the engine document block (from source/scene/sceneContainer.cpp):
DefineEngineFunction( containerRayCast, const char*, ( Point3F start, Point3F end, U32 mask, SceneObject *pExempt, bool useClientContainer ), ( NULL, false ), "@brief Cast a ray from start to end, checking for collision against items matching mask.nn" "If pExempt is specified, then it is temporarily excluded from collision checks (For " "instance, you might want to exclude the player if said player was firing a weapon.)n" "@param start An XYZ vector containing the tail position of the ray.n" "@param end An XYZ vector containing the head position of the rayn" "@param mask A bitmask corresponding to the type of objects to check forn" "@param pExempt An optional ID for a single object that ignored for this raycastn" "@param useClientContainer Optionally indicates the search should be within the " "client container.n" "@returns A string containing either null, if nothing was struck, or these fields:n" "<ul><li>The ID of the object that was struck.</li>" "<li>The x, y, z position that it was struck.</li>" "<li>The x, y, z of the normal of the face that was struck.</li>" "<li>The distance between the start point and the position we hit.</li></ul>" "@ingroup Game")
As for the ghosts, triggers probably would work great - you can set an object's visibility using its Visible property:
// in trigger onTriggerEnter() callback script:
// need to set %ghostObject to an id stored on the trigger object
%trigger.ghostObject.visible = true;
schedule(500, 0, "hideGhost", %trigger.ghostObject);// time, objID, function name, parameters
//
function hideGhost(%ghost)
{
%ghost.visible = false;
}As far as using the crosshair bit you'd probably use a callback every time your character moved to update the raycast and check for hits.Actually, it might be a fun thing to use a particle effect with....
#4
Also it sounds like you'd want to implement Game Mechanics Kit, if you are experienced enough to port it to the newer versions of the engine, which you likely are not but thought I should mention it anyways :) Maybe someone else has successfully ported it.
03/27/2014 (12:23 pm)
This thread can always come in handy!Also it sounds like you'd want to implement Game Mechanics Kit, if you are experienced enough to port it to the newer versions of the engine, which you likely are not but thought I should mention it anyways :) Maybe someone else has successfully ported it.
#5
03/27/2014 (12:32 pm)
Yeah, pester Raa - he's trying to port the GMK and it sounds like he pretty much has it done, just needs to push it back to Git.
#6
https://www.dropbox.com/s/ezqvs5axcibdfck/redone.jpg
(ignore the screen dump from the materials.cs - I have to evidence everything I do!
making some good progress I think, got a particle effect which highlights the "clues" I need to reduce the intensity of it also got some Arms in - ALTHOUGH Notice... Two Right Hands.... Duh! - easy fix though by reversing the geometry in Maya.
I've had to offset the arms so it appears in the camera view but when I look down the arms pretty much go underneath me. so I'm thinking this is to do with the origin point when I exported it from Maya... any ideas on the optimal position for the the origin point?
also got a containeraycast() working which tells me in console what item I've clicked ... all i need to do no is send it client side and tell it to DO Something... anyway!
Haven't yet implemented this "GMK" I didn't even know it existed; I will look it up, so far me and my group have implemented the features through trail and error but i think we are doing ok for 4 week old noobs'
Thanks
Sleep me thinks.
03/27/2014 (6:57 pm)
https://www.dropbox.com/s/1bau4t5mkuq17ii/particleeffects.jpghttps://www.dropbox.com/s/ezqvs5axcibdfck/redone.jpg
(ignore the screen dump from the materials.cs - I have to evidence everything I do!
making some good progress I think, got a particle effect which highlights the "clues" I need to reduce the intensity of it also got some Arms in - ALTHOUGH Notice... Two Right Hands.... Duh! - easy fix though by reversing the geometry in Maya.
I've had to offset the arms so it appears in the camera view but when I look down the arms pretty much go underneath me. so I'm thinking this is to do with the origin point when I exported it from Maya... any ideas on the optimal position for the the origin point?
also got a containeraycast() working which tells me in console what item I've clicked ... all i need to do no is send it client side and tell it to DO Something... anyway!
Haven't yet implemented this "GMK" I didn't even know it existed; I will look it up, so far me and my group have implemented the features through trail and error but i think we are doing ok for 4 week old noobs'
Thanks
Sleep me thinks.
#7
The flashlight is sweet and the particles are a good start. You guys are kicking ass!
03/27/2014 (8:58 pm)
For first person arms examine the Soldier in the Shape Editor to see how they're set up.The flashlight is sweet and the particles are a good start. You guys are kicking ass!
#8
You seem like a very talented bunch of people!
Could you share some more info about your team? How many are you and what roles do you fill?
Also when you are done, I'd love it if you could share the end result here on the forums!
The GMK allows you to easily create object interactions like opening doors etc, as well as adding a bunch of other things to the engine, it's worth taking a look at.
03/28/2014 (3:49 am)
Wow you've been doing great progress so far! It's really moving fast.You seem like a very talented bunch of people!
Could you share some more info about your team? How many are you and what roles do you fill?
Also when you are done, I'd love it if you could share the end result here on the forums!
The GMK allows you to easily create object interactions like opening doors etc, as well as adding a bunch of other things to the engine, it's worth taking a look at.
#9
The two left hands is actually hilarious. Please leave that in ;)
03/28/2014 (4:15 am)
I like the toon edges :). And those particles look pretty good, at least in screenshot!The two left hands is actually hilarious. Please leave that in ;)
#10
Objects and textures look nice, anyhow. :)
03/28/2014 (8:38 am)
Is the toon edges our "resident" (somewhere on the forums) shader or is it a custom jobbie?Objects and textures look nice, anyhow. :)
#11
03/28/2014 (10:56 am)
It was Matt jolly I believe! ;) I've also got the postfx GUI editor which I'm using the dream view on to emulate the hallucination when he sees the ghosts :)
#12
03/29/2014 (7:47 am)
Ashley, hope you chaps upload this for us unwashed masses to have playthrough once it's complete. Always nice to see different ideas.
#13
works when entering function name in console but im trying to assign it to key, i followed the same tutorial as the flashlight - set the key in default.bind and sent a server command called "highlightObjects and then called the function in commands.cs. but its still not working... is there an easier way than command to server?
03/31/2014 (4:30 am)
hey guys - struggling with a piece of code - i've got this function in server/games.cs - function highlightObjects(){
new SimGroup(Highlight);
foreach$(%group in "Objects Clues"){
foreach(%elem in %group){
//echo(%elem.getId() SPC %elem.getClassName() SPC %elem.getPosition());
%pos = %elem.getPosition();
%emitter = new ParticleEmitterNode() {
emitter = PlayerFoamDropletsEmitter;
position = %pos;
dataBlock = DefaultEmitterNodeData;
};
Highlight.add(%emitter);
}
}
}
function unHighlightObjects(){
Highlight.delete();
}works when entering function name in console but im trying to assign it to key, i followed the same tutorial as the flashlight - set the key in default.bind and sent a server command called "highlightObjects and then called the function in commands.cs. but its still not working... is there an easier way than command to server?
#14
Also, foreach is technically unsupported. And you should probably not use spaces in object names, so I don't know what this would really do:
Anyway, I'd have to see your keybind functions to know where this is going astray but I hope this helps you out.
03/31/2014 (6:59 am)
Quote:Server commands are not compilcated - but if that's what you're trying to do here you've made a grievous error: those should be named serverCmdhighlightObjects and serverCmdunHighlightObjects if this is how they are supposed to function. Then your calls would look like this:
is there an easier way than command to server?
// defined:
function serverCmdhighlightObjects(){
new SimGroup(Highlight);
foreach$(%group in "Objects Clues"){
foreach(%elem in %group){
//echo(%elem.getId() SPC %elem.getClassName() SPC %elem.getPosition());
%pos = %elem.getPosition();
%emitter = new ParticleEmitterNode() {
emitter = PlayerFoamDropletsEmitter;
position = %pos;
dataBlock = DefaultEmitterNodeData;
};
Highlight.add(%emitter);
}
}
}
function serverCmdunHighlightObjects(){
Highlight.delete();
}
// used:
commandToServer('highlightObjects');
// and
commandToServer('unHighlightObjects');Server commands (and client commands) have to be tagged in the function definition, but the system expects you to strip the tag when calling them, and you must use "tagged strings" when calling them as well. Tagged strings are enclosed in single quotes - the system sees this and assigns them to a lookup table the first time it uses each one. After that it sends an integer across the network instead of the whole string.Also, foreach is technically unsupported. And you should probably not use spaces in object names, so I don't know what this would really do:
foreach$(%group in "Objects Clues"){I would expect this to beforeach$(%group in "Objects_Clues"){but because the construct was added "by stealth" it is not as well documented as it should be. I'm guessing you're iterating through a SimGroup or SimSet for sub-groups....Anyway, I'd have to see your keybind functions to know where this is going astray but I hope this helps you out.
#15
anyway the next feature is using the dream filter... we are going to assign it to a key-press but only in this "psychic" mode can he see this image on the wall.. pretty confident to do this by creating the object on a key press but. is there anyway to have only this text in its original colour appear over the postfx filter ? - the postfx is done on render i believe; and it is done using this tutorial - http://www.garagegames.com/community/resources/view/21224 ... i dont know what code you'd need to see but i can post it if you let me know! :)
screenshot#1
03/31/2014 (10:47 am)
well i've got it working now - all i had to do was call the function in the default.bind.cs and it worked! hoorarr! anyway the next feature is using the dream filter... we are going to assign it to a key-press but only in this "psychic" mode can he see this image on the wall.. pretty confident to do this by creating the object on a key press but. is there anyway to have only this text in its original colour appear over the postfx filter ? - the postfx is done on render i believe; and it is done using this tutorial - http://www.garagegames.com/community/resources/view/21224 ... i dont know what code you'd need to see but i can post it if you let me know! :)
screenshot#1
Torque Owner Richard Ranft
Roostertail Games
As for having ghosts appear at the edges of the screen you could use GUI elements or actually add ghostly characters or objects to the scene. I think the GUI elements might be a little less labor intensive - you could use Charlie Patterson's Twillex system to "roll out" a GuiBitmapCtrl from one side of the screen or the other and then roll it back so it doesn't interfere with mouse clicks.