Update time from this week.
I didn't get chance to post a #FuzeFriday on YouTube this week and I'm hoping that will be back to normal on Friday and I can show some more clips off, but for now will have to be text and images!
Ok, so the combat system has pretty much been finished, in terms of the back and forth of the turn based stuff. I still want to add things like enemies dropping things and getting XP for each kill etc - but also needs polishing with explosions, voicing, rumble etc. But that can all come down the line.
For now this is finished;
Firing at enemies and hitting them, reducing their health bars until a final hit removes them. The game detects which are still alive and only interacts with those - whether that's them firing back or you placing dice, removed enemies are now no longer considered.... with this said, see below for changes upcoming!
Enemies firing back. Each enemy will take a turn and a % chance of hitting you based on their race takes affect against your ship, removing a point from your hull if a hit lands until you are destroyed
You can now spend 1 power to activate a shield. This absorbs 3 hits from the enemy before disappearing. This all works nicely.
I've removed the 2 second delay of when the bullets hit 'deep space' and come out the other side. Its a nice effect but in practical terms, it was a bit annoying and combat is now significantly quicker for it which feels nicer.
IMG_2036.JPG
CHANGES
With the above said, I will be changing how the player dice mechanic works. A few people have suggested it, including @Retrocade_media above, and after giving it some thought, I do agree it sounds a bit more engaging. In testing, I would often find myself with no power to change the dice roll and from then on, you are relying on only rolling a 6 to do any damage, which right now feels a bit frustrating.
So the new system will see the dice used to determine the 'chance' of a hit in the following format;
1 = 0%. Always a miss, cannot modify
2 = 25% chance of a hit
3 = 33% chance
4 = 50% chance
5 = 75% chance
6 = 100% chance, always a hit.
Now these numbers may need tweaking once I implement it, but it feels like it might work. So Yes, you can still spend power to increase your roll, which now gives you a better chance of landing a hit. Meaning if you roll a 3 for example and only have 1 power left, before that was still a dud as you needed 3 more power to get it to a 6, but now, you can decide if its worth risking spending that power to increase your chance from 33% to 50% in getting a hit. It may JUST be enough to get the job done!!
I'm thinking of some ways to visualise this, but for now, I'm taking a break from the combat side as I've been working on that solidly for 2-3 weeks and felt like a change to keep things fresh.
SHIP SELECTION
So with that in mind, for something radically different, I decided to build the ship selection screen. At the start of the game you get the choice of 4 different classes of ships. Each has a specific ability - one is better in combat, one better for transport etc. I've got a different sprite for each and also started giving each different stats.
VIDEO OF SHIP SELECTION: <link removed>
This all came together quite nicely over a couple of days and works really well. It was nice picking a ship and then seeing it in the combat section rather than the usual ship I've been staring at for the past few weeks.
3 of the 4 ships (the 4th might, I havent decided yet - I may just give it better stats) start with a specific item for free. I.e. the fighter class ship starts with an extra cannon you can install, the mining ship starts with a drill etc. You can buy these for any ship, but thought would make sense to give the player one relevant item to start with.
Items are installed onto your ship blueprint. Each ship has a unique blueprint and again, varies depending on how it balances with other stats. I expect all this will need tweaking once in play testing, but for now I'm sketching stuff out and setting it up accordingly.
So the fighter ship is 'quick' (means it acts first in combat) and has 2 cannons (starts with 2 yellow dice), but has a low hull count - so can get destroyed easily and as its fast, is a smaller ship in terms of blueprint. The big hulking transport ship has a huge blueprint but is the slowest ship and has a low hull and 1 weapon etc.
The plan I had always was that the items would be tetromino shapes that you place in your blueprint, meaning you will have to juggle around the shapes and means you can't pimp your ship out with everything as it won't all fit.
I designed the blueprints for the ships using an Array of 0s and 1s. 0s being blank spaces and 1s being a grid square. Looping through these I was able to draw out the blueprints and you can see them in the lower right of the ship selection screen. I was super pleased how all this worked out!!
TETRIS!
Moving onto the next part was creating the items. I knew this was a BIG element of the game in terms of complexity, so I'm expecting this to take a couple of weeks to do, but hopefully it will be worth it. As its a bit of a big thing to get working, I've started this in a new clean project and will move it over when I'm happy with it.
As I said, each item is a tetromino (Tetris shape) which will represent 1 item and I'm trying to match the shapes to the items. For example, a 'Cabin" for transporting VIPs or Cargo I'm using the "O" shape tetromino (basically a 2x2 square) and a cannon will be the long "I" shape. A drill will be the T shape etc.
I started much the same as the blueprints, giving each shape an array of 0s and 1s and looping through to draw a basic square for each 1. After some thought and discussion with a few people on Discord, I decided to just create a new array for each rotation of each shape. There is probably more efficient and cleverer ways to do this, but its already going to take sooooo long to do, that I feel like I need to keep it simple where I can. So for each of the 7 shapes, there are 4 rotation arrays. This works well - on a press of R or L, the next rotated array is called and drawn.
So with that working, I then replaced the drawing of a simple box with an image from an asset in the Fuze library. This looks really nice I think, though I'll be looking through again to try and make each shape look more unique as there are only 3 colour variations at the moment.
IMG_1725.JPG
With that done, I have a bank of shapes, 4 rotated versions, drawing them as images and the ability to move them around the screen with the dpad (switching shapes with A for now). So far so good, although really has been challenging to get this far.
All throughout this process, the consideration has been "how can I get the shapes to interact with the blueprint". This has been the biggest headache really. I've toyed with Sprites, level maps and the 0/1s arrays. Each I struggled to get working 100% how I wanted, so I was starting to panic a bit. In the end, there are probably 5 different ways that people would approach this and each would probably work ok, so I just had to settle for something I could manage with my limited skills.
Again, this isn't a 'this is how you do it' as its probably the low-level way of doing it and may even cause me issues down the line - but I hope it doesn't;
For each blueprint grid square, the X and Y co-ords of that square are saved in an array
As the 4 pieces of each Tetris shape is being drawn (at similarly X/Y co-ords), I'm then finding the blueprint array ID of that same X/Y co-ord. If I find a match (so 1 piece of the Tetris shape is in the same place as a blueprint piece - which really, they all should), I then check the blueprint piece using the ID from the co-ord array and check if its a 0 or a 1. If its a 1 - this means the single piece of the Tetris is sitting in a valid blueprint square
I then add to a counter if that is the case
After the loop, I then check if the counter == 4. Each Tetris piece is made of 4 parts, so if each part of the shape is sitting on a "1" of the blueprint, that must mean the shape is inside the boundary of the blue print. if one piece of the Tetris shape Is too high for example, then it may be the case that only 3 bits of the Tetris shape are touching the valid grids of the blueprint and then the counter checking for "4" would fail.
If the counter IS 4, then you will be able to press A to place the shape, else A will be disabled.
As I say, thats MY way. There are better ways for sure, but after a good few hours of playing with this, it now works 100% of the time for any shape, any rotation, so I'm happy with that.
NEXT STEPS
So thats everything up to date!! Sorry its a long read.
Next step is to put a dummy shape on the blueprint (probably will use a "2" to denote the blueprint square has something in it) and to ensure my shape I'm placing adheres to the placing rules.
The next BIG step now is to figure out how to put this into the game in terms of items. The player will need an inventory of items. I'll need to know;
What the player has installed
Where it is on the blueprint
What this item "is" and hence what benefits it gives the player.
I'm worried about this step as it feels like another big layer of complexity on-top of an already very complicated set of systems and I fear like a house of cards its all going to tumble down and set me back.... we'll see. That will be the next update!!!
I post more regular updates in the discord, so if you want to follow more closely make sure you are on the discord and also post clips to twitter at times @switchdongames if you want to follow there too.
Hope you enjoyed this mammoth update! Please let me know if you have any comments, suggestions etc below. Thanks!