School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 307,138 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 1,816 people online right now. Registration is fast and FREE... Join Now!




Puzzle game help

 

Puzzle game help

imyourhero04

4 Nov, 2009 - 09:37 PM
Post #1

New D.I.C Head
*

Joined: 4 Nov, 2009
Posts: 1

Hi,

First off, thanks in advance, of course. I couldn't find this on the forum in my search, so hopefully I didn't miss because of wording or something. If I did, I'm sorry.

I'm working on a puzzle game similar to puyo puyo in style, and I'm trying to figure out a way to register the groups of blocks efficiently. Basically, I've got all the spaces on the board in a matrix, and the numbers 1-4 signifying which color block is in that space, with 0 signifying an empty space (simple, right?) Now, when 4 or more blocks of the same color are touching in any configuration (line, L-shape, square, whatever), they should break and the ones above them should fall. Unfortunately, I've been embarassingly stumped on how to work this out in a feasible and mathematically simple way.

I'm working in LOVE, a lua based engine, with a friend of mine, for simplicity's sake, but I have some limited experiences in other languages, and this is pretty much just a math-based problem, so hopefully the engine won't be too much of a problem.

Thanks again.

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 03:15PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month