Individual Spell Animations

Your ideas on how the game, the forum or the community can be improved

Moderators: Gods, Imps, Architect, Guardian

Post Reply
MarshMallowMan
Corporal
Corporal
Posts: 32
Joined: Tue Jan 26, 2021 9:55 am

Individual Spell Animations

Post by MarshMallowMan »

So me and Stickman have been working on a new modified client (check your email Lord Lava! its ready for testing and gathering dust), and you can see some of the changes in the clips below.

This post is about changing how spells look though. Currently the server only sends the client three spell types

• Caster Magic (blue pulse)
• Good Magic (green pulse)
• Enemy Magic (Red pulse)

We were wondering about having a separate set of sprites for each individual casted spell.

How it currently works is the Server has 32 bits reserved for dynamic map flags

3 for injured
5 for tomb (skeleton pile growing)
5 for death cloud
3 for evil magic
3 for good magic
3 for caster magic

that only leaves 10 bits which also need to store the offset for the current sprite to draw. So at most we can add effects for 3 more spells with similar # of frames as the current E/G/C magic types.

If we have the server send an addition 32 or 64 bits of data we could have 10 – 20 more effects and make each spell have a unique animation

I think it would really add polish to the game if each spell gave its own visually unique effect.

We have made two examples

Lighting (this could be a replacement for blast 2 for example)
Lightning Spell Effect

Heal
Healing Spell Effect

We were hoping to get some feedback on the following:
• What is everyones opinion on individual animations for each spell vs the current pulse of light animations.
• What do you think of those 2 example animations specifically, do they match the games current graphics? Look out of place?
Lordlava
Greater God
Greater God
Posts: 1570
Joined: Wed Mar 16, 2016 2:17 pm
Location: The Land Down Under

Post by Lordlava »

I like the idea and the graphics sprites can be refined after the event.

I had looked to implement Meteor and meteor Show but that sprite limitation curtailed it.
Can we do it so that it is not limited to a small number of animations.
make it more generic so that has an many animations as our imagination desires?
So for example the server send the sprite number and the number of sprites to cycle through and the map address (or whatever else it needs).
The client does the rest based on that info. The problem with sending bit flags is that they are a small finite number.

Note: When this change occurs then the client will not work until the server is updated to the same version.
The Lord of Molten Rocks
stickman
Private First Class
Private First Class
Posts: 8
Joined: Tue Feb 16, 2021 5:15 am

Post by stickman »

Yup i think something like that could work. i tried to make a C#/java mmo based on this games code and wanted to use sprites that didn't have attack animations so i wanted to add the animations ontop. (like a floating sword swinging in an arc)

so when someone would do an attack or cast a fireball it would broadcast the attack to everyone that as in range. this was the code:

Code: Select all

        public void notify_players_ability(int m, int r, int c, int type, int assetNum, int data, int size) //map #, row, column,
        {
            //only sent the notification to players that are nearby
            int colLeftBound = c - (TILEX / 2);
            int colRightBound = c + (TILEX / 2);

            int rowTopBound = r - (TILEY / 2);
            int rowBottomBound = r + (TILEY / 2);

            int characterNumber;
            int p = 0;
            byte[] buf = new byte[100];

            buf[0] = SV_ABILITY_EFFECT; p++;
            Buffer.BlockCopy(BitConverter.GetBytes((short)r), 0, buf, p, sizeof(short)); p += sizeof(short);
            Buffer.BlockCopy(BitConverter.GetBytes((short)c), 0, buf, p, sizeof(short)); p += sizeof(short);
            Buffer.BlockCopy(BitConverter.GetBytes((short)assetNum), 0, buf, p, sizeof(short)); p += sizeof(short);
            buf[p] = (byte)type; p++;
            buf[p] = (byte)data; p++;
            buf[p] = (byte)size; p++;

            for (int row = rowTopBound; row <= rowBottomBound; row++)
            {
                for (int col = colLeftBound; col <= colRightBound; col++)
                {
                    if (col < 0 || row <0>= map[m].MAPX || row >= map[m].MAPY) continue;

                    if ((characterNumber = map[m].currentMap[col + row * map[m].MAPX].characterID) > 0)
                    {
                        //check if its a player
                        if ((characters[characterNumber].flags & Character.CharacterFlags.CF_PLAYER) > 0 && characters[characterNumber].used == Character.CHAR_ACTIVE)
                        {
                            addToSendBuffer(characters[characterNumber].playerNumber, buf, p);
                        }
                    }
                }
            }
        }

i actually managed to add projectiles like this as well... a starting maptile. and ending maptile and the number of ticks i wanted the projectile to take to reach. the client took care of working out where to draw the sprite based off of how many ticks had occured etc. the server also tracked the number of ticks and did crude collision detection based off the tiles it was intersecting as it ticked along... then would send a projectile destroy to the client so the client could get rid of the projectile early if it collided.
Drink
Webmaster
Webmaster
Posts: 177
Joined: Thu Sep 01, 2016 5:05 pm

Post by Drink »

Like the idea, would just give better feel/look.

Having the same red flash for everything is boring :P
Post Reply