måndag 12 augusti 2019

I bought a new computer the other day

For some time i have promised my daughter that i would give her my computer so she could start her own youtube channel, to broadcast her Roblox gameplay.

This saturday i went to the store and picked up the parts for a new computer. I walked the AMD path this time with a Ryzen 5 3600 and a radeon RX 5700 graphics card. Since i was also giving my monitor away i had to buy a new curved 32" 144hz 1440p monitor.

I had some problems putting the new computer together. It turned out that the motherboard needed a BIOS update to accept the processor. I don't know how to flash the BIOS of a non-functioning computer so i had to go back to the store and pick up another motherboard. All of this meant that i did not write much code this weekend. I did however implement the pathfinding algorithm into my ai. And it works perfectly. The mobs are chasing the hero throughout the labyrinth, they do get stuck from time to time - but i should be able to tweek the ai to handle that better.

I tried a few maps in Path of Exile as well. With maxed settings on 1440p i hade a frame rate of around 140-150 - just as the monitor. It looked quite a lot better than my 2D sprite game. But i'm getting there. :)


fredag 9 augusti 2019

Eureka!

Last night after playing around with my new door, that can be opened and closed, i decided that it would be nice with some fog of war. You know that dark fog that covers unexplored areas in games.
If there are surprises behind the door then the game should be more exciting.

After giving this a though for a few minutes i came up with an idea that is as simple as it is brilliant, i wrote it a few moments ago and it works! Fog remain in place until the door is opened.

This algorithm, with some modification, could also be used for pathfinding - one of the most difficult challenges that i have faced in game making (i tried a couple of decades ago and gave up).

I could explain how it works but that is probably boring read. The source code of the game will, at some point, be available to anyone interested in finding out.

Edit:
I have completed the pathfinding algorithm now. It really rocks! My maze test map was solved in less than 1 millisecond and the route was optimal. I compared the number of steps to the route that i would take if i walked the map - and both routes had 120 steps. :)

torsdag 8 augusti 2019

GIMP is not my friend

Hello again!

Yesterday i started writing a new function for the game, a function that lets the player manipulate the various obstacles found throughout the map. I think i got it right - but i can't test it because i have no graphics for it.

So i decided to draw a doorway with a door that can be opened and closed. The doorway with a closed door was ok -  but the opening and closing of the door should be animated, and this is where me and GIMP "had words".

I wanted to scale the door down a bit per frame but the result got blurry. Then i wanted to gradually skew the door to make it look like it was going inwards - but no matter how i did it GIMP only skewed an invisible layer and not the door. Do i have to draw every frame of the animation from scratch? I had to give up for the night, maybe i will try again this evening.

Last night i also revisited my collision detection algorithm. It wasn't very good and made the characters jump around whenever they bumped into something. Now its very smooth and also lets you sneak past your enemies (and friends - whenever multiplayer will be implemented).

Short update, not too much happpened since my initial post.


tisdag 6 augusti 2019

Hi!

This is my first post in a blog that, i hope, will continue for a number of years. The length of this blog will depend on how my little project evolves...

What is my project you ask? Well, let me start from the beginning.

I have for a very long time wanted to create a video game, but i thought it impossible when seeing all  those AAA productions out there. I'm not even good at drawing or all that advanced math needed to draw all fancy 3D graphics. So until a few weeks ago i never made anything of my dream - until i purchased an indie game that turned out to be a one man production. The name of the game i bought is Chronicon. The graphics are very simple - but it works, and the game is fun - and it has sold quite well i believe. And it took 4 or 5 years to develop . This made me start rethinking my earlier decision not to write a game.

So, i started writing an  ARPG - or Action role playing game - or hack n slash. This was maybe 3 weeks ago. Today i have some very basic functionality such as the ability to walk around on the map and hit my enemies with a single, unanimated whirlwind attack. Not very fun at this point!
I have also made a level designer that will make the level creation a breeze.

I saw that game assets can be purchased on the net - so i don't have to use my own hideous creations. So far i have bought a wasp, and it's in the game. You can see it and its friends hunting and stinging the hero.

So why am i writing this blog then and not code for my game you ask?

Well, my experience from past projects tells me that i will drop in enthusiasm at some point, but if my development gets some attention from an audience then maybe that will inspire me to continue working for all those years to come.

For those technical geeks out there that want to know whats under the hood - then i'm writing this purely in Javascript for the web browser. I intend to use webgl for sprite drawing at some point, but i need to learn it first. I won't have to change much when switching rendering tech.

Ok i think that will do for an initial post. I have attached a screenshot of the game as it looks today. The hero is (hopefully) just a placeholder..