Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Java 1.5/1.6 Game

Name: Ashrubel 2008-03-30 18:38

Okay, i have a good bit of experience using Java and i need a tip before i start my next game... i have already (for a class) prgrammed a Tank game (more of a simulator for maximization protocils) and i am going to make a real game now...

I have just one problem... how do i handle Collisions:
i.e. if my character or whatever runs into a wall. (it will be a simple top-down 2D Shooter, and i need a tip on how to deal make borders and obstuctions work properly.

For one: I have only ever used stuff like 2D arrays to determine if the space is occupied, that unortunately will be too innefective. so i wanna use a fast and simple method for checking for collsions...

any help....

Name: Anonymous 2008-03-31 0:40

Just a thought: What if you made a "rough" grid, of "pixels" that are like 5x5 large, binary. If Object is in them at all, they are on. If another object is in the same or an adjacent "block", go to the high res, pixel-by-pixel physics. Make sure to watch out for memory leaks, shit like this would almost certainly cause memory leaks.

Just a though, not even at a pseudocode level.

Inb4 lolwat ur not sposed 2 help on /prog/, and in after SICP.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List