Jump to content

  • Log In with Google      Sign In   
  • Create Account

We need your feedback on a survey! Each completed response supports our community and gives you a chance to win a $25 Amazon gift card!


Member Since 17 Jun 2005
Offline Last Active Feb 04 2014 09:46 AM

Posts I've Made

In Topic: Attack balancing in an action game.

06 October 2009 - 04:26 PM

I faced a similar problem to yours in designing combat rules for the project I'm currently working on, so I'll provide you with the solution that I came up with. Feel free to modify it to suit your own needs or discard it entirely...

Most attacks, in addition to damage output, accuracy modifier, elemental attribute, etc., are given a particular set of "battle effects". Such effects include...

INTERRUPT - Interrupts the attacks of any enemies hit by the attack.
BREAK - Breaks the defensive stance of any enemies hit by the attack.

... among others. Each battle effect can be LVL 1 - 3; obviously, the higher the level the better the effect. For example, a simple slash might have INTERRUPT LVL1, while a more powerful slash might have INTERRUPT LVL2 and BREAK LVL1.

The next step involves giving game entities (players and enemies) a resistance value to the above battle effects. For example, a small insect monster will likely have a low resistance to these effects (making it easy to interrupt their attacks or break their defense), while a heavily-armored knight will likely have a high resistance to these effects. The rule I used is that if the enemy's resistance level is greater than or equal to the attack's battle effect level, the effect is negated (for example, if the knight has a INTERRUPT resistance of 2, then the knight cannot be affected by INTERRUPT LVL1 or LVL2 (just LVL3)). Thus, entities have resistance levels from 0 (no resistance) up to 3 (full resistance).

Generally speaking, most of the "light" (low-moderate damage, moderate-high speed) attacks have low battle effect levels while most of the "heavy" (moderate-high damage, low-moderate speed) attacks have high battle effect levels. The only problem that arises is that with this system the "light" characters won't be able to interrupt most of the attacks that "heavy" characters use (making an effective frontal assault extremely difficult to pull off). Then again, the "light" characters are given more advanced evasive capabilities that make counter-attacks a more effective option in combat.

Hope that gave you a couple ideas.

In Topic: 2D Iso Mmorpg Maker?

24 June 2007 - 07:04 PM

If MMORPGs were that easy to make, everyone would have made one by now. More than likely (read: I'm absolutely certain), the software that you are looking for does not exist.

However, RPG Maker, while having no support for MMORPGs, is a good start if you just want to make a simple, single-player, 2D RPG.

In Topic: sdl errors

29 May 2007 - 04:23 AM

The problem lies in line 30 (if you look at your error information)...
if ( MyEvent.type == SDL_Quit)

Since SDL_Quit is a function (you use it later in your code on line 34), the compiler thinks you are trying to compare an integer type (MyEvent.type) with a function (hence the "no conversion from 'void (__cdecl *)(void)' to 'int'" error).

On line 30, change "SDL_Quit" to "SDL_QUIT" (which is an integer constant defined in sdl.h). That will get rid of the errors.

In Topic: Classes and particle engine

07 April 2007 - 03:57 AM

If you're going to be doing a lot of insertion / removal of particles from the vector, I'd suggest using the std::list instead, whose insertion and removal algorithms run in constant time. You're going to be iterating through all of the particles anyway, so random access isn't required.

Here's why I think the std::list is better suited for the particle engine...
Once the particle emitter expires, you don't want to remove all the particles right away - you usually want to have the particles continue one last cycle. Terminating the particle emitter will terminate all particles once their life-energy reaches zero. If you use a std::vector, you have two options: remove the particle on the spot, or use an if-condition in the render loop of the particle to check if its life-energy is zero (and if it is, don't render it). The first option is an expensive operation, and the second option forces you to check whether or not the particle has expired EVERY CYCLE (the time it takes for a simple if-condition to execute isn't great on its own, but it adds up once you have 1000+ particles).

With the std::list, removing the particle on the spot is done in constant time, so the second option isn't even worth considering in this case.

Just my two cents... Feel free to debate my methods - there is obviously more than one way to implement this.

In Topic: Pointer to member functions of a class

30 March 2007 - 09:13 AM

Could always check this out... Function Pointer Tutorials
It helped me out a lot when dealing with function pointers and all of their different usage cases.