Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / V-Intern Project Coding Problems

Author
Message
MadShorter
9
Years of Service
User Offline
Joined: 2nd Mar 2015
Location:
Posted: 2nd Mar 2015 19:09
Hello,

Within V-Inter you have the edutainment game you need to create for a specific target demographic of Pr-Schoolers.

My game idea is to teach them the alphabet before they actually go into kindergarten. My only problem is I would like each object (Letter Block) To have their collision boxes off until they hit the correct letter first.

So when they would start they would need to hit the Letter A before they can hit the Letter B.

Would anyone happen to know the coding for what I need? To lock and unlock letter blocks once their hit within the correct order? I would like the letter block to disappear once they are hit as to get them out of the way.
I've attached an image in which shows the small bit of each letter collision box.

~ Coding Is Life ~

Attachments

Login to view attachments
Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 5th Mar 2015 19:30 Edited at: 5th Mar 2015 21:13
Hello,

When you say "they need to HIT a letter" I'm assuming that they need to move some object on the screen (a target or something) onto or through a letter object that is on the screen.

You can return either the state of collision between two objects or you can return the number of the object colliding with a specified object. You would be interested in the latter.

Since each letter is its own object number, it is that number that you will want to test for. You would need to keep track of the correct sequence of letters (1-26 for example) so you know which one you are testing for at any given moment.

When that particular number is to be tested, you call a collision routine between the target object and zero to return the object number the target is colliding with.

The values in the following code are for demo purposes. You would use whatever object numbers that you assign in your program:



Enjoy your day.

Login to post a reply

Server time is: 2024-11-21 12:10:09
Your offset time is: 2024-11-21 12:10:09