Register  |  FAQ  |  Search  |  Memberlist  |  Usergroups  |  Log in 
Reply to topic
 Individual Spell Animations 

Joined: 26 Jan 2021
Posts: 32
Reply with quote
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

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?
View user's profile Send private message
Greater God
Greater God

Joined: 16 Mar 2016
Posts: 1558
Location: The Land Down Under
Reply with quote
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
View user's profile Send private message
Private First Class
Private First Class

Joined: 16 Feb 2021
Posts: 8
Reply with quote
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:

        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.
View user's profile Send private message AIM Address

Joined: 01 Sep 2016
Posts: 158
Reply with quote
Like the idea, would just give better feel/look.

Having the same red flash for everything is boring Razz
View user's profile Send private message
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT  
Page 1 of 1  

 Reply to topic