Skip to content
MPGHThe Dark Arts
/
RegisterLog in
Forum
Community
What's NewLatest posts across the boardTrendingHottest threads right nowSubscribedThreads you follow
Discussion
GeneralIntroductionsEntertainmentDebate FortFlaming & Rage
Board
News & AnnouncementsMPGH TimesSuggestions & HelpGiveaways
More Sections
Art & Graphic DesignProgrammingHackingCryptocurrency
Hacks & Cheats
Games
ValorantCS2 / CS:GOCall of Duty / WarzoneFortniteApex LegendsEscape From Tarkov
+14 moreLeague of LegendsGTA VMinecraftRustROTMGBattlefieldTroveBattleOnCombat ArmsCrossFireBlackshotRuneScapeDayZDead by Daylight
Resources
Game Hacking TutorialsReverse EngineeringGeneral Game HackingAnti-CheatConsole Game Hacking
Tools
Game Hacking ToolsTrainers & CheatsHack/Release NewsNew
Submit a release →Share your cheat, tool, or config with the community.
AINEW
AI Tools
General & DiscussionPrompt EngineeringLLM JailbreaksHotAI Agents & AutomationLocal / Open Models
AI × Gaming
AI Aimbots & VisionML Anti-CheatGame Bots & Automation
Create
AI Coding / Vibe CodingAI Art & MediaAI Voice & TTS
The AI frontier →Where game hacking meets modern machine learning. Jump in.
Marketplace
Buy & Sell
SellingBuyingTradingUser Services
Trust & Safety
Middleman LoungeMarketplace TalkVouch Copy Profiles
Money
Cryptocurrency TalkCurrency ExchangeWork & Job Offers
Start selling →List accounts, services, and goods. Use the middleman to trade safe.
MPGH The Dark Arts

A community for offensive security research, reverse engineering, and AI.

Community

ForumMarketplaceSearch

Account

RegisterLog in

Legal

Privacy PolicyForum RulesHelp & FAQ
© 2026 MPGH · All rights reserved.Built by the community, for the community. For educational purposes onlyContent is shared for security research and education — we don't condone illegal use. You're responsible for complying with applicable laws. Use at your own risk.
Home › Forum › Programming › Visual Basic Programming › [Game Tutorials] Detect collision

[Game Tutorials] Detect collision

Posts 1–6 of 6 · Page 1 of 1
Zoom
Zoom
[Game Tutorial] Detect collision
This is a little tutorial that can be used to games.
  • Picturebox1 is your character
  • picturebox2 is an enemy character


Code:
'add this code to a timer set to 100
If Picturebox1.Bounds.IntersectsWith(picturebox2.bounds)  Then
dim hp as integer = 100
hp = hp - 5
        End If
So if the enemy hits you, you lose hp.

Simple but very good for game developers.

-hej
#1 · edited 16y ago · 16y ago
Shark23
Shark23
Hmm... Nice. Works a lot better and faster than using X and Y axis of each object. Didn't know about this. Thanks!
#2 · 16y ago
Blubb1337
Blubb1337
Code:
hp -= 5
Shorter =D
#3 · 16y ago
mnpeepno2
mnpeepno2
^^ That works??? o.0
#4 · 16y ago
Shark23
Shark23
Of course it works. I was wondering why everybody was using the hp = hp - 5 kind of thing.
#5 · 16y ago
mudlord
mudlord
But then you lose the granularity that comes with per pixel collision detection...So I don't see the point, really.
#6 · 16y ago
Posts 1–6 of 6 · Page 1 of 1

Post a Reply

Similar Threads

  • game midification detectedBy vanbaas98 in WarRock Discussions
    10Last post 16y ago
  • [XNA] Developing Your First 2D Game Tutorial: Part 1By richdude212 in Programming Tutorials
    0Last post 15y ago
  • Game Hack detected - ProxycapBy wata_lee in Vindictus Help
    1Last post 15y ago
  • GAME HACK DETECTEDBy Aastall in Vindictus Help
    1Last post 15y ago
  • Crossfire windowed in-game tutorial (edited)By SelormKillsFaisal in CrossFire Hacks & Cheats
    4Last post 17y ago

Tags for this Thread

None