Maze Raider - The aMAZEing code a game comp entry

Started by Derron, September 02, 2018, 13:45:09

Previous topic - Next topic

Steve Elliott

Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

Qube

Mac Studio M1 Max ( 10 core CPU - 24 core GPU ), 32GB LPDDR5, 512GB SSD,
Beelink SER7 Mini Gaming PC, Ryzen 7 7840HS 8-Core 16-Thread 5.1GHz Processor, 32G DDR5 RAM 1T PCIe 4.0 SSD
MSI MEG 342C 34" QD-OLED Monitor

Until the next time.

Derron

Think you all know how enjoyable bug fighting is ...

You surely remember how I spit on dynamic typed languages in this thread a bunch of times.
I tried to "match arr[0]" (like a "switch" statement...).

match arr[0]:
  1: bla
  2: blubb

But it did not execute one of them, why? So I did a print(arr[0]) and its output? 1 (or 2, 3, ...). Hmmpf, so why is it borked up?
Solution here was: arr[0] was not an "int" but a float/double/whatever (I initialized it with "Vector3(0,1,2)"). So casting it to an integer resolved the issue and the match worked:
match int(arr[0]):
  1: bla
...

This is a bit of... frustrating/annoying/... grr.



Gamewise I had to fight the pathfinding/a-star this evening. I do not have only static content but also dynamic blocking things. This means I need to update the astar nodes after every change (actually I wait up to 1 second - so AI does not react to changes within a blink). As soon as I did this I had a little jitter/stutter on every astar update.
Replaced a "loop over dictionary to find neighbour element" approach with direct index calculation and the hickup was gone. Seems you should never try to do as some tutorials suggest (slow!).

To have an happy end for today (had some business coding too)) I also added the "final door" of a level ...do not go into the white light :-)


bye
Ron

Derron

#63
Todays evening was full of ... coding stuff I coded for my BlitzMax framework "Dig2 already: a SoundManager.
Similar to Qube's idea of a soundmanager class my autoloaded singleton contains some simple "PlaySfx(streamOrStreamUrl, volume)" and "PlayMusic()"/"PlayPlaylist()" functions.

As you might know ... Godot does things differently. So for each track I wanted to play I needed to create a new "AudioStreamPlayer" (which again needs to get added to the node tree). So far so good. Then I've read that .ogg files are imported as looping while .wav are by default loaded as non-looping. Ahh yes. I prefer to adjust things in the source code (an .ogg sfx file should be non-looped). But that is this visual-editor-paradigm.
Ok, so I got some music playing. Time to code the cross fader stuff. Godot does not inform myself when it reaches the end of an .ogg file so I have to take care of it myself. Why should I do so? Ok, to keep things small I do not want to add long music tracks (also they might cost money if you cannot compose them on your own). So I use some smaller loops and repeat them some times and after eg. 3 loops were played, it now cross fades to the next "looped loop".

But what was this? Crossfading did not work until I checked "volume_db" has this appendix "_db" not for nothing but for decibel. So I checked values for decibels and what Godot expects. -60db for silence, 0 for "maximum loudness without clipping". Added some ValueToDecibel() thing and 15 minutes later I found out that Godot already offers a "linear2db()" function doing exactly...the same.

Nonetheless - and 3 hours of coding fun + searching/creating some simple effects I now have working background music (fading nicely into each other) and I can play sound effects to my needs.
I already decreased volume of the death sounds as ... it takes out some fun if you let many of them burn. So better some silent "woahhh" sounds than feeling like in a horror movie.




PS: of course the colorful rectangles are only there for debugging purposes - so pink will get replaced by a sargophag nearby etc.



bye
Ron

Qube

Looks fun ;D - Not sure if you're going to change this but I wouldn't have the in-game background music louder than the sound effects. Also I'm getting used to those placeholder squares so it's going to be a bit of a shock when they are gone. Goodbye faithful squares, you served your purpose well  :-*
Mac Studio M1 Max ( 10 core CPU - 24 core GPU ), 32GB LPDDR5, 512GB SSD,
Beelink SER7 Mini Gaming PC, Ryzen 7 7840HS 8-Core 16-Thread 5.1GHz Processor, 32G DDR5 RAM 1T PCIe 4.0 SSD
MSI MEG 342C 34" QD-OLED Monitor

Until the next time.

Derron

Music volume was reduced (to 75%) while recording.


Bye
Ron

Derron

Added "short walls" which are used to add custom decoration stuff (todo ... pillars or so) and sarkophags (which spawn a mummy...). Code replaces "end walls" (with no further connection) with "short walls" so there is some area freed to add a half-tile-element.

Added "sarkophag"-animation-connection and controlled unit spawning + "forced routes" (so AI follows a given route first before doing their own movement decisions). Means now the sarkophag opens, creature leaves and once it reaches its target grid it begins chasing/idling.
Also added stuff so player resets when loosing a live and creatures get removed too.

Nothing more this evening (came home late - and had some glasses of booze next to the default BBQ-beer ;-)). It's never good to have 28°C in October.


So tomorrow will be only lunch time and maybe some hours in the evening - still need to create at least a half-decent player model (+ animation-export which I did not tackle in Godot yet), a mummy model and the collectibles need to get designed too.

Not to talk about stuff I modelled but did not yet animate nicely (traps). Normally I would like to add some blood particles here and there ... arghh too much to do for a sleepy and boozed brain (~6hrs and the kids will be awake ready to "papa I want you to play kitchen chef with me" or to "gurggl gurrgl" aka "I want milk mama").


Seems at least some others already finished in time.


bye
Ron

Derron

Lunch time:





But the "dull" colors (they are "worn") it is no longer so vibrant and "distinguishable" on the similar-colored level. hmm. Nonetheless: family time now.


bye
Ron

Qube

Love the Mummy ;D - Is it animated? if so do you do the animations yourself?
Mac Studio M1 Max ( 10 core CPU - 24 core GPU ), 32GB LPDDR5, 512GB SSD,
Beelink SER7 Mini Gaming PC, Ryzen 7 7840HS 8-Core 16-Thread 5.1GHz Processor, 32G DDR5 RAM 1T PCIe 4.0 SSD
MSI MEG 342C 34" QD-OLED Monitor

Until the next time.

Steve Elliott

Quote
Love the Mummy ;D

I agree - good job!  Come on Derron, work while family sleep to get this completed in time.
Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

Derron

Kids brought to bed ... back on the computer.

I came up with some small ideas during playing in the park:

1)
Add a simple circle-shape below units. The circle could be colored according to "hostile", "collectible", "player"
That way you could easier spot the interesting stuff

2)
Darken the floor to make units/items pop out even more. BTW all the textures are hand painted.





@ animation
Certain animations will be done by hand but I thought on trying to use "BHV" files (to learn that too). Nonetheless I first have to rig the models now. I had to reduce polycount a bit ("Peter" is now 4k polys including hat and mummy is 2.5k poly - especially face is more high res albeit not really needed in that camera views) and something borked up my old rig setup (included a scale I do not want to keep).

The mummy had a better paint job before but when I put it into the game it was so barely visible it could not stand. You need to "exaggerate" when it comes to such small units.



@ textures
It is a mess for now .. I tried to have only 1024*1024 textures but this leads to jaggy lines here and there. No time for a proper unwrapping/UV layout. Only done some seams here and there and rely on a simple unwrap then (+ repositioning the UVs so that multiple stuff can get placed on one texture).



Ok, back to Blender now.


bye
Ron

Steve Elliott

#71
That does look really good.  Having a map on the left seems odd though - a map should always be on the right IMO, plus there is less user information there on the right - so less cluttered.
Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

Derron

It is a debug-map ;-)
... as this "closeup" was not intented yet - albeit I thought about a camera mode for a more intense gameplay (...not knowing what comes next).


bye
Ron

Steve Elliott

A camera zoom when things get more intense perhaps?
Win11 64Gb 12th Gen Intel i9 12900K 3.2Ghz Nvidia RTX 3070Ti 8Gb
Win11 16Gb 12th Gen Intel i5 12450H 2Ghz Nvidia RTX 2050 8Gb
Win11  Pro 8Gb Celeron Intel UHD Graphics 600
Win10/Linux Mint 16Gb 4th Gen Intel i5 4570 3.2GHz, Nvidia GeForce GTX 1050 2Gb
macOS 32Gb Apple M2Max
pi5 8Gb
Spectrum Next 2Mb

Matty

It's starting to come together.  I hope you finish it or at least have a playable game for us.