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 / "sprite collision" and "sprite hit"

Author
Message
mightymax
21
Years of Service
User Offline
Joined: 31st Jan 2003
Location:
Posted: 31st Jan 2003 13:03
Hello all! I have just joined this forum and I'm going to ask a question that has probably been asked a million times before (either that or I am even thicker than I thought) but I can't find any reference to it, so...

Oh yeah, the question. What is the difference between "sprite collision" and "sprite hit"? I have tried all sorts of tests but they appear to do exactly the same thing. Ams I overlooking something?
REM get a signature off the user
INPUT "Type your sig here",sig$
PRINT sig$
Garfield1983
22
Years of Service
User Offline
Joined: 13th Nov 2002
Location:
Posted: 3rd Feb 2003 13:37
Ahh..at long last I can answer someone else's question!=)

As far as I know, Sprite Hit is where two sprites actually touch edges (They collide)

For example, I'm trying to make my first proper game - a clone of Pong - and I've used the SPRITE HIT command to detect when the ball is hitting the paddles etc.

Sprite Collision on the other hand is (I think!) where two sprites are overlapping - like in a 2D adventure game you might check to see if the main character (Sprite) has walked over an object (ie. To trigger a command to make him pick up that object) or to check if the mouse cursor (with a sprite palced at mouse(x) and mouse(y)) is over another sprite such as a button.

Although I found the DB Help files completely useless when it comes to using Sprites, I would reccomend you look up some of the example programs on Sprite Hit and Collision as there's one that shows how Sprite Hit can trigger an event (In that instance the background flashes white or something) and I think there's one on Sprite Collision too=)

Goodluck!
mightymax
21
Years of Service
User Offline
Joined: 31st Jan 2003
Location:
Posted: 3rd Feb 2003 14:45
Thanks Garfield! That makes sense (man, I must be thick). I just couldn't figure out the difference.

That is helpful anyway and, funnily enough, I was making a pong clone when I asked this question. I have now managed to make a simple 3D breakout style game with a level editior. Wow I'm good [/sarcasm]. Oh well, thanks again, and I hope to get much better at DB coding with the help of people on these boards!

REM get a signature off the user
INPUT "Type your sig here",sig$
PRINT sig$
Garfield1983
22
Years of Service
User Offline
Joined: 13th Nov 2002
Location:
Posted: 4th Feb 2003 04:33
Ahh you're alot better at this than me then!

I have several 2D projects on the go but all are giving me headaches=S

I'd like to see your breakout clone, any chance you'll be puting it on the web?

Cheers
Hockey07
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: United States
Posted: 4th Feb 2003 05:17
I'm working on my second game... My first game was barely done.. But my DB demo expired! lol

But it had great 3D graphics and stuff.. and i NEVER started with ANYTHING small like pong.. i just started big, and with the help of this community, i was able to accomplish alot! Thanks to the community! wahoo!

<<<<<thats gonna be me in about a week<<<<<

AlamDV, NHL, NHL 2K3....... The best combination ever!
mightymax
21
Years of Service
User Offline
Joined: 31st Jan 2003
Location:
Posted: 4th Feb 2003 13:07
I guess I could try, but it isn't that good. Once it has reached an "ok" stage then I shall try, but I am having some trouble uploading at the moment. I'll post here when it's at a stage where I can release it if you're interested?

REM get a signature off the user
INPUT "Type your sig here",sig$
PRINT sig$
mightymax
21
Years of Service
User Offline
Joined: 31st Jan 2003
Location:
Posted: 4th Feb 2003 14:16
OK, the game is at a stage where I can release it without feeling *too* embarrassed. Are you still interested in seeing it? It really isn't that great.

REM get a signature off the user
INPUT "Type your sig here",sig$
PRINT sig$
Hockey07
21
Years of Service
User Offline
Joined: 18th Dec 2002
Location: United States
Posted: 4th Feb 2003 14:37
I'd like to see it.

AlamDV, NHL, NHL 2K3....... The best combination ever!
mightymax
21
Years of Service
User Offline
Joined: 31st Jan 2003
Location:
Posted: 4th Feb 2003 16:03
Woohoo! People actually want to see my work. Well, currently all the objects I am using are untextured primitives, but that is set to change. The download link is here

http://www.geocities.com/max_s_carey/blockorama.zip

Like I said it is extremely primitive so please don't expect too much. It is only my second game.

REM get a signature off the user
INPUT "Type your sig here",sig$
PRINT sig$
mightymax
21
Years of Service
User Offline
Joined: 31st Jan 2003
Location:
Posted: 4th Feb 2003 16:07
hmmm... strang, the link doesn't work. You have to copy and paste it into your browser, not click on it.

copy and paste this

http://www.geocities.com/max_s_carey/blockorama.zip

REM get a signature off the user
INPUT "Type your sig here",sig$
PRINT sig$
Garfield1983
22
Years of Service
User Offline
Joined: 13th Nov 2002
Location:
Posted: 5th Feb 2003 01:07
Damn, it wouldn't work for me when I ran it - I think it's cos I don't have a proper 3Dfx card, just onboard graphics - although i've been able to run everything from The Sims to Delta Force 2 etc absolutely fine=S

It sounds great anyway, don't put your work down like that, any achievement is an achievement=)
Kangaroo2
22
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 5th Feb 2003 02:16
Hey max, by the look of it your games pretty competant well done! Trouble is, my moitor turns off when I try and run it! This is weird - what screen res and colour depth are u using?

Coming Soon! Kangaroo2 Studio... wait and quiver with anticipation! lol
samjones@kangaroo2.com - http://www.kangaroo2.com - If the apocalypse comes, email me
mightymax
21
Years of Service
User Offline
Joined: 31st Jan 2003
Location:
Posted: 5th Feb 2003 13:12
Hmm.. try downloading the "updated" version I have just uploaded (same URL) as I have lowered the colour depth. Also note that the game currently has no system for lives (ie the ball can go offscreen infinite times and you won't be penalized. Also, when it does go offscreen, instead of going to start at the bat like normal breakout, it just starts in the middle of the screen. I shall fix these problems when I get around to it... Anywho, try the "updated" version.

REM get a signature off the user
INPUT "Type your sig here",sig$
PRINT sig$
mightymax
21
Years of Service
User Offline
Joined: 31st Jan 2003
Location:
Posted: 5th Feb 2003 19:38
AARRGGHHH!!! Sorry. If you are still intersted you have to download it *again*. I am having trouble uploading and the files are all jumbled. This one works though.

REM get a signature off the user
INPUT "Type your sig here",sig$
PRINT sig$

Login to post a reply

Server time is: 2024-11-23 23:28:32
Your offset time is: 2024-11-23 23:28:32