Saturday, December 26, 2020

I'm Moving, Virtually

First, sorry for going dark. I just haven't had the focus or energy to put into tutorials or the blog or personal projects really. Second, the exciting news. Game Programming Adventures is moving to a new home! I'm in the progress of migrating from Blogger to WordPress. I've got most of the content moved. I lost some of the comments on the pages because they wouldn't export. The new URL will be:

https://cynthiamcmahon.ca/blog/ 

You can head over now and take a peek. The home page needs a bit of work yet. I need to create the images for the slider as I don't have images in the suggested resolution and the ones I do have are in different resolutions. I'll probably spend time doing that tomorrow.

Friday, December 4, 2020

Dragon's Claw Status Update

 I've been working on the next Dragon's Claw tutorial in between settling in to my new place. I'm trying to find a way to handle making a mass update to the data layer rather than just spewing out 1400 lines of code. I have an idea on what to do but it is a bit complex. I think the complex route is better than having you try and copy/paste over 1400 lines of code. The tutorial is about have a back end running that processes the queues of troops to be trained. For the back end I use a NodeJS script that calls an MVC controller action every hour, or tick. I should have the tutorial up over the weekend.

Tuesday, December 1, 2020

All Moved In

I am all moved in, though not 100% unpacked. I got the WiFi up and running on my computer so tomorrow I should be slowly easing back into working on projects and tutorials. I have some ideas on non-MonoGame tutorials that I'd like to do in relation to web development. I think my next tutorial, or two, will be on Dragon's Claw.

Saturday, November 28, 2020

Third Forest Rush Tutorial Is Live

I have published the third tutorial in the Forest Rush tutorial series to the web site. This tutorial covers running and jumping. You can find the tutorial on the Forest Rush page of the web site or you can use this direct link.

I will be doing some work on tutorials over the next few days but not much as I'm preparing to move on Tuesday.

Third Forest Rush Tutorial Update

Writer crashed on me last evening and I lost a couple hours worth of work because it could not repair the recovery file. So, I wasn't be posting it last evening like planned. I will be posting it later today.

Wednesday, November 25, 2020

First Tutorial In New Platformer Series Forest Rush

I have published a new tutorial in a series on creating a platform game with MonoGame to my web site. This tutorial creates a few core components that will be used in the game. You can find the tutorial on the new Forest Rush page of the site. I should have the second tutorial up tomorrow.

Tuesday, November 24, 2020

Third 3D Tile Engine Tutorial

I have published the third tutorial in my 3D Tile Engine tutorial series. This tutorials moves to using vertex and index buffers to dramatically increase performance. You can find the tutorial on the MonoGame Tutorials page of the site. You can also use this direct link to the tutorial.

I will be working on another tutorial over the next few days. It will likely be Eyes of the Dragon or Dragon's Claw but I have a few other ideas bouncing around in my brain. Stay tuned for more tutorials!

Monday, November 23, 2020

Stressful period over

Sorry for going dark the past week. I was going through a stressful time this past week and was unable to focus on projects, including my personal projects. The good news is that the issue is resolved successfully as of today so I will be able to get back to my normal routine. I will be starting work on tutorials again tomorrow, not sure what yet. It will either be Eyes of the Dragon or Dragon's Claw.

Monday, November 16, 2020

What's Next?

I took the weekend to see where I stood in my tutorials and projects. I feel Shadow Monsters is mostly done and will be keeping it on the back burner unless I get requests for a specific topic. That leaves my major series Eyes of the Dragon and Dragon's Claw. I have done some work on the next Eyes of the Dragon series and should publish it next week some time. Dragon's Claw takes more time but I have the full code base for what I plan to achieve with it already done. It is the process of moving it between projects and then writing the tutorial.

For my projects they are going well. Silver Prophet is mostly about content and is slow going. I don't know if I can reach my end goal on my own because the maps will be well over one million tiles and painting that by hand will be extremely time consuming. Shadow Monsters is similar. It needs content and effects.

Thursday, November 12, 2020

Dragon's Claw Tutorial 3

I have just published the third tutorial in the web game programming tutorial series Dragon's Claw on creating a turn multiplayer strategy game. This tutorial goes over the process for training troops. You can find the link to the tutorial on the Web Game Programming Tutorials page of the site or you can use this direct link.

Wednesday, November 11, 2020

3D Tile Engine and More

 I have posted the second tutorial in my 3D tile engine tutorial. This tutorial moves everything to a library and adds a customer shader instead of using a basic effect. I also update the tile set so that it is a power of two so it can be loaded onto the graphics card. You can find the tutorial on the MonoGame Tutorials page of the web site or use this direct link.

I'm also working on the third tutorial in my web programming series Dragon's Claw. I hope to have it finished tonight or tomorrow. Keep checking back for more details.

Tuesday, November 10, 2020

Updated Frames Per Second Counter

I made an update to my FPS counter. It is great to know the current FPS but the average FPS is also of great value. It gives you a better sense of how your game will perform over time. I also included a reset in case I need to test different areas of the game I'm working on. I thought I'd share the updates.



public class FramesPerSecond : DrawableGameComponent
{
    private float _fps;
    private float _updateInterval = 1.0f;
    private float _timeSinceLastUpdate = 0.0f;
    private float _frameCount = 0;
    private float _totalSeconds;
    private float _afps;
    private float _totalFrames;

    public FramesPerSecond(Game game)
        : this(game, false, false, game.TargetElapsedTime)
    {
    }

    public FramesPerSecond(Game game, 
        bool synchWithVerticalRetrace, 
        bool isFixedTimeStep, 
        TimeSpan targetElapsedTime)
        : base(game)
    {
        GraphicsDeviceManager graphics = 
            (GraphicsDeviceManager)Game.Services.GetService(
                typeof(IGraphicsDeviceManager));

        graphics.SynchronizeWithVerticalRetrace = 
            synchWithVerticalRetrace;
        Game.IsFixedTimeStep = isFixedTimeStep;
        Game.TargetElapsedTime = targetElapsedTime;
    }

    public sealed override void Initialize()
    {
        base.Initialize();
    }

    public sealed override void Update(GameTime gameTime)
    {
        KeyboardState ks = Keyboard.GetState();

        if (ks.IsKeyDown(Keys.F1))
        {
            _fps = 0;
            _afps = 0;
            _timeSinceLastUpdate = 0;
            _totalFrames = 0;
            _frameCount = 0;
            _totalSeconds = 0;
        }

        base.Update(gameTime);
    }

    public sealed override void Draw(GameTime gameTime)
    {
        float elapsed = (float)gameTime.ElapsedGameTime.TotalSeconds;
        _frameCount++;
        _timeSinceLastUpdate += elapsed;
        _totalFrames++;

        if (_timeSinceLastUpdate > _updateInterval)
        {
            _totalSeconds++;
            _fps = _frameCount / _timeSinceLastUpdate;
            _afps = _totalFrames / _totalSeconds;

            System.Diagnostics.Debug.WriteLine("FPS: " + _fps.ToString());
#if !ANDROID
            Game.Window.Title = "FPS: " + _fps.ToString();
#endif
            _frameCount = 0;
            _timeSinceLastUpdate -= _updateInterval;
            System.Diagnostics.Debug.WriteLine("AFPS: " + _afps.ToString());
#if !ANDROID
            Game.Window.Title += " - AFPS: " + _afps.ToString();
#endif
        }

        base.Draw(gameTime);
    }
}

Sunday, November 8, 2020

New Tutorial Series - 3D Tile Engine

 I've started a new tutorial series on creating a tile engine using 3D rendering instead of SpriteBatch for drawing the tiles. The first tutorial is available on the MonoGame Tutorials page of the web site.

Saturday, November 7, 2020

Discord!

 I have just finished creating a Discord server for Game Programming Adventures. You can access it with the following link: https://discord.gg/UQSqxY6tR6. I'm hoping you can join and spend some time here. We can talk about the various forms of game programming and programming in general or just chat about anything.

I'm having a bit of a drought as far as programming and writing is involved. Just can't really focus and my productivity is down. I really fell during the Game Jam on Wednesday and haven't been able to focus at all. It was a struggle to get me entry finished and submitted. I'm hoping taking it easy over the weekend resolves the issue.

Friday, November 6, 2020

Silver Prophet Update

 I've been doing some work on Silver Prophet. It is going slow because it is more content creation than programming. I swapped the base tileset I was using for another that  matches my sprites better. I haven't update the interiors to match the exterior yet. I'm still using a tileset that I found on https://opengameart.org. I've found it by a couple different creators so I'm unsure who to credit. I've posted a quick video of the work so far.



Thursday, November 5, 2020

Weekly Game Jam 173 Finished

 Weekly Game Jam 173 is officially over. I was able to submit a working game with most of my desired game play elements in play. I ran out of steam yesterday though and coasted to the finish line. My entry is called Dungeon Delver and is a Rogue-like dungeon crawl. You can find the demo on my itch.io profile. 

https://cynammon.itch.io/dungeondelver

Tuesday, November 3, 2020

Weekly Game Jam 173 Update

 I did post, or I tried to, last night but it appears my post was lost in cyber space. I've made some good progress in the game. I have food and loot working. I'm currently working on field of view for the play and enemies. I'm struggling with this for some reason. I can't come up with an algorithm that I like. Everything feels clunky and is very computationally expensive. It's fine for the player but having 100 enemies really sucks the life out of the game.


Monday, November 2, 2020

Weekly Game Jam 173 Update

 I didn't get as much accomplished this evening as I would have liked. Still, I did make progress and I'm optimistic I can make the 1:00pm deadline on Thursday, or at least be able to submit a working prototype. I was working on loot and equipping loot. I got the loot loaded onto the map, the player can pick up loot but they can't use it yet. Also, I got the source rectangles in the sprite sheet mixed up. Most items are a row off. That is easily fixed though. I also added floating text with damage received/dealt with a health bar and food bar for the player. As promised a video of my progress so far.



Weekly Game Jam 173 update

I've been working on my Weekly Game Jam 173 entry. It's going well. I have secret doors working and I have combat working. The player also heals over time in between combats while moving. There is a chance that attacks miss. I haven't implemented critical hits but it is on my planned features.

What I am working on now:

  • loot
  • equipping loot
  • food
  • field of view
  • sound/music
  • save/load
  • persistent high score list

I will post another update and video later on today.

Sunday, November 1, 2020

Weekly Game Jam 173 Update

I didn't have near the time that I wanted this weekend to work on this. I have managed to get my map working in MonoGame, doors working and enemies spawning. I plan on starting spawning secret doors and combating enemies tomorrow. I'm hoping that I can manage to pull that off tomorrow and implement line of sight rather than revealing the whole map.

I'm using some static assets to try and go with the old Rogue feel from the original game that I found on Open Game Art. They're not perfect but the point is game play not polished perfection. I might finished the game at some point and then I will be pickier about the assets. As promised here is a short video of my progress so far.


 


Friday, October 30, 2020

Weeklly Game Jam 173 - Secret Door

There is another weekly game jam that started today with a theme I can totally get behind, Secret Door. So, I'm doing a Rogue-like with secret doors. Hopefully I come up with some original game ideas over the next few days. 

I don't have a map rendering in MonoGame yet but I have a map being created. I just need to convert it to a tile map and all will be good. I should have that up and running tonight, tomorrow for sure. I will post a video tomorrow of my progress. If had something visual I would tonight.

Thursday, October 29, 2020

Second Collision Detection Tutorial Is Live

I have just published the second tutorial in my collision detection mini-series aimed at beginners. This tutorial covers doing collision detection with multiple bounding boxes and with bounding circles. You can find the tutorials on the MonoGame Tutorials page of the site. You can also use this direct link.

Wednesday, October 28, 2020

Beginner Collision Detect Tutorial

I have added a general tutorial on collision detection in MonoGame. It starts with the basics of testing for bounding box collision detection. It then moves to pixel based collision detection followed by collision detection of rotated objects. I will be doing another tutorial that covers alternate collision detection like multiple bounding boxes, bounding circles and a full explanation of per pixel collision detection on rotated animated sprites. You can find the link to the tutorial on the MonoGame Tutorials page of the site or you can use this direct link.

Tuesday, October 27, 2020

Per Pixel Collision Detection on Rotated and Scaled Sprites

This post about detecting collision between two rotated and/or scaled sprites where the sprites are part of a sprite sheet. I found lots of examples of detecting entire sprites but not so much for sprite sheets. This is an extension of my previous post about detecting if two sprites in sprite sheets collide.

For this to work you need to create a transformation matrix for each sprite. It is calculated by using the following formula: Matrix.CreateTranslation(new Vector3(-Origin, 0)) * Matrix.CreateScale(Scale) * Matrix.CreateRotationZ(Rotation) * Matrix.CreateTranslation(new Vector3(Position, 0)). Origin is calculated by (SourceRectangle.Width / 2, SourceRectangle.Height / 2).

The collision method takes six parameters: the source rectangle of sprite A, the transformation matrix of sprite A, the sprite sheet of sprite A, the source rectangle of sprite B, the transformation matrix of sprite B and the sprite sheet of sprite B. If a source rectangle is null the entire sprite sheet will be used.

It calls a second method that does the actual collision detection. It takes as parameters the source rectangle of sprite A, the transformation matrix of sprite A, the color data of sprite A, the source rectangle of sprite B, the transformation matrix of sprite B and the color data of sprite B.



/// <summary>
/// Checks if two sprites in a sprite sheet collide using per pixel collision detection
/// </summary>
/// <param name="sourceA">Nullable source rectangle of sprite A in the sprite sheet</param>
/// <param name="transformA">Transformation matrix for sprite A</param>
/// <param name="textureA">Texture for sprite sheet A</param>
/// <param name="transformB">Transformation matirx for sprite B</param>
/// <param name="sourceB">Nullable source rectangle of sprite B in the sprite sheet</param>
/// <param name="textureB">Texture for sprite sheet B</param>
/// <returns></returns>
public static bool SpriteSheetCollision(
    Rectangle? sourceA,
    Matrix transformA,
    Texture2D textureA,
    Rectangle? sourceB,
    Matrix transformB,
    Texture2D textureB)
{
    // If the sourceA is null use entire texture
    if (sourceA == null)
    {
        sourceA = new Rectangle(0, 0, textureA.Width, textureA.Height);
    }

    // Grab the texture data for checking if the pixels collide in the source rectangle
    Color[] textureDataA = new Color[sourceA.Value.Width * sourceA.Value.Height];
    textureA.GetData(0, sourceA, textureDataA, 0, textureDataA.Length);

    // If the sourceB is null use the entire texture as the source rectangle
    if (sourceB == null)
    {
        sourceB = new Rectangle(0, 0, textureB.Width, textureB.Height);
    }

    // Grab the texture data for checking if the pixels collide in the source rectangle
    Color[] textureDataB = new Color[sourceB.Value.Width * sourceB.Value.Height];
    textureB.GetData(0, sourceB, textureDataB, 0, textureDataB.Length);

    // Call the per pixel collision detection code
    return ColorDataCollides(sourceA.Value, transformA, textureDataA, sourceB.Value, transformB, textureDataB);
}

/// <summary>
/// Checks if two sprites collide using pixel perfect collision detection
/// where the sprites are rotated and/or scaled.
/// </summary>
/// <param name="sourceA">Source rectangle of sprite A in the sprite sheet</param>
/// <param name="transformA">The transformation matrix of sprite A</param>
/// <param name="textureDataA">The color data of sprite A</param>
/// <param name="sourceB">Source rectangle of sprite B in the sprite sheet</param>
/// <param name="transformB">The transformation matrix of sprite B</param>
/// <param name="textureDataB">The color data of sprite B</param>
/// <returns></returns>
private static bool ColorDataCollides(Rectangle sourceA, Matrix transformA, Color[] textureDataA, Rectangle sourceB, Matrix transformB, Color[] textureDataB)
{
    // Transformation of sprite A to sprite B
    Matrix mat1to2 = transformA * Matrix.Invert(transformB);

    // Loop over the source rectangle of sprite A
    for (int x1 = 0; x1 < sourceA.Width; x1++)
    {
        for (int y1 = 0; y1 < sourceA.Height; y1++)
        {
        
            // Calculate the position of the pixel in sprite A in sprite B
            Vector2 pos1 = new Vector2(x1, y1);
            Vector2 pos2 = Vector2.Transform(pos1, mat1to2);

            // Round to the nearest pixel
            int x2 = (int)Math.Round(pos2.X);
            int y2 = (int)Math.Round(pos2.Y);

            // Check to see if the pixel in sprite A is in the bounds of sprite B
            if ((x2 >= 0) && (x2 < sourceB.Width))
            {
                if ((y2 >= 0) && (y2 < sourceB.Height))
                {
                    // If the alpha channel of sprite A and sprite B is greater
                    // than zero we have a collision
                    if (textureDataA[x1 + y1 * sourceA.Width].A > 0)
                    {
                        if (textureDataB[x2 + y2 * sourceB.Width].A > 0)
                        {
                            return true;
                 }
                    }
                }
            }
        }
    }

    // No collision occurred
    return false;
}

The first method is similar to the previous method I posted the other day. It takes transformation matrices instead of destination rectangles. It uses the GetData method overload that takes a source rectangle. For starting position you need to use 0. If your texture has multiple levels you will want to repeat the testing for the different levels.

The second method does the actual collision detection. It calculates a matrix that is used to map the pixels in sprite A to the pixels in sprite B. That is done by multiplying the transformation matrix of sprite A by the inverse transformation of sprite B. I suggest reading up on matrix transformation if you're unclear about what is going on.

Next we loop over all of the pixels in sprite A and test if the collide with a pixel in sprite B. Inside the loops I create a vector for the current pixel in sprite A, or 1 in the code. I transform that vector next using the matrix we calculated earlier. I round the points to integers.

The next step is to check if the transformed pixel is inside the bounds of sprite B. If it is I compare the alpha channel of the two pixels. If their alpha channel are both greater than zero there is a collision and I return true. If a collision is not found I return false.

If you have questions leave a comment and I will answer them. I hope that you find the methods useful.

Monday, October 26, 2020

Space Raptor Tutorial 3 Is Live

 I have just posted tutorial. 3 in the Space Raptor tutorial series to the site. This tutorial adds in some backgrounds and frames per second counter. It also adds in a shield for the player that drains over time and regenerates slowly. I also add in a power up that gives the player three way shot for a limited time. You can find the tutorial on the MonoGame tutorial page of the site or you can download it from this direct link.

Per Pixel Sprite Sheet Collision Detection

 I've seen this question asked a few times but no public answers. How do you detect if two sprites in a sprite sheet collide using per pixel collision detection? The answer for entire sprites is available easily. I made two static methods that can be added to a project to check if two parts of a sprite sheet collide. Soon I will be posting code that handles rotated and scaled sprites as well.



public static bool SpriteSheetCollision(
    Rectangle destinationA, 
    Rectangle? sourceA, 
    Texture2D textureA,
    Rectangle destinationB,
    Rectangle? sourceB,
    Texture2D textureB)
{
    // If the sourceA is null use entire texture
    if (sourceA == null)
    {
        sourceA = new Rectangle(0, 0, textureA.Width, textureA.Height);
    }

    // Grab the texture data for checking if the pixels collide in the source rectangle
    Color[] textureDataA = new Color[sourceA.Value.Width * sourceA.Value.Height];
    textureA.GetData(0, sourceA, textureDataA, 0, textureDataA.Length);

    // If the sourceB is null use the entire texture as the source rectangle
    if (sourceB == null)
    {
        sourceB = new Rectangle(0, 0, textureB.Width, textureB.Height);
    }

    // Grab the texture data for checking if the pixels collide in the source rectangle
    Color[] textureDataB = new Color[sourceB.Value.Width * sourceB.Value.Height];
    textureB.GetData(0, sourceB, textureDataB, 0, textureDataB.Length);

    // Call the per pixel collision detection code
    return ColorDataCollides(destinationA, textureDataA, destinationB, textureDataB);
}

public static bool ColorDataCollides(Rectangle a, Color[] textureDataA, Rectangle b, Color[] textureDataB)
{
    // Find the bounds of the rectangle intersection
    int top = Math.Max(a.Top, b.Top);
    int bottom = Math.Min(a.Bottom, b.Bottom);
    int left = Math.Max(a.Left, b.Left);
    int right = Math.Min(a.Right, b.Right);

    // Check every point within the intersection bounds
    for (int y = top; y < bottom; y++)
    {
        for (int x = left; x < right; x++)
        {
            // Get the color of both pixels at this point
            Color colorA = textureDataA[(x - a.Left) +
                                    (y - a.Top) * a.Width];
            Color colorB = textureDataB[(x - b.Left) +
                                    (y - b.Top) * b.Width];

            // If both pixels are not completely transparent,
            if (colorA.A > 0 && colorB.A > 0)
            {
                // then an intersection has been found
                return true;
            }
        }
    }

    // No intersection found
    return false;
}

Sunday, October 25, 2020

Frames Per Second Counter

So, I'm going to try something new. I'm not happy with the way it is rendering 100% but it should copy/paste fine. Most probably have one by now but I thought I'd share my frames per second component outside of a tutorial on its own. It renders the FPS into the title bar of the window and the output log in Visual Studio. I recommend using the base constructor and adding it to the list of game components in the constructor using Components.Add(new FramesPerSecond(this)).

UPDATE: I fixed the issues I had with code.


using System;
using Microsoft.Xna.Framework;

namespace Psilibrary
{
    public sealed class FramesPerSecond : DrawableGameComponent
    {
        private float _fps;
        private float _updateInterval = 1.0f;
        private float _timeSinceLastUpdate = 0.0f;
        private float _frameCount = 0;

        public FramesPerSecond(Game game)
            : this(game, false, false, game.TargetElapsedTime)
        {
        }

        public FramesPerSecond(
            Game game, 
            bool synchWithVerticalRetrace, 
            bool isFixedTimeStep, 
            TimeSpan targetElapsedTime)
            : base(game)
        {
            GraphicsDeviceManager graphics = 
                (GraphicsDeviceManager)Game.Services.GetService(
                    typeof(IGraphicsDeviceManager));

            graphics.SynchronizeWithVerticalRetrace = synchWithVerticalRetrace;
            Game.IsFixedTimeStep = isFixedTimeStep;
            Game.TargetElapsedTime = targetElapsedTime;
        }

        public sealed override void Draw(GameTime gameTime)
        {
            float elapsed = (float)gameTime.ElapsedGameTime.TotalSeconds;
            _frameCount++;
            _timeSinceLastUpdate += elapsed;

            if (_timeSinceLastUpdate > _updateInterval)
            {
                _fps = _frameCount / _timeSinceLastUpdate;
                System.Diagnostics.Debug.WriteLine("FPS: " + _fps.ToString());
                Game.Window.Title = "FPS: " + ((int)_fps).ToString();
                _frameCount = 0;
                _timeSinceLastUpdate -= _updateInterval;
            }

            base.Draw(gameTime);
        }
    }
}

Space Raptor Tutorial 3 Status

I did some work on the next Space Raptor tutorial today. It covers adding in a shield for the player and a power up that gives the player a three way shot. It also adds a frames per second counter so you can gauge how well your game is performing. I'd recommend baselining it on an empty game so you know how hot your machine runs when it is unthrottled and what impact your code changes has on your games.

Saturday, October 24, 2020

Space Raptor Tutorial 2 Is Live

Sorry for not posting yesterday. I was not feeling well and didn't feel up to working on the computer. Today has been a better day though. I was able to work on programming and writing.

I have published the second tutorial in the Space Raptor mini-series to my site. This tutorial covers enemies firing bullets, explosions when the player or an enemy explode and pixel perfect collision detection between objects. You can find the tutorial on the MonoGame Tutorials page of the site or you can use this direct link.

Thursday, October 22, 2020

Space Raptor Tutorial One

 I have just published the first tutorial in my new MonoGame mini tutorial series Space Raptor. Space Raptor is a shoot 'em up or shmup that takes place in space. The object is to navigate through a sea of enemies and eventually defeat the final boss. This tutorial covers setting up the projects and adding in some basic components. It then moves to firing bullets and collision detection. You can find the tutorial on the MonoGame Tutorials page of my web site.

Wednesday, October 21, 2020

Shoot 'em Up (Shmup)

 I want to work on tutorials but I don't want these long involved tutorial series. I will still be working on the longer series but I want something shorter. For that reason I will be starting work on a Shoot 'em Up or Shmup. This will be a side scrolling game and will feature some more complex collision detection such as bounding circle, per pixel or pixel perfect collision detection. I will also be working on some other smaller games like platformers and probably a match three.

I'm planning out the next tutorial in Eyes of the Dragon. It will cover more work in the editor, saving the world from the editor and loading it back in again in the editor and the game.

Tuesday, October 20, 2020

Eyes of the Dragon Tutorial 6 is Live

I have published tutorial 6 in my Eyes of the Dragon tutorial series that is built using MonoGame. This tutorial starts building the game editor. The editor is unfortunately not cross platform and uses Windows Forms and DirectX. You can find the tutorial on the Eyes of the Dragon page of the site or you can use this direct link.

Sunday, October 18, 2020

Eyes of the Dragon Tutorial 6 Update

 I've made it about three quarters of the way through the next Eyes of the Dragon tutorial. As I've mentioned previously this tutorial focuses on creating a level editor for the game. I hope to wrap it up over the next few days. I've been busy with my app and it takes a lot of my attention.

Friday, October 16, 2020

Eyes of the Dragon Tutorial 6 Status and More

 I have started work on tutorial 6 in the Eyes of the Dragon tutorial series. This tutorial is about creating the editor for building worlds. It is unfortunately a Windows project instead of a cross platform solution because I use Win Forms. It is much easier to use the existing controls than trying to recreate them in MonoGame.

I've also been working on my app for Google Play and eventually the App Store. It is a mood tracker for people with bipolar disorder but more than that. It will also be a social media platform where they can connect with others with bipolar disorder.

I didn't work on my games much the past few days. I did do some work on Silver Prophet on my editor and in the editor. As I've said before, programming games is easy. Making the associated content that goes with them is what is hard. I'm looking at making a map that is 1000 tiles by 1000 tiles. That is hand painting a million tiles but more because my map has about five layers so that is up to five million tiles. That does not include all of the interior locations and dungeons. So, lots of work that is probably going to take years to complete. Even if I cut it in half I'm still looking at a million tiles.

Wednesday, October 14, 2020

Thanksgiving

Thanksgiving was nice, but smaller. There were half as many people as normal thanks to COVID-19. We did have the other half join virtually over zoom and my sister delivered their turkey dinners before hand. Yesterday was an off day. I just couldn't focus on anything. I puttered on my editor for Silver Prophet and did some level design. Nothing overly productive though. 

 I've started work on an app for Windows, Android and hopefully iOS eventually. It will be a free app, with ads, and is meant for people with bipolar, like me. It tracks their mood and sleep, which is very important. There are other apps that do this but I plan to offer a chat feature and a forum feature which other apps do not have.

Sunday, October 11, 2020

Drive Crash

 So, the drive in the laptop I spent the past few days working on died. I didn't lose much but I lost some tutorial work. Fortunately I have this laptop and all of my source code was stored on GitHub so the work that I've done is safe. Still, it sucks and I'll have to replace the drive. It is Thanksgiving here on Monday so I doubt I'll be doing any new tutorial work until Tuesday.

Saturday, October 10, 2020

Silver Prophet Battle Engine

Today I worked on Silver Prophet's battle engine. It's coming along nicely. I need to add attack animations yet but either side of the field can win or lose the battle. When a character is damaged the amount floats from the top of their head and fades to transparent. When they receive enough damage they go to a damaged state. Each character has a separate timer that controls when they can attack. When the play is ready their battle icon flashes and can be clicked. It opens up a context menu where they can choose from a basic attack, skill attack or use an item.




Friday, October 9, 2020

Laptop Transfer

I spent most of the data transferring from my main laptop to a different laptop. I had to reinstall most of the software, transfer data and set up the environments the way that I like. It's taking a bit to get used to the new keyboard after primarily using the other for so long. I do now have everything setup the way that I like and did do some work on Silver Prophet. I did a little graphic design as well, on the loading screen. It's not finished but I like it.



Thursday, October 8, 2020

Character Generator

 So, I'm working on Silver Prophet as my main project. It is going relatively well. I make progress every day and rarely get stuck for long. Right now the big problem is assets. I'm not a pixel artist by any means. I can do some basic graphic design but I don't have an aesthetic eye. Something has to be really bad for me to dislike it. I found a good site for RPG sprites that I thought I'd share. It builds more than just four directional movements. It has some basic actions as well. The sprites are free to use, even for commercial use, with attribution. Be sure to check them out.

http://gaurav.munjal.us/Universal-LPC-Spritesheet-Character-Generator/#?weapon=trident

Wednesday, October 7, 2020

Patreon

 I am now on Patreon for building Silver Prophet. I would appreciate your support in developing my game.https://www.patreon.com/synammon

Shadow Monster Tutorial 25 Is Live

I have just uploaded tutorial number 25 in the Shadow Monsters tutorial series that uses MonoGame. This tutorial covers how to capture shadow monsters. You can find the tutorial on the MonoGame tutorials page of the web site or you can use this direct link.

Tuesday, October 6, 2020

Shadow Monsters Tutorial 25 Update

 I've been working on tutorial 25 in the Shadow Monsters MonoGame tutorial series. I'm about two thirds through it. I will definitely finish it up tomorrow if not later today. As I've mentioned this tutorial covers healing shadow monsters and capturing new shadow monsters from random battles.

I'm in the process of creating a Patreon page to help fund my projects. On it I plan on offering premium tutorials as well as access to my latest build of Silver Prophet. I've been working on Silver Prophet and have been making some progress. I updated the combat engine so that you only fight for the player and NPCs that you've recruited fight for themselves. It is working great but I need to add in some animations for the battle.

Monday, October 5, 2020

Leaving Weekly Game Jam

 I am sadly leaving the weekly game jam. I was just plagued by problems with my editors and made no progress towards having my demo done by the deadline. I'm keeping the code though and plan to finish the game eventually. It will be a 2D platformer. I might even use it for a new tutorial series because there are some techniques that I haven't used in my other tutorial series.

Today I'm going to chill and putter around on various projects. I will likely spend some time writing as well. I'd like to post a new tutorial tomorrow.

Sunday, October 4, 2020

Weekly Game Jam Update

 I've made zero progress over the past day. I have my character on the map. She can jump but she warps to the ends of the map when she lands. I'm really discouraged by my lack of progress. I'm considering withdrawing from the jam and focus on my projects and tutorials. If I can't make any progress today I probably will withdraw.

Friday, October 2, 2020

Weekly Game Jam

 I found out about a weekly game jam and I'm taking place. The theme for the jam is treasure hunt, which I can totally get behind. I'm creating a platformer with a female elf as the protagonist. She is well, a treasure hunter, hunting for the famed Flame Sapphire. She will battle her way through enemies, over obstacles, solve puzzles and hopefully more if I have enough time. For that reason I will be putting tutorials on hold until the deadline next Thursday to focus on the game. I've made some good progress and have a game up, running, rendering the world and some basic animation up and running. I will be posting some video of my progress on here and on Twitter and Facebook.

Thursday, October 1, 2020

Silver Prophet

I updated My Projects Page with my old XNA project Silver Prophet that I converted to MonoGame. It is a fantasy role playing game set in a world filled with angels, demons and other fantastic monsters. The back story is that the Silver Prophet foretold of a hero that would appear in the town of Shadow Down in the hour of the world's greatest need.

I did some work on tutorial 25 in the Shadow Monster tutorial series. This tutorial covers capturing random shadow monsters. I should have it up tomorrow or Saturday.

Wednesday, September 30, 2020

Android

I spent the day porting Shadow Monsters  to Android. The issue I had was dealing  with input. Touch is very different than keyboad, mouse and game pad input. In most cases I had to implement an event based model to handle taps. I now have most of the game working. The items remaining are shops, selecting items and selecting shadow monsters. I'm going to hold off on those because I'm going to redesign how I handle lists. I will design them with touch input in mind.

I came across an issue I need to resolve. I load the world using the content manager. Trying to load it a second time,  if the player exits and goes back in, does not reload the world. The world is in the exact same state. The same is true for other content. I only just discovered this and haven't worked out how  I'm going to workaround it.

Over  the  next few days I will be devoting some time to my next tutorial. I haven't decided which series I will be working on. Probably Eyes of the Dragon but I might do another Shadow Monsters.

Tuesday, September 29, 2020

Shadow Monsters Tutorial 24 Live

 I have published tutorial 24 in my Shadow Monsters tutorial series that is made using MonoGame. This tutorial covers adding random encounters to the game. You can find the tutorial on the MongGame Tutorials page of my site or you can use this direct link.

Monday, September 28, 2020

Productive Day

 It was a productive day for me today. I didn't get near enough time to focus on projects though. A lot of other stuff was too important and could not be put off. I devoted my time to Shadow Monsters and using XML content and the content pipeline instead of saved binary files. I did that so I can easily port the game to Android. I did some inital tests and the results were favorable.

 Have a lot on my plate again tomorrow. Not sure how much time I will have for projects.  I hope to spend at least some time on tutorials.

Sunday, September 27, 2020

Shadow Monsters Tutorial 24 Update

I did some work on tutorial 24 in the Shadow Monsters tutorial series today. I finished all of the code and am about a third of the way through the writing. This tutorial covers how I added random battles to the game. I hope to wrap it up tomorrow or Tuesday at the latest.

Saturday, September 26, 2020

Frustrating Day

 Today was very frustrating from a code point of view. I was happy to be able to get my old project Silver Prophet working as a MonoGame project including my content. Moving on to  the editor caused nothing but headaches. There are reference issues and the code for the render control doesn't work in MonoGame. I have  some ideas but I needed to step away.

The other thing I tried to do is port Shadow Monsters to Android. Initially it went well. In about an hour I had an app running and the title screen showing. I updated buttons to work with touch and wanted to test a virtual thumbstick. That is when the problem hit. I couldn't access non-content manager conten. Tried a number of things but nothing proved fruitful. That means I need to rethink how I load  and save worlds and  shadow monsters. Not sure how much work it will end up being but probably worth it in the end.

That was my day. Frustrating becauae I kept hitting walls. Some good did come out of it though so not a complete waste.

 


Off Day

 I spent the day yesterday working on other projects than Shadow Monsters. I migrated my project Silver Prophet from XNA to MonoGame. It went rather smoothly. I had to upgrade some references and modify some code but it builds and runs.

Today I'm working on bringing in the editor. There are some reference errors and some ambiguous errors between two namespaces. It is weird that they are here when it works fine in XNA. I should be able to resolve them without much problem.

Once I get the editor up and running the next step is to switch back to Shadow Monsters and work on maps. Tomorrow the plan is to work on a new tutorial. I will probably do Shadow Monsters and add in random encounters to the game and the editor.

Thursday, September 24, 2020

Shadow Monsters Update

 Today I worked on my Shadow Monsters. A lot of the work was content related but some of it was new features. I updated the game so that if you walk in front of somebody that is looking at you the game pauses and they walk up to you and initiate a fight, if they have shadow monsters that aren't fainted. I was having a problem with one case. That is if you are west of a character and you walk in front of them. They would start walking and just keep on going. It was quite frustrating to track down.

Tuesday, September 22, 2020

Project Migration

Today I migrated my Shadow Monsters from MonoGame 3.7.1 to 3.8. I ended up having to create a new user profile to do it. It's because of a bug in MonoGame 3,8 where if there is a space in the folder name the content builder is in it breaks. I used my full name so there was a space.

After I had a working profile and could run a test game it was time to migrate. The recommended process is to create a new project then copy over your .csproj files. I ended up going a different route. I decide that because everything was in one project and I wanted to reuse the code in other projects to split the project in two. I created a new project. I added all of the GameStates from the old project to the game and replaced the Game1 class with that. I created a new .NET Library and added the NuGet Packaages for MonoGame.Framework.DesktopGL and MonoGame.Framework.Content.Pipeline because I use the intermediate serializer for some custom content. I then added all of the other .cs files to this project. I added a reference for the library to the project. Then I needed to fix the bugs from splitting the solution but I got it working.

I have a custom tool that I use for building sprites. I added that project to the solution but when adding a reference for the library Visual Studio complained that .NET 4.7.1 cannot reference .NET Core 3,1, which MonoGame 3.8 is built with. Fortunately there is a workaround that was introduced in Visual Studio 2017. That is a project can target multiple frameworks. This isn't a perfect solution because there are differences between the different frameworks but I got it to work by targeting Core 3.0 and Standard 2.0.

That was my adventure for today. I'm happy with the end result and look forward to working with MonoGame 3.8.

Monday, September 21, 2020

Battery Recharge

I'm going to be taking a break from tutorials. I can do the code but I'm having problems with the writing. It just hasn't been flowing. I will still be working on my game and a lot of it will be going into the Shadow Monsters tutorial series eventually. I will also be porting my XNA game to MonoGame now that I've repaired a huge problem I was having with Visual Studio and found a way to move my content.

It would be really helpful is you left comments on what you'd like to see tutorials on. I'm only going off what I've implemented so far but you might have an idea for a cool feature you would like to see implemented.

Sunday, September 20, 2020

Bad Day Yesterday

 I didn't get much work done on anything yesterday. I was debugging some problems with Visual Studio. I managed to fix them up this morning. I did update my demo version with my latest changes. If you want to bind shadow monsters you can buy binding scrolls in the house to the east of where you start. You can heal your monsters in the house to the far east by choosing the rest conversation option. There is still a lot that I want to add but it is coming along nicely.

TodayI hope to get more done, working on the Eyes Of The Dragon tutorial series. I think that I will be starting with editors early and build up the engine with the editor instead of the game. I might even go over upgrading the project to MonoGame 3.8.

Friday, September 18, 2020

Binding Shadow Monsters

I've been working on my Shadow Monsters project. I added in the ability to bind shadow monsters similar to capturing pokemon in Pokemon. It is working okay. I will probably change the animation but it works for now. Here is a short video of the battle engine with the binding process.



Thursday, September 17, 2020

Shadow Monsters Tutorial 23 Is Live

I have just uploaded tutorial 23 in the Shadow Monsters series to the site. This tutorial adds in a few more game states including a loading state. You can find the tutorial on the MonoGame tutorials page of the site or you can use this direct link.

Wednesday, September 16, 2020

Status Update

 The focus for day was content creation for my Shadow Monsters. I did a lot of work on my first level creating the interior for several houses, created several sprites and map work. I also worked some on the next tutorial in the Shadow Monsters series. I got most of the code done and some of the writing. I should finish it up in the next day or so. The tutorial and my game are nearly identical but with some key differences. One of the biggest difference is the sprites. I'm using sprites made with Spriter Pro. I purchased the RPG Heroes pack ages ago and they are fitting in well with my game. I'm also using some images that I found through OpenGameArt.org for my shadow monsters.

Keep checking back for new tutorials and the latest news on my projects.

Tuesday, September 15, 2020

Was A Good Day

 Today was a good day for my Shadow Monsters project. I made some good progress on adding polish to the game. I have almost all of the essential areas of game play working. There are a few areas that I still need to work on. They revolve around battling other characters and some display issues when the aspect ratio of the player's chosen resolution does not match the base resolution. I have a plan in place for that though. 

On another note I'm happy that I got my XNA version of thel Eyes of the Dragon working again. I had to revert back to Visual Studio 2010 but at least all of that work is not lost. I will be updating my project page to include it. I should probably upgrade it to MonoGame but I had so many headaches the last time that I tried. I do have a workaround for the content issues I had though so might be worth giving it a go.

Monday, September 14, 2020

Shadow Monsters Update

 As well as working on my Eyes Of The Dragon tutorial I worked on my Shadow Monsters game. I worked on capturing random shadow monsters. I'm pretty happy with the results. Developing the game is getting less and less about programming and more and more about content creation. The editors are all in good shape and I'm making progress on content. I need to flesh out the story and the conversations of the characters.





Eyes Of The Dragon Tutorial Five Live

 A day later than I planned but I just uploaded tutorial five of my MonoGame tutorial series Eyes of the Dragon to my Google drive. This tutorial adds in a sprite for the player to control and does some work on the role playing system. I'm using a variant of the SPECIAL system for the back end. You can find the tutorial on the Eyes Of The Dragon page of the site. You can also use this direct link.

Saturday, September 12, 2020

Eyes Of The Dragon Tutorial Five Status

 I did some work on tutorial five in Eyes of the Dragon today. I got a good start on it, about half way through I'd say. I have the code ready to go for the rest of it but I need to do the writing. I should have it up on the blog tomorrow. The tutorial will cover creating the player component and go a bit into character classes. Character class will evolve a bit as I go through the tutorials because I can't implement everything all at once.

Friday, September 11, 2020

Slow Day

 I took the day to work on my home brews rather than tutorials. I put up a video of my demo of my version of Shadow Monsters as well as the demo version. You can find the details on the My Project page of the blog, I linked to the artists that I used from OpenGameArt,.org and I suggest checking them out, especially cynicmusic because good music can be hard to find.

Thursday, September 10, 2020

Shadow Monsters Tutorial 22 Is Live

 I have published tutorial 22 in the MonoGame tutorial series Shadow Monsters to my Google Drive. This tutorial covers adding in a character generator to the game so the player can choose their character. You can find the link to the tutorial on my MonoGame Tutorials page. You can also open the PDF using this direct link.

The next tutorial I will be working on is my Eyes of the Dragon series that is also made with MonoGame. I will be working on it soon and hope to have it up in the next few days. Keep checking back on my blog for the latest news on my tutorials and projects.

Wednesday, September 9, 2020

Shadow Monsters Tutorial 22 Status

 I've been working on tutorial 22 in the shadow monsters series. I'm about half way done with it. This one covers creating a text box and a character generator. I will also fix a problem with resizing content based on screen resolution. I was doing integer division instead of floating point division when calculating scales. I resolved the problem by adding a property to the settings class that calculates the scale vector.  I then use that property instead of calculating the scale in all of the Draw functions.


Tuesday, September 8, 2020

Day Off

There was a death in the family last night. I just can't focus so I won't be working on a tutorial today. When I return to work I will be creating a character generator for Shadow Monsters rather than just creating a hard coded character.

Monday, September 7, 2020

Happy Labor Day

Busy  Labor Day for me. I didn't work directly on a tutorial. I worked on my game that Shadow Monsters is based on. A lot of it was spend in the editor. Game programming is easy, creating content is hard work. I did make a lot of progress on my map though. It was challenging getting some of the tiles to line up the way that I wanted to but in the end it worked out. I've included a few screen shots of the game play and the character generator.





Sunday, September 6, 2020

Eyes Of The Dragon Tutorial Four Is Live

 I have uploaded tutorial four in my Eyes Of The Dragon tutorial series to my drive. This tutorial covers adding game settings and handling different screen resolutions than the base resolution. You can find the tutorial on the Eyes Of The Dragon page of the blog or you can use this direct link.

Saturday, September 5, 2020

Frustrating Day

 Today was a wasted day. I was working on my XNA project and it randomly stopped working. I started getting platform unsupported errors. It's not so much the code that's the problem. It's all the custom content that I created for it. It is quite maddening to be sure. I am going to have to bite the bullet and migrate to MonoGame or Unity. I'll probably end up going with MonoGame. At least it's not a total rewrite. Just need to figure out what to do about the content. Not tomorrow though. Tomorrow is dedicated to tutorials.

Friday, September 4, 2020

Shadow Monsters Tutorial Twenty One Is Live

I have just uploaded tutorial twenty one in the Shadow Monsters tutorial series. The tutorial covers editing shadow monsters in the editor and encrypting the data. I also create some now moves for each of the starting avatars. You can find the tutorial on the MonoGame Tutorials page of my web site or you can use this direct link.

Thursday, September 3, 2020

Shadow Monsters Tutorial Twenty One Status

I've been working on tutorial twenty one in the Shadow Monsters tutorial series. I'm about half way through it.  It covers creating shadow monsters in the editor and encrypting the output. I should finish it up tomorrow. After this one I will be working on an Eyes Of The Dragon tutorial.

Wednesday, September 2, 2020

Eyes Of The Dragon Tutorial Three Is Live

I have just uploaded tutorial three in the Eyes of the Dragon series to my web site. The tutorial covers adding in three game states. You can find the tutorial on the Eyes of the Dragon page of the blog. You can also find the tutorial at this direct link.

Tuesday, September 1, 2020

Eyes Of The Dragon Tutorial Two Is Live

I have published the second tutorial in my reboot of my Eyes Of The Dragon tutorials in MonoGame. This tutorial creates the tile engine and renders a map. You can find the tutorial on the Eyes Of The Dragon page of my web site. You can also use this direct link.

Shadow Monsters Tutorial Twenty Is Live

 I have just added tutorial twenty in the Shadow Monsters tutorial series. The tutorial makes some improvements to the game and adds in sound. You can find the tutorial on the MonoGame Tutorials page of the web site or you can use this direct link.

Eyes Of The Dragon Tutorial One Is Live

 I have published the first tutorial in my reboot of my Eyes Of The Dragon in MonoGame. This tutorial creates the basic projects and adds some of the core components. You can find the tutorial on the Eyes Of The Dragon page of my web site. You can also use this direct link.

Monday, August 31, 2020

Dragon's Claw Tutorial Two Is Live

 I have just published tutorial two in the Dragon's Claw tutorial series. This tutorial covers creating and displaying tutorials. You can find the tutorial on the Web Game Programming Tutorials page of the site. You can also read it using this direct link.

Sunday, August 30, 2020

Dragon's Claw Tutorial Two Status

I spent the better part of the day working on the second Dragon's Claw tutorial. The initial plan was Shadow Monsters but I'm not sure what topic I want to cover next. While taking some time to think about it I decided to move onto Dragon's Claw. In this tutorial I do a lot of the work of empires. There are other features I plan to implement in the future.

While I'm talking about series there is something I have been planning for a while. That is migrating Eyes of the Dragon to MonoGame. It has a lot in common with Shadow Monsters because Shadow Monsters got a lot of its code from Eyes of the Dragon.

Dragon's Claw Tutorial One Live

 I have publishes the first tutorial in the Dragon's Claw tutorial series, which is a text based web game. This tutorial creates the project and goes over creating a new character. You can find the tutorial on the Web Game Programming Tutorials page of the site or at this direct link.

This is what the create character page looks like.


Once the character is created this is what the game screen looks like. You click ^ to collapse panels and V to expand panels. In future tutorials I will be adding the panels.



Dragon's Claw Tutorial One Status

I made a lot of progress on the first tutorial in the Dragon's Claw series today. The tutorial covers creating the project, setting up Less, creating some of the database tables, creating the layout for the game, creating some models, views and a controller, and some jQuery work. There was also some database layer work. 

I'm going to explain a little how the game works. When you first start the game you choose your sector. Your sector has a ruler and a race. The ruler has a class. The race and class have different strengths and weaknesses that affect the game in different ways. Once you have a sector the goal is to expand your empire through exploration or conquest before the end of the era. An era is between 8 and 12 weeks. The game is turn based where a turn occurs every hour. Each turn you gain resources and cool downs are reduced. Your sector can be part of an empire. You cannot do harmful actions on other empire members or allied empires. Each turn you generate terabytes of data. These terabytes are invested into different branches of technology. These branches affect the game in different ways.

The game takes place on a single page. The page is made up of panels with a title bar. The panels are collapsed initially. In the title bar are buttons that expand and collapse the panel. When a panel is expanded an AJAX call is made to the server. The returned data is displayed in the panel.

In addition to military conquest there is also espionage, raiding and psychic energy or psionic abilities. With espionage you gather intel, and run other operations You can raid other players for resources. With psionic abilities you can harm opponents or aid your allies.

Friday, August 28, 2020

Shadow Monsters Tutorial Nineteen Is Live

 I have just pushed tutorial nineteen in the Shadow Monsters tutorial series live. This tutorial continues on with handling different resolutions. You can find the tutorial on the MonoGame Tutorials page of the web site or you can use this direct link.

I'm also happy to announce that I have created a Git repository for the Shadow Monsters project that also contains all of the tutorials. You can find the repository here https://github.com/Synammon/Shadow-Monsters.

Dragon's Claw Tutorial Series

 I will starting work on a new tutorial series, Dragon's Claw. Dragon's Claw is a text based, turn based strategic RPG. It is in a sci-fi setting but it could easily be converted to a fantasy setting. It is entirely web based. I used the MVC pattern when developing it. Once you get to the game portion it is a single page application. All communication with the server is done using AJAX. Things that I used include jQuery, LESS and Font Awesome. Font Awesome is completely optional but jQuery is required so if you don't know it you will need to brush up on it. You can get away with using plain CSS instead of LESS. You would just need to use hard coded values instead of variables. I didn't use any functions so that shouldn't be an issue.

I will likely be alternating tutorials between Shadow Monsters and Dragon's Claw for a while. First I plan on finishing handling multiple resolutions in the game. After that I will probably publish my first Dragon's Claw tutorial as I want to work on that too.

Thursday, August 27, 2020

Tutorial Eighteen Is Live

 I have just posted tutorial 18 in the Shadow Monsters series. It starts on how to support multiple resolutions in the game. You can find it and all of my tutorials on the MonoGame Tutorials page of the blog or you can use this direct link.

GUI Buttons

 I've been searching for some GUI elements for the Shadow Monsters tutorial series. In particular I need buttons for moving a selection left or right. I went to my go to site, Open Game Art. I will be going with some graphics that were created by looneybits. They have a pack of graphic user interface of buttons that are pretty sharp. The link to the library is https://opengameart.org/content/gui-buttons-vol1. Here is a preview of the buttons.



Wednesday, August 26, 2020

Tile Set

 I will be linking it in my next tutorial but I found a tile set that I like for the tutorial series. It is by Fuwaneko Games and can be found here. It has more elements than the tile set that I'm currently using. I've linked the image below as well.

I am working on the next tutorial. It will be about handling different resolutions.

Tuesday, August 25, 2020

Tutorial Seventeen Is Live

 I have published the seventeenth tutorial in the Shadow Monsters tutorial series. This tutorial introduces the concept of a world instead of map. It updates both the game and the editor. You can find the tutorial on the MonoGame Tutorials page of the blog or you can use this direct link.

Sunday, August 23, 2020

Tutorial Sixteen Is Live

I have just posted the 16th tutorial in the Shadow Monsters tutorial series. This tutorial continues on with the editor. It covers creating portals, painting collisions and adding shadow monsters to the map. You can find the tutorial on the MonoGame Tutorial page or you can use this direct link.

Friday, August 21, 2020

Tutorial Fifteen Is Live

 I have just uploaded tutorial fifteen in the Shadow Monsters series. This tutorial continues on with the game editor. It covers adding in characters and merchants to a map. You can find the tutorial on the MonoGame Tutorials page of the site. You can also find the tutorial using this direct link.

Thursday, August 20, 2020

Tutorial Fourteen Is Live

 I have just finished uploading tutorial fourteen in the Shadow Monsters tutorial series to my web site. This tutorial continues on with the editor making changes to painting and saving and loading maps. You can find the tutorial on the MonoGames Tutorial page or you can use this direct link.

Wednesday, August 19, 2020

Tutorial Thirteen Is Live

 I have just uploaded tutorial thirteen in the Shadow Monsters tutorial series to the blog. This tutorial starts creating the game editor. You can find the tutorial on the MonoGame Tutorials page of the web site or you can use this direct link.

Monday, August 17, 2020

Tutorial Twelve Is Live

 I have just finished uploading tutorial twelve in the Shadow Monsters series. You can find the tutorial on the MonoGame tutorial page of the blog or at this link.
This tutorial covers loading in a saved game.

Tuesday, August 11, 2020

Tutorial Eleven Is Live

Sorry it has been so long, I've been having problems since I've been home from the hospital. I worked on tutorial 11 in the Shadow Monsters series as I could. I've finished it and posted it on the MonoGames Tutorials page of the web site.

Friday, July 24, 2020

Home and recovering

I was discharged from the hospital this morning. YAY! I need to take a few days to settle back in and get back into the swing of things and catch up. I'm going to write a bit on the blog about game programming, not necessarily MonoGame.

Stay tuned for more details.

Friday, July 10, 2020

Out until August 18th

So, I'm in rehab until August 18th with current projections. I'm hoping sooner because I'm making excellent progress.

Saturday, June 27, 2020

Still out

Recovery is going slower than I expected. I don't know when I will be discharged. Hopefully it will be sooner rather than later.

Sunday, June 21, 2020

Brief break

So, I ended up at the hospital yesterday.  I'm still in the hospital. Not sure when I'll be back but keep checking in for more details on the next tutorial.

Friday, June 19, 2020

tutorial eleven update

Quiet day today. I did some work on the next tutorial. It's coming along nicely. I should have it up on Monday. I added a portal layer and collision layer to the tile map now rather than changing the save and load logic later. The rest of the tutorial will focus on saving the game. For saving I'm taking a shot gun approach and saving everything. Stay tuned for more information.

Thursday, June 18, 2020

Tutorial eleven status

I haven't started tutorial eleven in the Shadow Monsters series yet. It will be about saving the game. I plan to finish it by Sunday or Monday. Stay tuned for more details.

Wednesday, June 17, 2020

Tutorial ten is live

Tutorial ten is now live.  It covers adding in basic items and how to use them. You can find the tutorial on the MonoGame Tutorials page of the site.

I will be starting work on the next tutorial shortly. Stay tuned for more information.

Tuesday, June 16, 2020

Tutorial ten status

I've been working on tutorial ten in the Shadow Monsters series. This tutorial covers adding in items to be used on shadow monsters. I should wrap it up tomorrow. I'm currently thinking on some topics for blog posts. If there is something you would like me to do a post on please leave a comment.

Monday, June 15, 2020

Tutorial nine is live

Tutorial nine has been uploaded to the site. It extends the battle state to include multiple Shadow Monsters. You can find it on the MonoGame Tutorials page of the site.

Sunday, June 14, 2020

Tutorial eight is live

I just uploaded tutorial eight in the Shadow Monsters tutorial series to the site. You can find the tutorial on the MonoGame Tutorials page of the sute. This tutorial covers adding in battles between Shadow Monsters.

Saturday, June 13, 2020

Tutorial seven is live

I just finished uploading tutorial seven to the site. It covers adding a component for the player. Check out the MonoGame Tutorials page for the tutorial. Stay tuned for more game programming goodness.

Friday, June 12, 2020

Tutorial seven status

I've been working on tutorial seven in the Shadow Monsters series. I hope to wrap it up tomorrow and upload it to the site.

I'm liking the short posts I've been doing in on theory without practìcal. If there is something you would like to see covered leave a comment here.

Thursday, June 11, 2020

Input use cases

There are 4 basic input use cases. A key is down, a key is up, a key that was up the previous frame is now down and a key that was down the previous frame is now up. The same is true for mouse buttons. Analog inputs have more use cases such as how far in a direction it is pressed.

The most common use case for a key being down is movement in a direction. If the key is down the object moves in a direction. Another reason could be a shield or some other state.

A key being up is less common. I would use it for charging something. For example, if space caused a shield to be up while pressed and it recharged while it is up you'd want to test for that.

A key that was up and is now down is most common for instant actions that need to happen immediately. The most common is firing a weapon.

A key that was down and now up is often used in UI. I use it in menus and activating objects. In theory it prevents bleed through between frames.

Tutorial six is live

I just uploaded tutorial six to the  site. You can find the tutorial on the MonoGame Tutorials page of the site.

Wednesday, June 10, 2020

Tutorial six status and more

I've been working on tutorial six in the Shadow Monsters series. It is going well and I hope to finish it tomorrow. This tutorial covers talking with NPCs.

Let's talk a bit of theory. What exactly should happen in the update part of the game loop. Here is where you update the game world, handle any input, check for collision between game objects and the environment and any other processing that  needs to be done. For 2D games collision between objectts is usually done with bounding boxes. It can also be done a variety of other ways such as per pixel, pixel perfect, proximity and others.

Bounding box is done by creating rectangles around game objects and checking if the two intersect. If they do there is a collision between them and needs to be handled properly. Sometimes you want a finer degree of control when your game objects have a lot of transparency or are not rectangular in shape. Enter per pixel or pixel perfect collision detection which work at the pixel level. Sometimes you need to know if two objects are close. Enter proximity collision detection. There are other ways of handling collision detection but those are the most common. An example is multiple bounding boxes where an object may be cross shaped and you test the two rectangles and see if either collide.

That's it for today. Stay tuned for more tutorials and some talk about theory.

Tuesday, June 9, 2020

MonoGame theory

Let's talk a little theory today. The idea of a game is initialize the game world, the initialize and load content methods in MonoGame. Now loop infinitely and each time through the loop update the game world then render the game world, the update and draw methods. There is some timing thrown in there so that the game runs at a constant speed. The last thing to do is clean up after yourself, the unload content method. That is the basics of game programming.

Monday, June 8, 2020

Tutorial five is now live

I have  uploaded tutorial five to the site. You can find it on the MonoGame Tutorials page. This tutorial covers adding in NPCs  for the player to interact with.

I will be starting the next tutorial soon. Stay tuned for the latest news.

Sunday, June 7, 2020

Tutorial five status

I've been working on tutorial five and it is coming along. I should be able to upload it tomorrow. It covers adding non-playrer characters to interact with.  The actual interaction comes in a future tutorial when I add conversations. Stay tuned for news on the tutorials.

Saturday, June 6, 2020

Tutorial four is live

I just uploaded tutorial four and published it. Check out the MonoGame Tutorials page for the tutorial.

I've already started work on the next tutorial. It wiĺl cover non-playrer characters. It also fixes the issues in tutorial four. Stay tuned for more information on the next tutorial.

Friday, June 5, 2020

Tutorial four update

Tutorial four in Shadow Monsters is just about finished  i will be uploading it tomorrow. There is a small problem with it that I will fix in number five. It is a constant related problem.

Thursday, June 4, 2020

Tutorial Four Status

I've been working on tutorial four in the Shadow Monsters series and I am about half way through. I hope to finish it tomorrow. This tutorial covers adding in shadow monsters. Stay tuned for more information.

Wednesday, June 3, 2020

Game Programming

Going to switch gears here and just talk a bit. I started game programming 41 years ago at the age of ten. My brother brought home a computer from school that plugged int the TV. It was a TSR-80. I was instantly hooked. It had a few games and I wanted to make more. If I recall correctly my first game was a simple text based adventure game. You would move room to room and fight creatures. It was pretty good for a ten year old.

From then on i have always tinkered with game programming. I wrote a module for Legend of the Red Dragon and published a game similar to it called Guild of Thieves. Sadly the rise of the internet made BBSes less relevant and they disappeared. Still it was a good experience.

I worked on a few personal projects for a while but didn't release anything. Around that time C# and .NET came out. I loved C#. There wasn't really good game development platforms until XNA. It placed game development in hobbyists' hands. I was hooked. I developed several games for game programming challenges at Game Institute.

Out of XNA came MonoGame which I also love. I've been tinkering with RPGs mostly for the last few years including a Pokemon inspired brew. It is what Shadow Monsters is based on. Game play is pretty much done it is now content that I'm working on along with editors.



Tuesday, June 2, 2020

Tutorial Three Published

I have just uploaded tutorial three in the Shadow Monsters tutorial series. This tutorial covers adding in game state management to the game. Check out the MonoGame Tutorial page for the tutorial.

Monday, June 1, 2020

Tutorial Three Progress

I've been working on tutorial three in Shadow Monsters and am  about half way through. This tutorial covers adding state management to the game. This is an important piece for future tutorials  and needs to be covered early. I hope to wrap this tutorial up in the next day or so. Stay tuned for the latest news.

Sunday, May 31, 2020

Tutorial Two uploaded

I have just uploaded Tutorial Two in the Shadow Monsters series. Head over to the MonoGame page to give it a read.

Tutorial Two Progress Update

I did a fair amount of work on tutorial two yesterday and made a lot of progress. In this tutorial I cover adding a sprite for the player to control and move around the map. I hope to wrap it up today. Stay tuned for more MonoGame goodness.

Saturday, May 30, 2020

Mental health break

I had to take a mental health break but I'm back now and the first tutorial has been uploaded. Head on over to the MonoGame Tutorials page to read it!

I've already started work on part two which I hope to finish over the wèekend. Check back for more information. Also, if you have suggestions on topics you'd like to see covered please leave a comment.

Monday, March 30, 2020

I'm back

Sorry for being away but it was unavoidable. I'm still trying to figure out how to host the tutorials and projects. Once I have I will post links. I'm also trying to figure out how to get pages to work on Blogger so I can have lists of tutorials instead of just on posts. Stay tuned while I figure out these technical details.

Wednesday, March 25, 2020

Tutorial Uodate

I've been working like a mad woman and I am close to having my first tutorial ready to be posted. There are just a few things to work out. It is part of a series on creating a Pokemon style game with the MonoGame framework. Why MonoGame instead of Unity? Well, I find that I have a finer degree of control with MonoGame and I like having access to the source code if I want to extend the framework. One way that I have extended it in the past is to extend the content pipeline to handle custom data types for importing into my games.

So, stay tuned. I hope to have the first tutorial online today or tomorrow at the latest.

Tuesday, March 24, 2020

Welcome to my new blog!

On this blog I will talk about my passion; game programming. I will be starting with MonoGame but will be expanding to other areas. My first series will be on creating a Pokemon style game. In my web series I will be creating a text based MMO.

Stay tuned for the first episode!