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.

Newcomers DBPro Corner / Need help making a random shape gen.

Author
Message
madcatz7
20
Years of Service
User Offline
Joined: 9th Jul 2004
Location:
Posted: 11th Sep 2004 16:19
Ok, I decided that My first game is going to be tetris (Its going to be in 2d) Ive loaded all my shapes (7 of them) and my backround backround they all load fine. But now I need a random shape gen. All I know is that It needs to be in a subroutine.
Any help will be appreciated. BTW, I'm using DB classic.

Thanks.
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 11th Sep 2004 19:19
not quite sure what you mean here, but if you want to select a shape at random to drop down the screen then you just pick one of the shapes image numbers at random, if your shapes are from 5 to 12 for example

shapenumber=5+(rnd(7))

will give you the numbers 5 to 12.


Mentor.

PC1: P4 3ghz, 1gig mem, 2x160gig hd`s, Radeon 9800pro w cooler (3rd gfx card), 6 way speakers.
PC2: AMD 2ghz, 512mb ram, FX5200 ultra, 16 bit SB.
Mini ATX cases suck.
madcatz7
20
Years of Service
User Offline
Joined: 9th Jul 2004
Location:
Posted: 12th Sep 2004 03:01
Sorry If I cant explain this well.

But yes, What I need is a Generater to pick a shape at random to drop down the screen.

I'll try the above way with a little editing in a bit. thanks
madcatz7
20
Years of Service
User Offline
Joined: 9th Jul 2004
Location:
Posted: 16th Sep 2004 10:05
bump

Login to post a reply

Server time is: 2024-09-23 00:27:45
Your offset time is: 2024-09-23 00:27:45