Hi, i'm planning on making a game where when the character touches a certain object, it will be game over. Is there a certain code for this?
Thanks in advance![]()
Hi, i'm planning on making a game where when the character touches a certain object, it will be game over. Is there a certain code for this?
Thanks in advance![]()
Unfortunately Visual Basic does not have a game control you can drag and drop onto your form that will magically know it's been touched and alert the user it is game over. Maybe you could provide us with more information first?
wasn't it should be some event that similar to "click" event?
Moved to the Games and Graphics forum.
Joacim Andersson
Microsoft MVP, MCSD, MCSE, Sun Certified Java Programmer
If anyone's answer has helped you, please show your appreciation by rating that answer.
I'd rather run ScriptBrix...
Joacim's view on stuff.
Wow guys. Obviously this guy is looking for "Collision Detection." Take a look at my Bosskillers game in my sig, or even A* Pathfinding as well as Rigid Body Collision Detection, which also is located in my signature.
Useful Forum Tips:
- If you found any post that was useful, please consider rating their post
- Give sensible thread titles, please!
- Be sure to use [HIGHLIGHT=VB][/HIGHLIGHT] tags when posting code written in VB.
- Write posts like a conversation, not like an email. That way you can avoid saying "Dear so and so" in every post.
- When your problem is solved, go up to Thread Toolsand click on
Mark Thread Resolved
My Contributions: Massive DirectX 2D Tutorials For VB5/VB6/VB.NET || 3D Engine In Pure VB || Friction Force ||DJ Turntable Simulation || Scratching Wavs || Time Based Movement || Newton Physics Simulation || Managed Game Loop || Rigid Body Collision Detection || World of Warcraft RGB Battle System || Bosskillers (World of Warcraft 2D Clone) || Street Fighter Controls (Flawless Simulation) || A* Pathfinding (VB6 & VB.NET) *UPDATED || *NEW* Nintendo Entertainment System Emulator
Expert. Ask me anything NES!
My Smilies:
so like for example a flying bat in the game... the character hits into it while walking and dies... how do I make the game over screen page appear, directly after the player touches the flying bat?
thanks in advance![]()
Like I said in the post above. Look in my sig for code examples of "Collision Detection" which are written in vb6. I have lots of em. If you are using vb.net, you can easily convert the code. I tend to do that converting c++ or c# samples to vb6 and vb.net. If the collision is true it'll do whats called "Collision Response" and you can do whatever you want with it then such as stopping the character from moving, subtracting a life, game over screen, lowering health in a health bar, etc. For the game over screen just use a simple boolean variable. If Gameover = true then pop up the game over logo.
Useful Forum Tips:
- If you found any post that was useful, please consider rating their post
- Give sensible thread titles, please!
- Be sure to use [HIGHLIGHT=VB][/HIGHLIGHT] tags when posting code written in VB.
- Write posts like a conversation, not like an email. That way you can avoid saying "Dear so and so" in every post.
- When your problem is solved, go up to Thread Toolsand click on
Mark Thread Resolved
My Contributions: Massive DirectX 2D Tutorials For VB5/VB6/VB.NET || 3D Engine In Pure VB || Friction Force ||DJ Turntable Simulation || Scratching Wavs || Time Based Movement || Newton Physics Simulation || Managed Game Loop || Rigid Body Collision Detection || World of Warcraft RGB Battle System || Bosskillers (World of Warcraft 2D Clone) || Street Fighter Controls (Flawless Simulation) || A* Pathfinding (VB6 & VB.NET) *UPDATED || *NEW* Nintendo Entertainment System Emulator
Expert. Ask me anything NES!
My Smilies: