Ninja Mitsuo - platformer game with SGDK

Announce (tech) demos or games releases

Moderator: Mask of Destiny

Post Reply
vnsbr
Interested
Posts: 40
Joined: Sun Dec 17, 2017 4:13 pm

Ninja Mitsuo - platformer game with SGDK

Post by vnsbr » Sat Feb 02, 2019 12:30 pm


WIP #1

Video of WIP 1
https://www.youtube.com/watch?v=r96Xo9z ... e=youtu.be


New project I am working on mostly to learn SGDK and sega genesis programming in general. It still in the early works and a lot of to do. I still need to learn what is the best way to capture the screen so I can post anything other than static images here in the forum, any ideas? for the moment I will post a screenshot of the level I have been using to test collisions, enemy AI and such.

The graphics (apart from the character) are done by ansimuz. Character and coding is done by me for the moment.

Ninja Mitsuo is a game heavily inspired by Ninja Gaiden but still new ideas and its own pacing.
Attachments
out-705.png
out-705.png (11.08 KiB) Viewed 2031 times
Last edited by vnsbr on Thu Feb 07, 2019 2:50 pm, edited 5 times in total.

nemezes
Very interested
Posts: 57
Joined: Sat Mar 31, 2018 1:09 pm

Re: Ninja Mitsuo - platformer game with SGDK

Post by nemezes » Tue Feb 05, 2019 12:32 am

Really nice!

Ansimuz knows how to pixel!! Great art! Ansimuz released an art pack called "warped city" that I think fits very good in a 16 bits mega drive game.

vnsbr
Interested
Posts: 40
Joined: Sun Dec 17, 2017 4:13 pm

Re: Ninja Mitsuo - platformer game with SGDK

Post by vnsbr » Thu Feb 07, 2019 2:43 pm

nemezes wrote:
Tue Feb 05, 2019 12:32 am
Really nice!

Ansimuz knows how to pixel!! Great art! Ansimuz released an art pack called "warped city" that I think fits very good in a 16 bits mega drive game.
You are right, his art makes me want to make all type of games :P and warped city is especially good ehehe It could be a nice bonus level :P

I have recorded a video with start of level 1!

https://www.youtube.com/watch?v=r96Xo9z ... e=youtu.be

tryphon
Very interested
Posts: 306
Joined: Sat Aug 17, 2013 9:38 pm
Location: France

Re: Ninja Mitsuo - platformer game with SGDK

Post by tryphon » Fri Feb 08, 2019 4:44 pm

Your ninja is almost the same colour as the background and it makes it difficult to spot.

But... awesome pixel art :D

danibus
Very interested
Posts: 72
Joined: Sat Feb 03, 2018 12:41 pm

Re: Ninja Mitsuo - platformer game with SGDK

Post by danibus » Sun Feb 10, 2019 10:58 am

Nice video, but Moon colors are the same like skulls, maybe you need to change this, in my opinion :oops:

Chilly Willy
Very interested
Posts: 2791
Joined: Fri Aug 17, 2007 9:33 pm

Re: Ninja Mitsuo - platformer game with SGDK

Post by Chilly Willy » Mon Feb 11, 2019 1:31 pm

It's a blood moon, man! :lol:

In all seriousness, there are times when the atmosphere causes the moon to take on colors other than gray. Or you could just say the game isn't on Earth. And finally, Rule of Cool.

vnsbr
Interested
Posts: 40
Joined: Sun Dec 17, 2017 4:13 pm

Re: Ninja Mitsuo - platformer game with SGDK

Post by vnsbr » Mon Feb 11, 2019 2:12 pm

thanks guys, I have been with little spare time but I am still trying to work in the engine at least.

Speaking of colors and moons :lol: the sprites werent made with the sega genesis palette and I have a hard time showing all the details and it really pisses me of :x

I used aseprite to match the genesis palette and it got a little better. Still losing details like in the cloud compared to original art. I also wrote a little program and it gets better results in some images.. but others not.

I also worked on a temporary life bar.
Fusion 3.64 - Genesis - SAMPLE PROGRAM 11_02_2019 11_07_13.png
Fusion 3.64 - Genesis - SAMPLE PROGRAM 11_02_2019 11_07_13.png (19.13 KiB) Viewed 1863 times
and the C# code to find the colors, maybe it helps someone

Code: Select all

       
       static List<Color> genesisColors = new List<Color>();
        static Dictionary<Color, Color> dicColor = new Dictionary<Color, Color>();
       
        private static void FindBestColors(string directory)
        {
            for (int i = 0; i < 255; i += 34)
            {
                for (int j = 0; j < 255; j += 34)
                {
                    for (int k = 0; k < 255; k += 34)
                    {
                        genesisColors.Add(Color.FromArgb(i, j, k));
                    }
                }
            }

            foreach (var file in System.IO.Directory.GetFiles(directory))
            {
                if (!file.EndsWith(".png"))
                    continue;
                var bmp = (Bitmap)Image.FromFile(file);
                ReplaceColor(bmp);
                var encoderParameters = new EncoderParameters(1);
                encoderParameters.Param[0] = new EncoderParameter(System.Drawing.Imaging.Encoder.Quality, 1L);
                bmp.Save(Path.GetDirectoryName(file) + "\\best\\"+ Path.GetFileName(file), GetEncoder(ImageFormat.Png), encoderParameters);
            }
        }
        
        private static double ColourDistance(Color e1, Color e2)
        {
            long rmean = ((long)e1.R + (long)e2.R) / 2;
            long r = (long)e1.R - (long)e2.R;
            long g = (long)e1.G - (long)e2.G;
            long b = (long)e1.B - (long)e2.B;
            return Math.Sqrt((((512 + rmean) * r * r) >> 8) + 4 * g * g + (((767 - rmean) * b * b) >> 8));
        }

        private static void ReplaceColor(Bitmap bmp)
        {
            var lockedBitmap = new LockBitmap(bmp);
            lockedBitmap.LockBits();

            for (int y = 0; y < lockedBitmap.Height; y++)
            {
                for (int x = 0; x < lockedBitmap.Width; x++)
                {
                    var oldColor = lockedBitmap.GetPixel(x, y);
                    if (dicColor.ContainsKey(oldColor))
                    {
                        lockedBitmap.SetPixel(x, y, dicColor[oldColor]);
                    }
                    else
                    {
                        Dictionary<Color, double> imageDictionary = new Dictionary<Color, double>();
                        foreach (var color in genesisColors)
                        {
                            var dist = ColourDistance(oldColor, color);
                            imageDictionary[color] = dist;
                        }
                        imageDictionary = imageDictionary.OrderBy(d => d.Value).ToDictionary(d => d.Key, d => d.Value);
                        Color newColor = imageDictionary.FirstOrDefault().Key;
                        int i = 1;
                        while (dicColor.ContainsValue(newColor) && i <= dicColor.Count)
                        {
                            newColor = imageDictionary.Skip(i++).FirstOrDefault().Key;
                        }
                        lockedBitmap.SetPixel(x, y, newColor);
                        dicColor[oldColor] = newColor;
                    }
                }
            }
            lockedBitmap.UnlockBits();
        }
        
Color distance is based in some article I found on internet :oops: and lockbitmap class: https://www.codeproject.com/Tips/240428 ... n-Csharp-3

Miquel
Very interested
Posts: 468
Joined: Sat Jul 30, 2016 12:33 am

Re: Ninja Mitsuo - platformer game with SGDK

Post by Miquel » Tue Feb 12, 2019 11:07 pm

Ok, let’s prepare comfy chairs because this is a potential winner, I can see that.

But there is something I have to mention; in this darker approach you have taken now, main character is barely visible: you need contrast colors there. Also the animation when striking is unnatural, with dynamic loading you can have extremely large animations going on.
Help. Spanish TVs are brain washing people to be hostile to me.

Post Reply