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 / Nice collission trick for n00bs (db 1.13 classic)

Author
Message
Compton
22
Years of Service
User Offline
Joined: 4th Dec 2002
Location:
Posted: 23rd Mar 2004 10:15
I just figured I'd post this here, since I've been fiddling with this problem a lot. I've noticed people using a Collission dll which to work with collission.

The problem is as followed:

You make a game with dummy boxes which works the collission fine, yet now u use .x objects and there seems to be no collission anymore.

My cheapo solution, which works fine:

Keep the boxes and make them hidden, and just have the program put your .x objects at the same places.

So basically you have "boxes around your enemies, etc" and it will work fine and dandy.

I figured this out myself, but lots of people will undoubdetly already know this. I just thought this would make a good addition to forum searches.

Have fun and keep on burning, schatjes. (honey's in dutch
Compton
22
Years of Service
User Offline
Joined: 4th Dec 2002
Location:
Posted: 23rd Mar 2004 10:18
first sentence: " I've noticed people using a Collission dll which to work with collission."

Is a typo, I ment to say : I've noticed people using a Collission dll which is just plain silly.
Van B
Moderator
22
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 23rd Mar 2004 11:04
People only tend to rely on collision .dll's when they want polygon perfect collision - like if they really must have bullet decals and super-accurate collision.

Personally I have very little love for DB's built in collision and usually opt for simplified collision methods like the one you mention. I also use interpolated array collision - which is perfect for Tomb Raider style levels.

There's always options when it comes to collision detection, every engine is different and often they need unique collision systems. The important thing is speed, array collision is undoutedly the fastest, so if you can keep your level on a square grid, you can get amazingly fast collision really easily.

The original Cartography Shop used a similar method to Comptons suggestion.


Van-B


The nature of Monkey was irrepressible!.
Retro Addict
21
Years of Service
User Offline
Joined: 12th Feb 2004
Location: Georgia, USA
Posted: 23rd Mar 2004 14:55
I just did some code the other day that does just that. If anyone is interested, I'll comment it the code and post it.......

PC Specs: AMD 1800+ 256M DDR, Geforce MX440 - DB v1.13

To DB or not to DB............duh DB!
Retro Addict
21
Years of Service
User Offline
Joined: 12th Feb 2004
Location: Georgia, USA
Posted: 23rd Mar 2004 14:57
It's code like Compton's post suggests to use.

PC Specs: AMD 1800+ 256M DDR, Geforce MX440 - DB v1.13

To DB or not to DB............duh DB!
Retro Addict
21
Years of Service
User Offline
Joined: 12th Feb 2004
Location: Georgia, USA
Posted: 23rd Mar 2004 16:25
Here's the code. I used this basic core to build on a game I'm working on. This is pretty basic...To give you an idea what I've done with it, I've added random sized spheres that drop, along with multiple spheres to drop at random heights off the screen so they all don't come down on one row as well as making the speed the spheres drop change. (They drop pretty quick after just a couple of increases). Some of you may look at this and scratch you head going we did he code it like that. Not to show my age, but my first exposure to BASIC on the IBM side was GWBASIC (that's basic with line #'s for you younger guys/gals) MANY years ago. Back then we had a 4.77mhz ibm with a nice green screen. Our graphics was the ASCII character set. "Collision" was all done with variables. Anyway, enough rambling on. The code is just an example of one way to do it. I'm sure there are more efficient ways to do what I did (if so, post it so we all can improve our coding methods).....No media required....Enjoy

PC Specs: AMD 1800+ 256M DDR, Geforce MX440 - DB v1.13

To DB or not to DB............duh DB!
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 24th Mar 2004 03:45
Wow _Mike_. You and Compton should write a collision system together, Compton's got his theory down and you made this thing run like butter.

Constant, unaltering 40FPS on Pentium Celeron 1.13ghz Geforce 2 MX, 256 mb ddr

Crazy Donut Productions
Current Project: KillZone
Code Ninja
21
Years of Service
User Offline
Joined: 17th Dec 2003
Location: AZ, U.S.
Posted: 25th Mar 2004 01:17
GWBASIC!? Cool. I can't even gat my hands on QBASIC anymore. (im one of those young programmers taht likes to fiddle with the old programming languages such as BASIC)

just a little info:
BASIC stands for Beginners All-Purpose Symbolic Instructional Code (for those of you who havn't had the bennefit of using Interplay's 'Learn to Program BASIC'... cant be run on any OS thats higher than Win98)

PC: Pentium II, 333Mhz, 128 Mb SDRAM, 20 & 4Gb hard drives, 8Mb Videocard, Windows XP, Direct X 9, half-dead CD burner, crappy moniter (15inch), DBC 1.13
~Dragael Software
Tapewormz
22
Years of Service
User Offline
Joined: 15th Sep 2002
Location: Winnipeg, Mantoba, Canada
Posted: 25th Mar 2004 01:29
Quote: "'Learn to Program BASIC'"


Worst basic programming language ever! Even more limited than click'n'play believe it or not (which in all fairness wasn't a programming language really...)
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 25th Mar 2004 08:21
Heehee...I still got QB on my hard drive. I feel sad now, though, because back when I was unaware of what all those license agreements meant I downloaded a copy of the full version: QuickBasic 4.5. If you need a copy of qbasic (I intent to find the free version, not the pirated one), I might be able to get it to you. Or you can always check out qbasic.com.

Crazy Donut Productions
Current Project: KillZone
Code Ninja
21
Years of Service
User Offline
Joined: 17th Dec 2003
Location: AZ, U.S.
Posted: 25th Mar 2004 23:25
@ Tapewormz: no arguments there, but it was good for a beginner such as we all once were (or still are ).
@ BCDP: Sure, if you do find a free copy, and if I come across a copy I'll send it to you or tell you where to find it.

PC: Pentium II, 333Mhz, 128 Mb SDRAM, 20 & 4Gb hard drives, 8Mb Videocard, Windows XP, Direct X 9, half-dead CD burner, crappy moniter (15inch), DBC 1.13
~Dragael Software
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 26th Mar 2004 05:39 Edited at: 27th Mar 2004 22:29
Found it! I think I deleted the full v4.5 out of a nagging conscience, but I still got the old qbasic that you could find on Windows 98 or something like that.
More than likely you'll have to copy-paste this link:

http://www.geocities.com/crazydonutproductions/qbasic.zip

Crazy Donut Productions, Current Project: KillZone
Web Site Button Does Not Work, Visit Here: http://www.geocities.com/crazydonutproductions/index.html
Code Ninja
21
Years of Service
User Offline
Joined: 17th Dec 2003
Location: AZ, U.S.
Posted: 27th Mar 2004 00:03
can you set up a link on your site. it wont work from here.

PC: Pentium II, 333Mhz, 128 Mb SDRAM, 20 & 4Gb hard drives, 8Mb Videocard, Windows XP, Direct X 9, half-dead CD burner, crappy moniter (15inch), DBC 1.13
~Dragael Software
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 27th Mar 2004 22:29
I know, it's a thing with geocities not wanting you to link from outside sources. Just copy the URL (I got rid of the link to make it easier), and paste it into a new browser and hit GO.

Crazy Donut Productions, Current Project: KillZone
Web Site Button Does Not Work, Visit Here: http://www.geocities.com/crazydonutproductions/index.html
Code Ninja
21
Years of Service
User Offline
Joined: 17th Dec 2003
Location: AZ, U.S.
Posted: 27th Mar 2004 22:48
sweet, thanks man

PC: Pentium II, 333Mhz, 128 Mb SDRAM, 20 & 4Gb hard drives, 8Mb Videocard, Windows XP, Direct X 9, half-dead CD burner, crappy moniter (15inch), DBC 1.13
~Dragael Software
Emperor Baal
21
Years of Service
User Offline
Joined: 1st Dec 2003
Location: The Netherlands - Oudenbosch
Posted: 31st Mar 2004 17:47
Oh, the real basic


I dont recommend to use that code, because your computer "COULD" act strangly when its done

Quote: "
UPDATED

Amd 2800+ 1024mb pc3200 A7N8X - Deluxe Ati Radeon 9800PRO 256mb
"
BearCDPOLD
21
Years of Service
User Offline
Joined: 16th Oct 2003
Location: AZ,USA
Posted: 1st Apr 2004 02:06
I couldn't resist. I put it in qb, and nothing really happened except it said
Poked
Peeked
Poked
Peeked
etc. etc. And the screen isn't jacked up afterwords or anything.

Crazy Donut Productions, Current Project: KillZone
Web Site Button Does Not Work, Visit Here: http://www.geocities.com/crazydonutproductions/index.html
Emperor Baal
21
Years of Service
User Offline
Joined: 1st Dec 2003
Location: The Netherlands - Oudenbosch
Posted: 1st Apr 2004 02:09
I said it "COULD", it messed up my old 486 pc when the peek/poke started. But, this is easily fixed by rebooting your pc.

You can raise the value if you want (for i = 1 to 100000)

Quote: "
UPDATED

Amd 2800+ 1024mb pc3200 A7N8X - Deluxe Ati Radeon 9800PRO 256mb
"

Login to post a reply

Server time is: 2025-05-23 06:58:38
Your offset time is: 2025-05-23 06:58:38