Go Back   CodingForums.com > :: Computing & Sciences > Computer Programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 11-29-2011, 02:30 PM   PM User | #1
AsianNinjaPro
New to the CF scene

 
Join Date: Nov 2011
Location: Darien, IL
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
AsianNinjaPro is an unknown quantity at this point
Question 2D Game engine allows for terrain destruction

Hello, I'm a newbie at game programming, but it's one of my hobbies.

My 2D game engine (Written in Java) at this point uses primitive rectangles and circles to detect collisions but I realized that if I wanted destructable terrain, I can't just take a chunk off the rectangle.

The new game engine will use a 2D array of integers. Each element represents a pixel. 0 meaning empty, and greater than 1 meaning some other type of terrain be it water, rock, or grass. Or have a 2D array of Terrain Objects.

1) Is this setup commonly used?
2) I know collision detection will be a breeze but will the computer be able to change all those elements quickly enough to simulate movement?
3) If this is a bad setup, what would you reccommend?

Thanks!

Last edited by AsianNinjaPro; 11-29-2011 at 02:33 PM.. Reason: Change the icon
AsianNinjaPro is offline   Reply With Quote
Reply

Bookmarks

Tags
collision, detection, engine, game, java

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:09 AM.


Advertisement
Log in to turn off these ads.