Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [DBP] - Fun with cubes

Author
Message
Phaelax
DBPro Master
20
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 24th Feb 2013 08:06
Nothing fancy, got bored. Thought maybe someone might find a use for this.

I've been trying a few different approaches lately for a Bejeweled game. Rather than organizing the gems as part of the grid map, this example keeps them separate and independent of the grid. Might seem odd at first, but once you start to add in movement animation and other effects, this actually becomes easier to manage than locking the gems into a 2D grid-like array.


As for this code snippet? Right-click to drop a block. Each block will detect collision with blocks under it. So when you left-click to remove a block on the bottom, everything above it will automatically cascade down at an accelerating velocity. That's basically all it does.




"You're all wrong. You're all idiots." ~Fluffy Rabbit

Login to post a reply

Server time is: 2024-03-28 11:17:05
Your offset time is: 2024-03-28 11:17:05