Search This Blog

Featured post

Welcome

Tuesday 18 April 2023

Break

Been having a bit of a break from programming. Will start up again in a little while.

Tuesday 28 March 2023

A* Pathfinding

Made my first attempt at A* pathfinding with Raylib using this tutorial Path Planning - A* (A-Star

With a bit of editing to get the code to work with Raylib and my game code I managed to get a functional A* path to be created. The main parts that needed to be edited where the game engine references and some function variables to work with my game.


This Gif was taken after I figured out how to add my Raylib collision rectangles into node space of the A*. This would have been a lot easier if I had added the pathfinding code at the start of making the game.



First attempt at getting the object to walk along the path to the target location. As you can see it did not work to well.

Second attempt worked better. At least the bear was walking along the path.


Third attempt much better. I just had the end and start locations mixed up. The game itself is not in node space. A* adds a layer of nodes over the map that is uses to navigate. I need to translate the location of the agents from world space to node space and that was where I was having problems.

Forth attempt looks like it worked but it didn't. The bear wasn't really following the right path. What was happening here was the code was refreshing the path to fast and the yellow line wasn't. Also the speed of the bear was off. 

Fifth attempt was very good. In this gif I have the obstacle nodes drawn so I could make sure the bear was following the path properly. Unfortunately there was an issue with this one, that was the node space was to small the bears location wasn't using it. So sometimes when trying to walk around an obstacle there node location would be change to the obstacle location instead of the node next to it.

The finished product. A* is working almost perfectly in game. There has been no major frame drops with multiple wolfs using the code. I also manage to update the node space to remove the tree obstacle once said tree is cut down.

That was my journey in making A* for the first time. There is a fair bit I didn't document.

 I'll leave you with a picture of the first installment of the wolfs having access to the A* code. This is before I added the agents (wolfs) location and the trees to node space.





Friday 24 February 2023

Adventure Game Version 0.14

Big update for Adventure Game. Adds new and edits old systems. Saves are also fixed. 

There is one known bug with loading a save and that is the herb inventory texture doesn't load.

Change log for the game has been updated and the download has a new readme.


Check it out here:

https://chucsadventuregame.blogspot.com/

Thursday 9 February 2023

New Math's Game

I have spent the last week making a Math's game for my kids. 

It is made with C++ and Visual Studio and uses the console window. 

All equations are randomly generated and every time you start you will get different questions. Unfortunately because of the random nature of the sums you will some times get a repeat, especially in the Easy difficulty.

Equations are aimed at primary and early secondary school level. 

When you start you are asked to type your name, after which you are asked what type of lesson you want to do and how many questions you would like to try. 

When you are finished it will save the results to a text file inside the install folder showing the name, lesson and difficulty at the top followed by all the questions asked and answers given. When a question is wrong the correction is recorded after the answer given. At the end a total of right and wrong is displayed.

Every time you try it will add the results to the end of the file.

Gif of me playing through all the difficulties. Showing the text file at the end.



Tuesday 31 January 2023

Update

Sorry I haven't added anything in awhile. Went on a holiday to see my 96 year old grandfather for a few days. 

I have been busy trying to get the next release of my Adventure Game out so haven't been working on any other projects.

The Maze Game is still fresh in my mind and I will continue work on it in the future but I would like to focus on Adventure Game for now.

Tuesday 10 January 2023

Adventure Game Update

Been doing more work on my adventure game and have add new armor and weapons. 

I have installed Unreal Engine 5 and some a nice zombie asset pack. Was thinking of attempting to make a short video clip but ran out of hard drive space before I even started. So once I mange to get another SSD i will be attempting to make a video.

I also made a fallout 4 mod before Christmas. Made the synths a nightmare to fight. There more like terminators now.

So if you are interested in the adventure game update check out the blog. There is a download to the stable 0.13 build in the blog. There are still a few bugs with build 0.13 but none of the ones I found were game breaking, I think.

Saturday 7 January 2023

Adventure Game Updates

Been working on my Adventure Game these last couple days after Christmas break. 

Have fully updated the Shop UI and Money System for the game.

Check out the details here: https://chucsadventuregame.blogspot.com/