Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1358991 Posts in 63134 Topics- by 54982 Members - Latest Member: Hag

April 18, 2019, 07:27:21 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsMatris [ dynamic 2D puzzle ]
Pages: [1]
Print
Author Topic: Matris [ dynamic 2D puzzle ]  (Read 1205 times)
Leaghorn
Level 0
**



View Profile WWW
« on: April 12, 2016, 09:23:04 AM »



Hi guys

I'd like to share with you progress on my game I've been working on for about 4 months - Matris.
I work solo on everything besides music which I just cannot handle.
I started somewhere in November. Not counting holidays and some other small breaks I'd say I've been working on it 4 months (7 days a week, ~12-13h a day).


The main idea was to make a game where you have to arrange puzzle pieces in chains - Combos in such way so every next piece has to touch the last one by the edge.

When Combo is started, timer starts to count down, faster with every next piece, so the longer the Combo the harder it is to keep it up.


I had two ideas for controls.

The first method was to make a piece shaped indicator that would follow the cursor, and just hover a piece over the board and click to place the piece there. Something like in game Chime. But there was too much clicking and it would be to hard to implement keyboard and gamepad controls. Overcomplicated, so I ditched it.


The second method, which is the current method, works like this:




  • to place a piece you need to mark 2 blocks that would be a part of that piece.
  • if there were more than one possibilities to place the current piece using two marked blocks, you could switch through them.
  • after every piece placed on a board the game highlights the area around the last piece from where it is possible to start placing the next piece


With the controls ready the prototype started to take shape




Destroying blocks generated too much noise - too many single blocks stayed on the board, that could not be used to place a piece so the obvious choice was to add Gravity.

At First I added simple gravity and everything always fell down. It worked but it was missing something. So I wrote an algorithm that detects if a block is a part of a solid group that is supported by ground and it looked like that:




At first I thought about extra points for rectangle groups (like in Lumines)





but it didn't play well. It was way overcomplicated to implement. The pieces combination is too irregular to use this methood.

So then I tried with lines. Extra points for a line of 10+ blocks, horizontally and vertically:





And that Idea clicked. It was easier to score extra points, than grouping in rectangles, so that idea stayed for good.


First design concept was to make it futuristic neon-like flashy line design




It didn't look bad but I didn't like it much, so the next idea was Minimalist, Clean and Flat. The first draft looked kinda promising




So I went with it. It felt a little empty so later on I added some touches to it:

  • Stripped pattern to make the frame more interesting
  • GUI Bars on the sides for various functions visualization
  • Animated background
  • Juiced up the animations (juice it or lose it Wink)
  • Smooth out block color transitions
  • And some other small tweaks.


Currently it looks like this:





I kept thinking what else could I do to spice up the gameplay. I came up with a Bonus system.

Every 5 pieces placed on a board a star shows on on of the surrounding block. If a piece is placed over that star there was a bonus.




At first the bonus was just chosen at random and because these Bonuses could be Good or Bad and it was unknown what it's gonna be it was kinda discouraging to even try to "catch" them.

I remade it so after "catching the star" the box shows up where you can choose one of two available bonuses. Most of the time one of them is unknown, but this way it's more encouraging to catch it because even if the known one is something bad, there is still a chance that the second one will be something better.







The main gameplay mode is rather dynamic, so I thought it about some more relaxing game mode.

Fill Mode is just about covering as much of the board as possible.

  • No restrictions on where to place pieces
  • No time limit
  • Additionally I added 4 lifelines that lets the player to reshuffle the pieces queue, change a current piece, skip current piece and undo the last step.


I'm really happy of how the Menu system came up. Although the final version mechanics is not very complicated I spend a lot of time tweaking and polishing it.

 


I got good feedback on that Menu system so I made Tutorial on how to achieve that sliding effect if someone is interested on how it works:

Sliding menu system using Texture Mask shader tutorial



The main reason for customization is to make the game more interesting but I also had color blindness in mind.

I was surprised how often I saw comments, that some game is not playable for color blind people. I wasn't aware how common color blindness is, and apparently 8% of men and 0.5% women is color blind.

I created a 96 blocks themes that differ in shape and can be set up separately for idle and active blocks and additionally added 10 color schemes. I tested all the schemes using color blindness simulation, and whatever color blindness type I tested there was some palettes that were fully playable.

Additionally I added 2 fully customizable color schemes so I think that mission is complete Smiley




I would say that the game is 60-70% finished but there is still many things to do.

  • I have to redo all the sounds, because I don't like the feel of what I have now
  • Implement audio playlist system
  • I'm thinking about maybe adding some Multiplayer, but I don't have any experience on that subject so I have a lot of reading to do to even start.
  • Progress saving, achievements, leaderboards, in-game tutorials and many many other little things, but I think the hardest parts are mostly done (mechanics algorithms especially).

 



What do you guys think?
I'd love to hear some of your feedback.

I made a trailer for the game if you'd like to check it out.




 

If you like my work please Like me on FB or follow me on Twitter. It means a lot to me Smiley


Also, if you like my game you can visit my Greenlight page for more details:
http://steamcommunity.com/sharedfiles/filedetails/?id=638442767



Cheers
Leaghorn

 
Logged

Leaghorn
Level 0
**



View Profile WWW
« Reply #1 on: April 13, 2016, 06:15:43 AM »

The in-game GUI shape is dynamically adopted to the shape of the blocks.

I made a sprite for each shape that consist of:
  • Solid frame color
  • Stripped frame pattern
  • Frame shadow
  • GUI bars
  • Extra points bars
  • Select indicator




Logged

Cranktrain
Level 4
****


making gams


View Profile WWW
« Reply #2 on: April 13, 2016, 07:43:54 AM »

Huge amounts of polish here, and it's a neat idea. Enjoying see you iterate through different aesthetic designs, but also the gameplay, will be watching!

Oh, the gifs show a normal Windows cursor, will you add a special in-game cursor?
Logged

Leaghorn
Level 0
**



View Profile WWW
« Reply #3 on: April 13, 2016, 09:13:34 AM »

hmmm... You know, you got me here on the cursor thing. I haven't really thought about it. Do you think I should add a custom cursor?
Logged

Cranktrain
Level 4
****


making gams


View Profile WWW
« Reply #4 on: April 13, 2016, 09:16:35 AM »

Not a terribly fancy one, just one that fits into the rest of the graphics. I only suggest it because it stuck out in the gifs you've posted, and I'm thinking that when the time comes to cut together a trailer, it might look a bit better. Not a big deal though!
Logged

Leaghorn
Level 0
**



View Profile WWW
« Reply #5 on: April 13, 2016, 09:22:10 AM »

heh. I've already made a trailer with the standard windows cursor in it :D Haven't really thought about making a custom one but I will definetely look into that now Wink
« Last Edit: April 13, 2016, 10:07:50 AM by Leaghorn » Logged

Birdorf
Level 1
*



View Profile
« Reply #6 on: April 13, 2016, 11:13:47 AM »

Interesting colour blindness figures.
Logged
Birdorf
Level 1
*



View Profile
« Reply #7 on: April 13, 2016, 11:14:52 AM »

Oh, and this looks fantastic!
Logged
Leaghorn
Level 0
**



View Profile WWW
« Reply #8 on: April 15, 2016, 11:57:29 AM »


I'd like to proudly announce that Matris just got Greenlit by the Steam Community in 16 days.

Yay! :D


Logged

a-k-
Level 0
***


View Profile
« Reply #9 on: April 15, 2016, 11:43:53 PM »

... but I think the hardest parts are mostly done (mechanics algorithms especially).
This looks great!
I wonder, what is the proportion of algorithms related to the minimal core mechanics (blocks elimination, next shapes, difficulty levels etc.) and the ones used for animations and cool effects? (By "minimal" I mean, suppose that the game were a dry console application?)
Logged

sschoener
Level 0
*


I survived 2079.


View Profile
« Reply #10 on: April 16, 2016, 02:01:33 AM »

Congratulations on getting Greenlight! I saw your game the other day on ... somewhere (maybe Reddit?), and it left a lasting impression. Your design is super-slick, I like that. You don't happen to have a demo available somewhere, do you?
Logged
Leaghorn
Level 0
**



View Profile WWW
« Reply #11 on: April 17, 2016, 12:47:59 PM »

Congratulations on getting Greenlight! I saw your game the other day on ... somewhere (maybe Reddit?), and it left a lasting impression. Your design is super-slick, I like that. You don't happen to have a demo available somewhere, do you?

Thanks. No demo. If I made one I'll let you know Wink

I wonder, what is the proportion of algorithms related to the minimal core mechanics (blocks elimination, next shapes, difficulty levels etc.) and the ones used for animations and cool effects? (By "minimal" I mean, suppose that the game were a dry console application?)

Well it's hard to say what the proportion is but there is a lot of calculations going on in the background. If I just made some system that player would have to draw a piece or mark all blocks of a piece and then check it it would be easy, but also inefficient in gameplay (it would take too long to place a piece). How I do it is when you mark first block I calculate all the possible positions and rotations of the current piece stating from that position, keeping in mind the surrounding and highlight the possible area. When moving over any block on that area I calculate all the piece combination possible using these two blocks. When a piece is placed I take the next piece and calculate all the possible possible positions and rotations of that piece starting from every block surrounding the last one to highlight the area from where it is possible to start placing it.

All the gameplay algoritms takes 5000+ lines of code, and its about 30% of all scripts in the game.

The above calculations arent the most complicated. The most complicated is detecting if the game is over. In Main Mode it's not complicated, I just calculate if its possible to place a next piece anywhere, if no => Game Over. But in Fill Mode there are 4 Lifelines where you can reshuffle the pieces queue, change the current piece, skip the current piece or undo last move. If there is no Lifelines left it's simple to calculate Game Over - when its not possible to place next piece anywhere. BUT, when there are Lifelines it gets very complicated.

- if there is only UNDO left and its impossible to place the current piece, I have to simulate using that UNDO to take the last piece from the board, check if it was possible to place it somewhere else, if it was, store all these possibilities, and check for every possibility it it would be possible to place the next piece somewhere then.
- if there is only NEXT/SKIP left and its impossible to place the current piece, I just need to check if its possible to place the next one somewhere else.
- if there is a RESHUFFLE or  CHANGE CURRENT left and its impossible to place the current piece, because the next piece can be choosen or reshuffled to anything I have to check every single piece to be placed anywhere. And if there is also UNDO, I have to simulate taking the last piece from the board, check if it could be placed somewhere else and if so then check every single piece to be placed anywhere in every possible position of the last piece.

I'm probably forgetting something but it is really complicated :D It took me couple of days to get this Game Over detecting work in every possible Lifelines situation/variation. And all these calculations happens after placing every piece so it's as optimized as possible. I benchmarked it and the most complicated cases took ~0.002s to complete. Good times we live in with all this computing power in our hands Smiley
« Last Edit: April 17, 2016, 12:53:21 PM by Leaghorn » Logged

//BARCHboi
Level 0
***


Commodore Snes 64k


View Profile WWW
« Reply #12 on: April 17, 2016, 06:50:15 PM »

Im really liking the feel of the game, its very polished and has great subtle motion graphics on it - its a real delight
Logged

a-k-
Level 0
***


View Profile
« Reply #13 on: April 23, 2016, 04:00:34 AM »

Thanks for the elaborate reply! Looking at the video, the user interface for placing the blocks seems to be very intuitive so I'm sure the algorithm will pay off.

The most complicated is detecting if the game is over. [...]
Is it of concern that players may be presented with Game Over before they realize that their "lifelines" are of little use? I guess some may want to continue playing the level until they discover that by themselves...
Logged

Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic