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.