Results 1 to 3 of 3
  1. #1
    Fenrisus's Avatar
    Join Date
    Dec 2013
    Gender
    male
    Posts
    12
    Reputation
    10
    Thanks
    1

    Question RotMG Monsters/Players outfit maker.

    Hello there, there is just a stuppid question. How they did them? For example, player outfit has 3 directions (North, South and East)+ simple horizontal flip for 3 more. But seems editor (draw tool) not full. I.e. they cant did another 2 directions. Only east direction.
    Well the main question - is they are drawing those other 2 manually? or there is some tricky algorithm for mirroring-flip image?

    Personally - i think (if following simple logics), they did them manually. But as programmer, i think (and hope) there are maybe some algorithm for that? For example, you know about waifux2? This thing using neural network for drawing, and as result can increase image size without noise or lose quality. (for example, simpe 16x16 tileset can be increased to 64x64 without any quality lose, because that is not same as you may did in paint. Those thing actually analyze image, and really draw those pixel by pixel.)
    Just as example:




    Maybe there is some tricky way for making another 2 directions? Or they just do them manually? But for what do they need official tool, that can make player outfits? And why exactly Stand, Walk1, Walk2, Attack1, Attack2? Why not less if anyways they will include fan-maded sprites into game? Just a theory, but all those phases in east direction probably enough for using some programatically way for make all other parts?
    Last edited by Fenrisus; 07-17-2017 at 05:32 PM.

  2. #2
    Invader_Zim's Avatar
    Join Date
    Aug 2011
    Gender
    male
    Location
    Atlas 2
    Posts
    465
    Reputation
    10
    Thanks
    193
    My Mood
    Tired
    Draw tool, that's funny. If you want to learn sprites you can look at the games sprite sheets and XMLs.

    Here is the file that the current production game is using for class sprites. You can use a strip of this as a base to create your skin or custom class sprites.

    https://static.drips.pw/rotmg/product...ts/players.png

    If you want to put your sprites into the game, you'll also need to make the alpha sprites for dyes to be shown.



    If the player is moving to the left, the client flips the horizontal walking animation. I do not know what they do exactly, but it's not hard to code. It could be activating the "move left" key, or player position decreasing along the X axis, just some check that then takes the animation and multiplies it by -1 on its X axis.
    Last edited by Invader_Zim; 07-17-2017 at 08:12 PM.

    My weapon is a backpack.

  3. #3
    Fenrisus's Avatar
    Join Date
    Dec 2013
    Gender
    male
    Posts
    12
    Reputation
    10
    Thanks
    1
    Quote Originally Posted by Invader_Zim View Post
    If the player is moving to the left, the client flips the horizontal walking animation. I do not know what they do exactly, but it's not hard to code. It could be activating the "move left" key, or player position decreasing along the X axis, just some check that then takes the animation and multiplies it by -1 on its X axis.
    =) Thanks for reply, but you are miss-understand me a bit It's easy to code how it's moving. I mean how they did those character sprites.
    Just for example, they have in their editor only one character direction for draw (if they draw it with hands via using that editor - that insane).
    I am talking about something like that:
    Mainly, those character is not animated! And does not have a frames or etc. Just static image.

    Body:


    With gear:


    I am do that via using this:
    Code:
            public AnimatedSprite(ThingTypeCategory category, ThingType thing, Texture TheTexture, Rectangle TheLocation) : base(TheTexture, TheLocation)
            {
                this.category = category;
                if (category == ThingTypeCategory.Outfit)
                {
                    thing.Attributes[ThingAttr.ThingAttrCloth] = new FemusThingAttribute() { IntListValue = new List<int>() { -1, -1, 6 } };
                    Bitmap finalImg = new Bitmap(FemusSprite.Width, FemusSprite.Height);
    
                    using (Graphics g = Graphics.FromImage(finalImg))
                    {
                        g.DrawImage(Program.AM.GetImage(thing.SpriteID.First()), 0, 0, FemusSprite.Width, FemusSprite.Height);
                    }
    
                    Bitmap finalImg2 = new Bitmap(FemusSprite.Width*2, FemusSprite.Height+4);
                    using (Graphics g = Graphics.FromImage(finalImg2))
                    {
    
                        g.DrawImage(finalImg, 0, 0, finalImg.Width, finalImg.Height);
    
    
                        var clothID = thing.Attributes[ThingAttr.ThingAttrCloth].IntListValue[0];
                        if (clothID >= 0)
                        {
                            var list = Program.TM.GetThingType(clothID, ThingTypeCategory.Clothe).SpriteID;
    
                            var img = Program.AM.GetImage(list.First());
                            g.DrawImage(img, 0, 2, FemusSprite.Width, img.Height);
                        }
    
    
                        clothID = thing.Attributes[ThingAttr.ThingAttrCloth].IntListValue[1];
                        if (clothID >= 0)
                        {
                            var list = Program.TM.GetThingType(clothID, ThingTypeCategory.Clothe).SpriteID;
    
                            var img = Program.AM.GetImage(list.First());
                            g.DrawImage(img, 0, 2, FemusSprite.Width, img.Height);
    
                        }
    
                        clothID = thing.Attributes[ThingAttr.ThingAttrCloth].IntListValue[1];
                        if (clothID >= 0)
                        {
                            var list = Program.TM.GetThingType(clothID, ThingTypeCategory.Clothe).SpriteID;
    
                            using (Graphics g1 = Graphics.FromImage(finalImg))
                            {
                                var img = Program.AM.GetImage(list.First());
                                g1.DrawImage(img, 0, 2, FemusSprite.Width, img.Height);
                            }
    
                        }
    
                        var upper = finalImg.Clone(new RectangleF(0, 0, finalImg.Width, finalImg.Height - 7), finalImg.PixelFormat);
                        var lower = finalImg.Clone(new RectangleF(0, finalImg.Height - 7, finalImg.Width, 2), finalImg.PixelFormat);
                        var lower2 = finalImg.Clone(new RectangleF(0, finalImg.Height - 7 + 2, finalImg.Width, 2 + 3), finalImg.PixelFormat);
    
                        g.DrawImage(upper, FemusSprite.Width, -lower.Height, finalImg.Width, upper.Height);
                        g.DrawImage(lower, FemusSprite.Width, upper.Height - lower.Height, finalImg.Width, lower.Height);
                        g.DrawImage(lower, FemusSprite.Width, upper.Height, finalImg.Width, lower.Height);
                        g.DrawImage(lower2, FemusSprite.Width, upper.Height + lower.Height, finalImg.Width, lower2.Height);
    
                        clothID = thing.Attributes[ThingAttr.ThingAttrCloth].IntListValue[0];
                        if (clothID >= 0)
                        {
                            var list = Program.TM.GetThingType(clothID, ThingTypeCategory.Clothe).SpriteID;
    
                            var img = Program.AM.GetImage(list.First());
                            g.DrawImage(img, FemusSprite.Width, 2, FemusSprite.Width, img.Height);
                        }
    
                    }
    
                    foreach (var clothID1 in thing.Attributes[ThingAttr.ThingAttrCloth].IntListValue.Skip(2))
                    {
                        var list = Program.TM.GetThingType(clothID1, ThingTypeCategory.Clothe).SpriteID;
                        var img = Program.AM.GetImage(list.First());
                        using (Graphics g = Graphics.FromImage(finalImg2))
                        {
                            g.DrawImage(img, 0, 0, FemusSprite.Width, img.Height);
                            g.DrawImage(img, FemusSprite.Width, -2, FemusSprite.Width, img.Height);
                        }
    
                    }
    
                    var TheBitmap = new Bitmap(finalImg2);
                    byte[] theBGRAPixels = Render.BitmapToByteArray(TheBitmap);
                    Texture texture = new Texture(TheBitmap.Width);
                    texture.Update(new Rectangle(0, 0, TheBitmap.Width, TheBitmap.Height), theBGRAPixels);
                    MyTexture = texture;
                }
            }
    That is just simple example, how to make an static roguelike outfit (from RLtile, Angband, DungeonCrawl rogue-likes) animated programatically, without drawing those animation self

    If you will look closer at RotMG outfit sprites, they have a many similarities, simple (non-high detailed) design. Probably there is possible to make an algorithm, to make all other directions + animations for them and save into texture, via using only east direction (as for all character sprites on their editor). But i cant imagine those thing right now.


    Finally - that is just my theory (that can be possible) how probably they programmatically implement sprites from their public tool. Just put one direction with animation into small tool:

    and they will did this for you:

    You just need in this case, a bit edit output spritesheet (for add details or fix artifacts) and done.

    PS. Kabams really takes a nice-look user-maded sprites from their public editor and manually draw all other parts for those character outfit? That's insane! Hmm but really, looks like they simple do it handy

Similar Threads

  1. [Solved] Anyone know if this outfit is buyable online or even a possible player outfit?
    By Mgamer581 in forum Grand Theft Auto 5 (GTA V) Help
    Replies: 3
    Last Post: 02-07-2016, 10:11 AM
  2. Rotmg single player game WIP
    By Botmaker in forum Realm of the Mad God Discussions
    Replies: 37
    Last Post: 01-18-2015, 04:09 PM
  3. [Release] Flash Player + Trainer Maker Kit V1
    By GERMANY132816 in forum Game Hacking Tools
    Replies: 7
    Last Post: 09-10-2014, 01:25 AM
  4. RotMG Monster IDs
    By SwatSec in forum Realm of the Mad God Help & Requests
    Replies: 14
    Last Post: 09-08-2013, 06:19 PM
  5. [Help Request] Monster Player Detection
    By Tachyonic in forum Realm of the Mad God Private Servers Help
    Replies: 2
    Last Post: 09-03-2013, 04:51 AM