How can I create a VBO when I don’t yet know how many vertices it will contain?

I’m trying to convert my 3D block work rendering from immediate mode and display lists to VBOs. I’m having trouble understanding how to properly handle creating the buffers: I really don’t know how many vertices, colors, and texture coordinates I’ll be passing in until after I’ve already iterated all of the block faces I expect … Read more

How do I decompile Minecraft?

I’m trying to get started modding Minecraft. I opened up the minecraft.jar file in Eclipse, but it doesn’t contain what I expected. In this tutorial the presenter decompiles minecraft.jar and finds things like armor and blocks packages, but when I put my minecraft.jar file (from [user]\appdata\roaming\.minecraft) into Eclipse, I only see Apache and Ydggrassil authentication … Read more

Adding two classes with arithmetic math [closed]

Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it’s on-topic for Game Development Stack Exchange. Closed 6 years ago. Improve this question I’m trying to figure out how to add two classes together with a simple arithmetic addition The class i’ve written is … Read more

How to create a projectile motion of a cannonball in top down view?

Objective To move the bullet with projectile motion to specific destination by touch point. In the below image is an example of a bullet which has a projectile motion. On my observation, the bullet speed and angle is calculated base on distance. (source: pixwerk.net) Where I’m at? (How do I move the bullet to its … Read more

How to choose cell to put entity in in an uniform grid used for broad phase collision detection?

I’m trying to implement the broad phase of my collision detection algorithm. My game is an arcade game with lot of moving entities in an open space with relatively equivalent sizes. Regarding the above specifications, i decided to use an uniform grid for space partitioning. The problem i have right know is how to efficiently … Read more

How to flip a quad (openGL es 2.0 Android / Java)

How would one go about ‘flipping’ a quad, either horizontally or vertically? (Just a single quad, not everything in view). I know how to rotate a quad, this is my rotation method: public void rotate(float x, float y, int angle){ //Convert co-ordinates (Following section just converts my coordinates //Left hand xPlotLeft = (-MyGLRenderer.ratio)+((x)*MyGLRenderer.coordStepAmountWidth); //Top yPlotTop … Read more