3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1]

Author Topic: Education Game help  (Read 2392 times)

« on: September 13, 2009, 03:57:11 AM »
Hi! I have been trying to make an education game but I stuck and I need your help. I'm sending you an example to see what help I need. In this example I want the questions and the answers to be generated randomly(to be true ;D). The example is made with rigidbody and with text print but it can be made with different objects(sprite, skinmesh etc.) Has anyone worked with this kind of game or made a project ? Thanks, Philip.
« Last Edit: January 21, 2010, 03:28:29 PM by Philip »
« Reply #1 on: September 13, 2009, 04:12:05 AM »
Download the free version of TimzAttack here; http://www.bigbrainz.com/
Its made in Unity, but I think could be done in 3Drad very easily.
 
« Reply #2 on: September 13, 2009, 04:19:28 AM »
Hi ParanoiaNonsense! It looks cool! My problem is generating questions and answers in the game and how can they be implemented. I know it can be made in 3D Rad or else I wouldn't post right? ::)
« Reply #3 on: September 13, 2009, 04:30:55 AM »
I think you need to speak to a script guru for this (I'm just a newbie).

My suggestion, if it is possible in 3Drad, is to have an external flat file containing all the questions (and answers). The first 3 charcters of the record would contain an index (000 to 999 for example).

When you pass into the EOL in your game it would call a script which will randomly "read" an index (say the first 3 characters of the record), and access one of the questions in the external file (randomly between 000 to 999) and display it.

This seems the easiest solution to me, but I'm no expert in this scripting language yet. Hope that helps.
« Reply #4 on: September 13, 2009, 04:52:03 AM »
I think you need to speak to a script guru for this (I'm just a newbie).
That's what I'm going to do. I''ll wait for a guru answer  :)
« Reply #5 on: September 13, 2009, 06:23:53 AM »
Not sure I totally get what you're after but you could use 2 arrays, 1 for questions and 1 for answers.

Ex :

string[] q(1000);
string[] a(1000);
int rnd;

q = {
   "How long is a cord?",
   "How heavy is a rock?"
};

a = {
   "Long enough",
   "Not very light"
};

And then you can use iFloatRand(0,1000)  to access random questions :

if (logic to ask a question)
{
  float frnd = iFloatRand(0,1000);
  rnd = frnd; //convert to int

  //Output to textprint
  OUT_22=q[rnd];
}

if (logic to get answer)
{
   //Output to textprint
  OUT_22=a[rnd];
}





« Last Edit: September 13, 2009, 06:25:26 AM by shadmar »
« Reply #6 on: September 13, 2009, 08:33:14 AM »
Hi shadmar! I saw your code and that may be the soltion but I don't understand it. Can you or someone else make a project? Maybe that way I will figure it out... ???
« Reply #7 on: September 13, 2009, 09:07:22 AM »
string[] q(1000);
This is a List of 1000 questions (you can change the number of questions)

You have to fill the "q" list with questions like that:
q = {"How long is a cord?","How heavy is a rock?","What is the meaning of life?",.......until you have your 1000 questions};

q[0] is the first question of the "q" list -> "How long is a cord?".

You do the same for Answers: string[] a(1000);.

Then you use
float frnd = iFloatRand(0,999);
to choose a random question.
frnd = the position of the question in the list
(0,999) -> Adjust 999 to the number of questions you filled in your list -1 (because the first question is at position 0)

you print the question on screen with OUT_22 (your textprint OBJ) = q[rnd] (question random position "rnd").

Then you do what you have to do to get the answer or to explain it...

The Answer is: a[rnd]

Hope it help...
« Reply #8 on: September 13, 2009, 10:15:41 AM »
Thanks IronF! Thank you, but it would be great if you(or anyone else) can post it as a project (everything put up together to understand it better) . If you can't, OK you have done enough with the explanation. Thanks anyway, Philip.
« Last Edit: January 21, 2010, 03:28:51 PM by Philip »
« Reply #9 on: September 14, 2009, 08:45:18 AM »
I wont make your game for you, you have to learn how to script, all I can do is this sample (far from being perfect  ;D ).
« Reply #10 on: September 14, 2009, 11:49:13 AM »
Thanks IronF for the example.
Pages: [1]