the vast expanses of space and the universe by fakeyou

[raw]
made by fakeyou for LD23 Warm-Up (-)
You control to ship with the left and right arrow keys and you can shoot with spacebar. The objective is simply to destroy the enemy ships. Please let me know if you encounter any problems.

Feedback

zzForrest
17. Apr 2012 · 00:42 UTC
I am keen to how java works so let me guess how you did this.
You first had planet sprites and star sprites and random objects to draw those scrolling. The enemy code is simple, as is the players. There are 2 bullet types, 1 bullet and 2 bullets. You launch 2 bullets, and when it hits something it is destroyed and replaced with a 1 bullet either to the left or right. The bullets are simply yellow lines rendered by applet code. How did I do?
🎤 fakeyou
17. Apr 2012 · 17:54 UTC
First of all, every object on screen is a sprite, so are the bullets. Every sprite is an 'entity' these entity all have a few preset variables, such as their size, speed, rotation, direction, etc.
Every entity is placed into a global array with all entity and when the paint method is called the array is sorted on layer specified in each object, the lowest layers are drawn first.
based on the size and position of each entity I make a rectangle of the size and then check every entity nearby to see if it intersects. Every entity keeps a list of items it intersects with. When for example a enemy intersects with a rocket it will create a new entity: an explosion on that location. It will then also add itself and the rocket to another array of 'died' entities. Every tick the died entities are removed from the global entities array.

I hope that makes sense
KevinWorkman
18. Apr 2012 · 03:29 UTC
If you're planning on using Java and you don't have a host already, you might check out a project I've been working on, http://StaticVoidGames.com. It's a site designed for indie game programmers using Java or Processing, with competitions like this in mind- just upload a jar and a thumbnail, and you have a decent looking website showcasing your game as an applet, webstart, and a downloadable jar- without wasting any time on web development. I'm working on adding tutorials and ad revenue sharing, but for now it's at least an easy way to show of your game. Check it out if you feel like it.
TheGamingProject
19. Apr 2012 · 06:31 UTC
Nice explosion animation, was cool my high score was 502 fps.