Please login or register.

Login with username, password and session length
Advanced search  


This forum provides RSS feed. To query recent posts use this url. More...

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - Jyujinkai

Pages: [1] 2 3
Game design / MOVED: Export to Direct 3D (*.x) from Cinema 4D.
« on: September 18, 2009, 05:09:06 AM »

If i am loading entities with a script somthign like this....

Code: WME Script
  1. LoadB = Game.LoadEntity("entity\B\B.entity");
  2. LoadB.X = 500;
  3. LoadB.Y = 400;

How do you determin the order they are drawn on screen. The script loaded entites seam to load behind the 3D actor.

I assume it has somthing to do with Layer.InsertEntity ... but i am not sure how to use it?

Technical forum / Confused about ANGELS and RADIANS (Math.Cos / Math.Sin)
« on: January 04, 2009, 04:08:58 AM »
Code: WME Script
  1. Math.Sin();
  2. Math.Cos();

In the manul it says....

Code: WME Script
  1. Cos(Angle)
  2. Returns the cosine of a number
  4. Parameters
  5. Angle
  6. Angle in degrees
  8. Sin(Angle)
  9. Returns the sine of a number
  11. Parameters
  12. Angle
  13. Angle in degrees

I was woundering is the input value here a RADIAN or a ANGLE. It says it returns an angle in degrees, but I am not sure what format gose into it....

I "think" it is radians.. is this correct?

I am trying to do somthign that seams simple but I can not get it to work.

What I am trying to do is move a sprite from one point on the screen to another and CURVE while doign it instead of movign alogn a strait line.

Any ideas on hwo to do this?

I have this code... but it returns a wonky curve... mabey it can be improved or there is another way to do this?

Code: WME Script
  1. on "LeftClick"
  2. {
  3.   var FireBall = Game.LoadEntity("actors\fireball\fireball.entity");
  4.   FireBall.X = actor.X;
  5.   FireBall.Y = actor.Y - actor.Height;
  6.   FireBall.Active = true;
  7.   var Slope =  (this.Y - (actor.Y - actor.Height)) / (this.X - actor.X);
  8.   var curve_size = 3;
  9.   Game.Msg(Slope);
  10.   while (FireBall.X  <  this.X) { // shoot left 
  11.         FireBall.X = FireBall.X + 4;
  12.         FireBall.Y = FireBall.Y + 4 * Slope;
  13.         FireBall.Y = FireBall.Y + Math.Sin( (-1*180)* FireBall.X / ( actor.X - this.X ) ) * curve_size; 
  14.         Sleep(20);
  15.   }
  16.   while (FireBall.X > this.X) { // shoot Right
  17.         FireBall.X = FireBall.X - 4;
  18.         FireBall.Y = FireBall.Y - 4 * Slope;
  19.         FireBall.Y = FireBall.Y + Math.Sin( (-1*180)* FireBall.X / ( actor.X - this.X) ) * curve_size; 
  20.         Sleep(20);
  21.   }
  22.   FireBall.Active = false;
  23. }

This code takes the X,Y of the player actor as one point to move teh sprite from and the X,Y of the spriet entity that you click on as teh XmY of where the sprite is ment to end up.

Demo Of how it is now
Source used in Demo

Hi there... I have made a complex maths thing... and I am not sure if i am translating it into WME properly as it is going all wierd but on paper it works fine when i work it out with values....

Anyway here we go... In this I have shown the MATHS version followed by how i wrote the same thign in WME....

If you can please have a look and tell me if i translated the MATHS into WME script correctly.

Thanks in Advance.

Code: WME Script
  1. // Lets find the X,Y of H.
  2. var Xh;
  3. var Yh;
  5. // Original Math:- D1 = sqrt((Xa - Xb)^2 + (Ya - Yb)^2)
  6. var tmpXpow1 = (Xa-Xb);
  7. var tmpXpow2 = Math.Pow(tmpXpow1,2);
  9. var tmpYpow1 = (Ya-Yb);
  10. var tmpYpow2 = Math.Pow(tmpYpow1,2);
  12. var tmpD1 = tmpXpow2+ tmpYpow2;
  13. var D1 = Math.Sqrt(tmpD1);
  15. // Original Math:- (Xm ,  Ym) = ((Xa + Xb) / 2 , (Ya + Yb) / 2)
  16. var Xm = (Xa + Xb) / 2;
  17. var Ym = (Ya + Yb) / 2;
  19. // Original Math:- g1 = (Ya - Yb) / (Xa - Xb)
  20. var g1 = (Ya - Yb) / (Xa - Xb);
  22. // Original Math:- g2 = -1 / g1
  23. var g2 = -1 / g1;
  25. // Original Math:- phi = atan(g2)
  26. var phi = Math.Atan(g2);
  28. // Original Math:- D2 = D1 * tan(K) / 2
  29. var tanK = Math.Tan(K);
  30. var D2 = D1 * tanK / 2;
  32. // Original Math:- (Xh , Yh) = (Xm + D2 * cos(phi), Ym + D2 * sin(phi))
  33. var cosPHI = Math.Cos(phi);
  34. Xh = Xm + D2 * cosPHI;
  36. var sinPHI = Math.Sin(phi);
  37. Yh = Ym + D2 * sinPHI;
  40. function ArcData(Xa, Ya, Xb, Yb, Xh, Yh)
  41. {
  42. /*Original Math Xc = [(Ya - Yh)(Xb^2 + Yb^2) + (Yh - Yb)(Xa^2 + Ya^2) + (Yb - Ya)(Xh^2 + Yh^2)]
  43.                                 -------------------------------------------------------------------------------
  44.                                                         2*[Xb*Ya + Xa*Yh + Xh*Yb - Yb*Xa - Ya*Xh - Yh*Xb]                      */
  45. var XbP = Math.Pow(Xb,2);
  46. var YbP = Math.Pow(Yb,2);
  47. var XaP = Math.Pow(Xa,2);
  48. var YaP = Math.Pow(Ya,2);
  49. var XhP = Math.Pow(Xh,2);
  50. var YhP = Math.Pow(Yh,2);
  52. var Xc = ((Ya-Yh)*(XbP+YbP)+(Yh - Yb)*(XaP+YaP)+(Yb-Ya)*(XhP + YhP)) / 2*(Xb*Ya + Xa*Yh + Xh*Yb - Yb*Xa - Ya*Xh - Yh*Xb);
  53. //Yc = [(Xa - Xh)(Yb^2 + Xb^2) + (Xh - Xb)(Ya^2 + Xa^2) + (Xb - Xa)(Yh^2 + Xh^2)]
  54. var Yc = ((Xa-Xh)*(YbP+XbP)+(Xh - Xb)*(YaP+XaP)+(Xb-Xa)*(YhP + XhP)) / 2*(Yb*Xa + Ya*Xh + Yh*Xb - Xb*Ya - Xa*Yh - Xh*Yb);
  56. // Original Math:- r = sqrt((Xa - Xc)^2 + (Ya - Yc)^2)
  58. var r1 = (Xa-Xc);
  59. var r2 = (Ya-Yc);
  60. var r3 = Math.Pow(r1,2);
  61. var r4 = Math.Pow(r2,2);
  62. var R = Math.Pow((r3+r4),2);
  64. /*Start angle = angle between horizontal and the line joining C and A = atan2(Ya - Yc, Xa - Xc)
  65. Finish angle = angle between horizontal and the line joining C and B = atan2(Yb - Yc, Xb - Xc)                          */
  67. var Sag1 = Ya - Yc;
  68. var Sag2 = Xa - Xc;
  69. var Eag1 = Yb - Yc;
  70. var Eag2 = Xb - Xc;
  71. var Sag = Math.Atan2(Sag1,Sag2);
  72. var Eag = Math.Atan2(Eag1,Eag2);
  75. /*4) any angle between the start angle and finish angle will give you a point along the arc, so you can use code like the following pseudo code to generate these points:
  77.   for each angle theta between the start angle and finish angle do the following
  78.     calculate the x coordinate as Xp = Xc + r * cos(theta)
  79.     calculate the y coordinate as Yp = Yc + r * sin(theta)
  80.     output the point on the arc as (Xp,Yp)                                          */
  82. var CosAG = Math.Cos(Sag);
  83. var SinAG = Math.Sin(Sag);
  84. var Xp1 = Xc + R * CosAG;
  85. var Yp1 = Yc + R * SinAG;
  87. var CosAG1 = Math.Sin(Eag);
  88. var SinAG1 = Math.Sin(Eag);
  89. var Xp2 = Xc + R * CosAG1;
  90. var Yp2 = Yc + R * SinAG1;

Technical forum / How exactly do you load a sprite many times on screen?
« on: January 02, 2009, 01:51:50 AM »
Mabey i am to tired or somthing but i am unable to see how to load a sprite onto the screen?

All i want to do is use a script to load a single sprite many times in diffrent places on the screen...

Code: WME Script
  1. on "LeftClick"
  2. {
  3. Game.Msg("test");
  4. var temp = Game.LoadEntity("scenes\Room\button.sprite");
  5. temp.X = 70;
  6. temp.Y = 41;
  7. }

This is the code of the left click event i am using... all it is ment to do is load button.sprite and palce it at 70,41?

Technical forum / Problem With sending actor.goto commands form array.
« on: December 30, 2008, 05:59:01 PM »
Hi there...

I have a number of actors stored in an array.

I am using this code to loop through the array and (just for a test) do somthing, in this case walk to a point on screen.

Code: WME Script
  1. for (var a=enemy_count; a>=0; a = a-1)
  2.                         {
  3.                         var temp = EnemysToFight[a];
  4.                         temp.GoTo(562, 525);
  5.                         Game.Msg(a);
  6.                         }

enemy count is the number of items in the array.
EnemysToFight = The name of the array.

Anyway the thign is it works... the actors all move one by one to the point i said to but ... I still get an error even though everything looks like it works?

Runtime error. Script 'scripts\EnemyAttackLoop.script', line 11
Call to undefined method 'GoTo'. Ignored.


A couple of questions about .X file use.


I know that you are able to change textures on a .X file in a live scene. So for example you can put on a new shirt and the script changes the png that is loaded on the .X file and it will instantly change in front of the players eye.

I was wondering can you do this for actors themselves. As in is there a way, with out changing the scene, to have a new Actor load onto screen in the exact same position as the old one....

EG:- You are wearing Pants and a Shirt and boots. You then put on a dress. A dress needs a different 3D model to pants.

I know though scripting that you can get actor position and direction. So it shouldn't be hard to load a new actor into the correct position for when you put on the dress, but as far as I know you need to load all the actors when the scene loads. If you can load a 2nd actor file but not have it display in the scene, and then remove one and activate the other.. maybe it could be done that way..., but can it be done in front of the players eye?

If you can not get the model to change in front of the user, could you do it with say, something like the character goes behind an object (for modesty sake) to change, then when you walk back out you are seeing the new model?.. the point is can you change the model with out re-loading the scene.

Any ideas?


You know how you can load different animations though separate .X files onto a main actor .X file. How exactly dose this work? I assume it simply takes the transform information on the bones and applies it to the .X file you have loaded.

Would this mean that if I had different models, that used the same rig, so all the bones are exactly the same, but use a different Skin set up on the mesh itself... would these all still be transferable?

EG:- Pants vs Dress. You could build a skeleton rig that is exactly the same that would drive both models even though they are different meshes. But the Dress would have a very different vertex weighting skin to that of the pants.... if only the transform data is shared this should not be a problem. (dose this make sense?)

Thanks in advance.

Game design / How to write a script for a adventure game?
« on: September 11, 2008, 06:43:03 AM »
I was wondering if anyone had any tips on how to put together a script document for a adventure game. I have been trying to write one but the multi-path responses from the user, the multi-path replies from the game npc, the variations of each "use an object' type thing etc etc.. means the script is very hard to format in a way that is easy to read.

I was wounding if anyone has any advise or maybe an example on how to format one of these documents.

Game design / What makes a good adventure?
« on: July 21, 2008, 02:51:09 PM »
I am interested in opinions on some game design issues for my project. So i thought i would discuss some thing in here and see what others opinions might be. As far as I know there seams to be only a few variations in adventure games really....

  • Item Combination Puzzles - (eg:- find the tape deck, find the tape, combine, listen, get the clue or a multitude of other types of "find the item and use it"
  • Puzzle Mini-games - (Open the locked box by figuring out the "code / order" of pressing the buttons - or other types of puzzles say "move the jumbled images around to make a painting")
  • Word Puzzles - (decode the parchment to find the clue)
  • Massive story based text (Read the logs of the dead scientists to find the code to unlock the dna fridge)
  • Conversations - Speak to people to unlock more of the game / find the clues
I would be interested in other "devices" of game play that may be explored in adventure games.

Also one of the weird things about adventure games is you often, as the player, have no idea when you start. Say you live in New Orleans, but in fact you do not know where anything is so "find the location" to advance the game. I mean how many adventure games start with a toon waking up with no idea where he is, or starting in a very generic location we can all relate to like an office. Still life for example you play a cop.. but you do not know how to gather evidence at first... OH... ultravilote light will illuminate blood... why did that character forget that?

Game Death had a nice discussion a while back -

I am interested in other game devices that could be used in a adventure game sertting.... as I am starting to get stuck for something a bit more interesting after 15+ years of adventures.

My game for example is using a thing we are calling reaction clicking... where set animations sequences run and the user clicks to change the "path" of the scene.. simple example... You stumble while walking across a thin bridge... while unballenced you click.. and stay up and can walk to a new zone on level 2 or fall to level one and continue from there. This is us trying somthing not new.. it has been done many times.. but not done often.

ARE there other ways to navigate a story in a adventure style game besides those listed? -


Technical forum / How would i go about this?
« on: June 18, 2008, 10:39:31 AM »
My limited programming skills need some help :)

I basically have a room that is like the hollo-deck in startrek. Where there is a object that will run a ogg file that morphs the entire room into a new room.


How would i go about making walking areas and clickable things that are only active when the  correct background is displayed?

I was wondering how you guys are solving the problem of having shadows from your sets affect your 3Dactors, and how lighting colour affects them as well. I have tried using coloured regions but they turn on as soon as the model walks into them and this colours the entire model.

I have been playing with rendering my shadows as a separate pass and then using come kind of overlay trick but i can not see how to get a 2D overlay to sit on top of the 3D actor.

Anyway.. how are you guys handeling this.. and do i need to work it out i heard rumors that these issues are addressed in the new wme scene editor that is on teh cards.

I have been playing with a sequence where the player actor is in fact a space ship, that you are moving about on a large scrolling scene.

So far i have been using normal 2D walk path type stuff.. using forced perspective to give the illusion that you are moving freely. Still while doing this i thought i would ask if there is any way to have up and down , diagonal up etc etc for actor3D movement.. off the ground plan of your background 3ds file.

I am pretty sure you can not do this.. but thought i would ask.

Technical forum / Maya Pipline solutions...
« on: April 12, 2008, 03:39:17 AM »
Hi I am not a maya user so I do not know how to go about this.

I was wondering what Maya solutions are available for .X export?

Pages: [1] 2 3

Page created in 0.085 seconds with 17 queries.