Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411494 Posts in 69377 Topics- by 58434 Members - Latest Member: graysonsolis

April 30, 2024, 01:08:24 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperDesignAttacking enemies
Pages: [1]
Print
Author Topic: Attacking enemies  (Read 1251 times)
Ben_Hurr
Level 10
*****


nom nom nom


View Profile
« on: October 02, 2010, 12:23:01 PM »

I need some ideas for how to model player attacks against other objects.
The best I've come up with is using an invisible object that causes damage when collided with, or having the attackee scan for an object in the way and directly modify its health.

I'm curious as to what other ITGer's have come up with  Wink
Logged
brog
Level 7
**



View Profile WWW
« Reply #1 on: October 02, 2010, 12:57:42 PM »

What is the player?  What times of attacks does he do?  - ranged or close, instant or delayed, firing bullets or whatever?
Logged
TobiasW
Level 8
***


This can only end brilliantly!


View Profile WWW
« Reply #2 on: October 02, 2010, 01:30:55 PM »

That sounds more like a technical question?
Logged

The Monster King
Level 10
*****


FRKUC im ALWAYS ANGRY AAAAAAAAAAAAAAAAAAAAAAAAnerd


View Profile
« Reply #3 on: October 02, 2010, 05:30:58 PM »

yeah it depends on your game type

in fighting games theres many hitboxes which are all those rectangles, some are for being attacked and some for attacking when appropriate

imo i think you shouldnt modify health directly, tell the other object how much damage you do and let it sort it out
sometimes you want things to behave differently when hit and you dont necessarily want to change your main characters code for that
Logged
moi
Level 10
*****


DILF SANTA


View Profile WWW
« Reply #4 on: October 03, 2010, 06:46:02 AM »

I think I know what he's talking about. He must have designed a basic engine with collisions and projectiles that do damage and stuff, and now he's probably wondering how to do area damage (for example when the player uses his sword) on objects.
If that's the question, the best answer is to scan for objects in a zone.
Logged

subsystems   subsystems   subsystems
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic