SpriteBatch a one-way road?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
lupin3rd
Prole
Posts: 1
Joined: Thu Mar 28, 2013 8:24 pm

SpriteBatch a one-way road?

Post by lupin3rd »

I'm working on a falling block game that uses triangle-shaped blocks. There are several colors of triangle blocks, and these are kept in a single image -- each color block is stored in its own quad. No animation is needed, because each block can be rotated into 1 of 2 positions -- pointing up or down.

When the game starts, one triangle (a quad) is randomly created, and once it hits the ground -- it is stored in the SpriteBatch, and herein lies my question: Once I've added it to the SpriteBatch, is there no way to pull out the (x, y), width, or height of that quad? I wanted to use what the SpriteBatch already contained for collision detection, but can't seem to find a way in to do that. Do I really need to duplicate the data in another structure so that I can iterate through it and check for collisions?

Thanks in advance! I'm new to Löve2D, but so far it's great and easy to adapt to coming from Microsoft's XNA platform.
Chris
Post Reply

Who is online

Users browsing this forum: No registered users and 26 guests