Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Bender86 on Mon 14/03/2005 18:37:27

Title: Spell Casting
Post by: Bender86 on Mon 14/03/2005 18:37:27
I'm trying to acheive a sort of point and click style RPG interface, rather like Tibia (if uve played it), in which u can click on people to cast spells, and they will randomly fire them back. Im having difficulty in making spell objects move across the screen to hit you, dissappear, and then move again shud enemies cast another spell. (Their spells are cast randomly using timers). Anyone had experience of this kind of thing before? Any help wud be much appreciated.
Title: Re: Spell Casting
Post by: Ishmael on Mon 14/03/2005 18:43:31
http://www.adventuregamestudio.co.uk/games.php?action=detail&id=288

Play this game, if you have the time and energy, and tell me if the style I've used is something you're looking for...

The game source is backed up somewhere, and as I have nowdays some stuff to do I won't go looking it up unless you'd find it usefull.
Title: Re: Spell Casting
Post by: stuh505 on Tue 15/03/2005 05:29:50
QuoteIm having difficulty in making spell objects move across the screen to hit you, dissappear, and then move again shud enemies cast another spell.

For the spell, you have a few options.  You could draw it using graphic overlays, raw draw, by moving an object, or by a character.

Raw drawing it is probably not the best way because you will want to be pasting some kind of sprite image.  Objects aren't a good idea because you can't dynamically create and destroy objects.  Characters are unintuitive to use and offer no special advantages.  So you probably want to use a graphic overlay.  You can simply move the sprite a little bit during the repeatedly execute section of code.  You have a limit of 10 overlays at a time, so you probably ought to limit your spellcasters to only having 1 spell projectile at a time. 
Title: Re: Spell Casting
Post by: Ishmael on Tue 15/03/2005 12:57:04
stuh, have you played that game? See the way the "spell" works. It's done with characters, if I recall correctly.
Title: Re: Spell Casting
Post by: stuh505 on Tue 15/03/2005 14:35:42
No I haven't played it.  Characters do offer the advantage of being able to use an alpha channel...that may be important.  I have made shooting games in AGS before using overlays.  It would be about the same code either way.
Title: Re: Spell Casting
Post by: Ishmael on Tue 15/03/2005 18:06:38
Well, just play the damn game k? :P