Sacred Lands - Code a game competition - May 4th to June 30th

Started by iWasAdam, May 17, 2018, 06:14:40

Previous topic - Next topic

iWasAdam

Needed to really get my ideas down for this.
so, It's going to be retro/strategy:
base concept is turn based strategy island defence.
You have up to 3 'teams' and must defend the island from an invader

progress - no graphics, everything is currently flat 2d. I want to work on the mechanisms this time around.
1. base island map - complete with height maps shown in different colors


2. 3 teams with initial click and find optimal path to reposition using a*


next task to actually 'move' the individual units

iWasAdam

added block ability to map and a*. this is a separate layer and allows for things like trees and rocks

iWasAdam

added ability for a* end nodes to pick the nearest best node

You can see the green a* route avoids the x and finds a new end point (the original being the center or the green frame which is occupied by an x)

iWasAdam

Here's the first peek at things in motion.
Basically you click the flag (the hollow orb) and click the new position. The 'men' will then make jup their own mind how they get to their new positions, clustering (generally) around the flag.



The key thing that is being shown here is the a* avoidance system and making sure then 'Men' follow a valid path: They can go up one height level and down up to 2 heigh levels. So will avoid cliffs, etc. but you can never guarantee where they eventually end up!

Xerra

Are you doing two games for this competition, Adam?

#Dedicated :-)
M2 Pro Mac mini - 16GB 512 SSD
ACER Nitro 5 15.6" Gaming Laptop - Intel® Core™ i7, RTX 3050, 1 TB SSD
Vic 20 - 3.5k 1mhz 6502

Latest game - https://xerra.itch.io/Gridrunner
Blog: http://xerra.co.uk
Itch.IO: https://xerra.itch.io/

Steve Elliott

Quote
strategy island defence.
You have up to 3 'teams' and must defend the island from an invader

I much prefer this idea to another platform game you were considering.
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

Xerra

Is it just me or does this concept remind anyone of Megalomania? Not a bad thing, I hasten to add, as that was a great game.
M2 Pro Mac mini - 16GB 512 SSD
ACER Nitro 5 15.6" Gaming Laptop - Intel® Core™ i7, RTX 3050, 1 TB SSD
Vic 20 - 3.5k 1mhz 6502

Latest game - https://xerra.itch.io/Gridrunner
Blog: http://xerra.co.uk
Itch.IO: https://xerra.itch.io/

round157

The screenshots are quite nice and quite attractive. Well done.

Matty

This looks good Adam. I like it more than the platformer.

iWasAdam

Thanks guys. it definitely a completely different thing from anything else I've worked on. The plat-former is great, but was coasting and didn't meet the strategy part at all.

I do have a concept for how it could look visually, but again I want to really work on the mechanics first and think about other stuff later...

Todays update is per pixel/cell movement. so the units can now move smoothly

Next up will be to think loong and hard about health/attack and how it should all fit together

iWasAdam

Here's the current base UI with a slight focus towards geometry:


When you click a flag - you get the bottom left UI showing the color and shape of the units. It also shows how many units are 'alive' - In this case four.
Each unit can also show how much health is left by a slider - the block interior decreases with decreased health.

iWasAdam


iWasAdam

So today I thought I'd spend time talking about data and maps.
first is a color palette:

- the first 3 blue colors denote water
- the next blocks of 4x5 colors are the height maps:
- tan = beach
- green = first height level
- red = second height level
- orange = third height level
- purple = highest height level

so looking at a map with just color you can know how the heights function very quickly:


'units' can go down 2 small jumps in color and up in one jump in color. so cliffs, etc are very easy to see as well.

Lastly we can now use data on top of the colors to denote other things:

The first thing to notice is there are 3 base types of data being used:
- wiggly lines = water
- filled blocky thing = land
- characters denoting other stuff:
- - hidden numbers to be used when constructing enemy data
- - X is a block
- - 4 unit type starts: hollow circle, hollow triangle, hollow square + multiple hollow x - these are the potential start points for enemies

This gives you a really nice way of working. no map editors need writing as I just use the current fontmap editor. it make for very fast testing and designing of levels. You just need to write small parsers to transfer to map data into whatever format you need to use...

Put it all together and you get:

iWasAdam

Today it's going to be all about the attack landing paths.

So, for any attack we need 2 things:
1. the final location where the enemy lands
2. a path for the enemy to follow to get to the landing point

so. we have the landing point from the imported map.
Lets create a set of base paths:


a path consists of 1000 separate x,y location. When the window resizes, we need to smooth the paths:


depending on the location of the landing point the x,y values are flipped, so in use the actual path has 4 variations giving the player lots of difficulty figuring out the actual landing point <sneaky>

iWasAdam

And finally a pic of it all in operations:


Currently there is no movement or fighting, but you cen now get a feel for the arrival patterns.
Watching it is sort of like a to down view of missile command - If you can think of that?