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: Counter Object Projects  (Read 1656 times)

« on: April 09, 2010, 07:06:33 PM »
Just for fun, I thought it may be useful for some people to see how to use the Counter Object to maintain state.

Here are two example projects which don't use any scripts at all. The logic is implemented using only Event objects and Counter Objects. I will probably add a few more when I have some spare time.

1) Combination Lock - enter the code to unlock.
2) A simple 4 BIT Binary Counter - press enter to count in binary from 0 to 15.

You will need 3DRAD v6.43 or higher.
« Reply #1 on: April 09, 2010, 07:30:05 PM »
pretty cool! the combination lock was easy to break though just going up and down along the keyboard cracked it, but still a good idea.
the downside is the amount of objects needed as you could do this with just a text print and a single script, though it is cool to see that things like this can be done without any scripting  :).
using 3Drad 7.22

system specs:
Windows 7 Home Premium 64-bit
Intel(R) Core(TM) i5-3470 CPU @ 3.20GHz (4 CPUs), ~3.2Ghz
8 gig ram
Geforce GTX 650 1024 MB GDDR5
DirectX 11
« Reply #2 on: April 09, 2010, 07:36:15 PM »
the combination lock was easy to break though just going up and down along the keyboard cracked it, but still a good idea.

Yes I know. It's simple enough to add extra handling to reset the state when an incorrect key is pressed, which would prevent the cracking. But I was too lazy and it was just a demo! :)

I agree, of course it can be done with much fewer objects if you use a script. But it's interesting to see just what can be done without script.

Even if you do use a script, the counter object can still be very useful as a global variable because you can implement constraints without having to worry about it in the scripts.
« Last Edit: April 09, 2010, 07:52:07 PM by ulogix »
« Reply #3 on: April 09, 2010, 11:48:40 PM »
Hi
I have done a script version of FSM it uses switch() to select the state. I have used another script (text input) that sends the state input value but you could use any other thing like keyboard, joystick, mouse,  even some AI script or a combination of more than one.

I have not done anything with FSM before but I found the above article very interesting and thought I'd try a basic version of it. I'm not sure how true I have followed the guide lines though.

Basic commands are:
walk
path a
path b
or just press return to stop

a small sentence like 'follow path a' will work.

n_iron
« Reply #4 on: April 10, 2010, 04:13:30 PM »
hi n_iron can you tell me which 3drad version you have ? 
« Reply #5 on: April 10, 2010, 08:01:38 PM »
Hi singh
 3DRAD45
Pages: [1]