DzzD
|
 |
«
Reply #30 on:
2010-04-11 15:04:17 » |
|
http://dzzd.net/JGOPetite/missing stuff : - you should lost health when enemies reach the right of the screen - hardness not balanced - apple should give health (and not ammo) - sword should give ammo
|
|
|
|
kappa
« League of Dukes » JGO Kernel      Posts: 2360 Medals: 59
★★★★★
|
 |
«
Reply #31 on:
2010-04-11 15:05:06 » |
|
heres my entry, got eveything except collision detection, will need a bit more time to just finish it off, but anyway looks like this atm 
|
|
|
|
|
DzzD
|
 |
«
Reply #32 on:
2010-04-11 15:10:26 » |
|
wow look nice
|
|
|
|
Games published by our own members! Go get 'em!
|
|
DzzD
|
 |
«
Reply #33 on:
2010-04-11 15:11:15 » |
|
here is my dirty one hour source code  1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
| import image.*; import log.*; import font.*; import sound.*;
import java.awt.*; import java.awt.event.*; import java.applet.*; import java.util.*;
public class JGOPetiteEntry extends JGOPetite { public static final long serialVersionUID = 0x01; public int score; public int health; public int ammo=20; public Vector enemies; public BitmapFont fontA; public Image imageA; public RAWSound fireSound; public RAWSound noAmmoSound; public RAWSound ammoSound; public Image spriteFlyingEntities[]; public void startOnce() { this.score=0; this.health=100; this.ammo=20; this.enemies=new Vector(); this.setCursor(Cursor.getPredefinedCursor(Cursor.CROSSHAIR_CURSOR)); try { this.fontA=this.loadBitmapFont("/fonts/","Verdana14.fnt"); this.spriteFlyingEntities=new Image[4]; this.spriteFlyingEntities[0]=this.loadImage("/images/","ALIEN.PNG",true); this.spriteFlyingEntities[1]=this.loadImage("/images/","APPLE.PNG",true); this.spriteFlyingEntities[2]=this.loadImage("/images/","FOX.PNG",true); this.spriteFlyingEntities[3]=this.loadImage("/images/","MASK.PNG",true); this.fireSound=this.loadSound("/sounds/","FIRE.AU"); this.noAmmoSound=this.loadSound("/sounds/","NOAMMO.AU"); this.ammoSound=this.loadSound("/sounds/","AMMO.AU"); this.addFlyingEntity(); this.addFlyingEntity(); this.addFlyingEntity(); super.startOnce(); } catch(Exception e) { Log.log("sorry, some ressources are missing, unable to start the game"); Log.log(e); } } public void performLogic() { if(this.enemies.size()<4) this.addFlyingEntity(); for (Enumeration e = this.enemies.elements() ; e.hasMoreElements() ;) { FlyingEntity fe=(FlyingEntity)e.nextElement(); fe.move(); double posY=fe.posY; fe.posY=Math.min(this.getHeight()>>1,fe.posY); fe.posY=Math.max(-this.getHeight()>>1,fe.posY); if(fe.posX>500) this.enemies.remove(fe); } } public void drawFrame(Graphics g) { g.setColor(Color.black); g.fillRect(0,0,this.getWidth(),this.getHeight()); g.setColor(Color.gray); g.drawRoundRect(0,0,this.getWidth()-1,this.getHeight()-1,10,10); this.fontA.drawString(g,"Score : " + this.score,50,50,0xFFFFFF,0xFFFFFF,false); this.fontA.drawString(g,"Ammo : " + this.ammo ,420,50,0xFFFFFF,0xFFFFFF,false); this.fontA.drawString(g,"Health : " + this.health + "%",800,50,0xFFFFFF,0xFFFFFF,false); g.setClip(10,10,940,this.getHeight()-10); for (Enumeration e = this.enemies.elements() ; e.hasMoreElements() ;) { FlyingEntity fe=(FlyingEntity)e.nextElement(); int px=toScreenX(fe.posX); int py=toScreenY(fe.posY); g.drawImage(fe.image,px,py,null); } } public void fire(int x,int y) { if(this.ammo==0) { this.noAmmoSound.stop(); this.noAmmoSound.play(); return; } this.ammo--; this.fireSound.stop(); this.fireSound.play(); for (Enumeration e = this.enemies.elements() ; e.hasMoreElements() ;) { FlyingEntity fe=(FlyingEntity)e.nextElement(); int px=toScreenX(fe.posX); int py=toScreenY(fe.posY); if(x<px) continue; if(y<py) continue; if(x>px+64) continue; if(y>py+64) continue; this.enemies.remove(fe); if(fe.image==this.spriteFlyingEntities[1]) { this.ammo+=10; this.ammoSound.stop(); this.ammoSound.play(); } else this.score++; } }
public int toScreenX(double posX) { return (int) ( posX ) + (this.getWidth()>>1); } public int toScreenY(double posY) { return (int) ( posY ) + (this.getHeight()>>1); } public void addFlyingEntity() { int nSprite=(int)(Math.random()*4); double posX=-1000+Math.random()*300; double posY=Math.random()*300; Image i=this.spriteFlyingEntities[nSprite]; FlyingEntity fe=new FlyingEntity(i,posX,posY); this.enemies.add(fe); } public void mouseReleased(MouseEvent e) { this.fire(e.getX(),e.getY()); } } |
|
|
|
|
woogley
JGO Neuromancer     Posts: 1098 Medals: 5
|
 |
«
Reply #34 on:
2010-04-11 15:14:10 » |
|
Unfortunately I'd need another 15mins to finish this, but oh well http://javaunlimited.net/petite/game.jnlp The idea is that, at the bottom, it shows which 'items' you have to hit in order Move the sword with up/down keys. Hold space to increase 'throwing force' and let go to unleash the sword. Unfortunately I didn't get a chance to do the collision detection so... you can't really win. Well done all. edit: you can read the source here
|
|
|
|
|
|
|
Alan_W
JGO Ninja    Posts: 734 Medals: 8
Java tames rock!
|
 |
«
Reply #36 on:
2010-04-11 15:19:15 » |
|
 Click on image to play. (I've made the html background black and white now)
|
Time flies like a bird. Fruit flies like a banana.
|
|
|
DzzD
|
 |
«
Reply #37 on:
2010-04-11 15:23:22 » |
|
yup, I would have loved 30 minutes more too... would have been requiered to match a good balanced gameplay and polish the game
anyway that was pretty cool to do, no?
|
|
|
|
Eli Delventhal
« League of Dukes » JGO Kernel      Posts: 3574 Medals: 44
Game Engineer
|
 |
«
Reply #38 on:
2010-04-11 15:29:59 » |
|
Here's mine: It's called "Magic Fox" and isn't really a game yet. I decided to try to use the "engine" I made for a game I was working on like 4 years ago, which was a very bad idea. It was rife with bugs and wasted much more time that it gained. Next time I think I'll definitely have an actual framework to go with. I also had the unfortunate problem of having this attached to a filesystem that was using images off the disk, so it's not Webstart or Applet ready. You can just open the JAR if you really want to. Basically you can move around a world made by an image (bitmap collision) and jump/float with the up key, and shoot a fireball that for some reason doesn't explode correctly using the mouse (it should have bitmap reduction/collision, but I ran out of time). So, anyway. This was fun. http://www.otcsw.com/files/MagicFox.zip 
|
See my work:OTC Software<br /> Currently Working On:Secret project... I edit JGO in production, because I simply don't waste time writing bugs
|
|
|
kappa
« League of Dukes » JGO Kernel      Posts: 2360 Medals: 59
★★★★★
|
 |
«
Reply #39 on:
2010-04-11 15:38:48 » |
|
thanks for all the ppl entering, contest was great fun, one hour of mad coding really enjoyed it  can't wait for the next one, but hopefully it'll be 2-3 hours this time round, one hour really make it tight to get something done.
|
|
|
|
|
Games published by our own members! Go get 'em!
|
|
Eli Delventhal
« League of Dukes » JGO Kernel      Posts: 3574 Medals: 44
Game Engineer
|
 |
«
Reply #40 on:
2010-04-11 15:39:38 » |
|
Yay, fun times! I'll put a post in to see when people want to go next.
|
See my work:OTC Software<br /> Currently Working On:Secret project... I edit JGO in production, because I simply don't waste time writing bugs
|
|
|
DzzD
|
 |
«
Reply #41 on:
2010-04-11 15:46:49 » |
|
I will probably finish my entry when I get some more time, dont want to let it in this state :p , already updated => changed a little the hardness http://dzzd.net/JGOPetite/some more time seems to be requiered but not that much after all, we all get something near to be finished so... maybe 2 hours for the next one ?
|
|
|
|
Alan_W
JGO Ninja    Posts: 734 Medals: 8
Java tames rock!
|
 |
«
Reply #42 on:
2010-04-11 16:09:43 » |
|
Here's my entry:
"CrapAssassin"
Pretty good going for an hour; multiple levels too!
|
Time flies like a bird. Fruit flies like a banana.
|
|
|
Alan_W
JGO Ninja    Posts: 734 Medals: 8
Java tames rock!
|
 |
«
Reply #43 on:
2010-04-11 16:14:38 » |
|
I will probably finish my entry when I get some more time, dont want to let it in this state :p , already updated => changed a little the hardness
Works fine and nice sound effects. Maybe add a 'splatted' version of each sprite with plenty of red 
|
Time flies like a bird. Fruit flies like a banana.
|
|
|
Alan_W
JGO Ninja    Posts: 734 Medals: 8
Java tames rock!
|
 |
«
Reply #44 on:
2010-04-11 16:18:49 » |
|
Unfortunately I'd need another 15mins to finish this, but oh well  I like the gravity effect on the sword. Just needed that collision detection 
|
Time flies like a bird. Fruit flies like a banana.
|
|
|
DzzD
|
 |
«
Reply #45 on:
2010-04-11 16:34:03 » |
|
thanks Alan_W you done a really great job too & last but not least fully finished ! some thing I noticed about the contest is that it requiere to be really well prepared, here are some problem I meat : lost some precious minute only for looking over internet to the apple picking sound ... last ten minutes are too short  ... even if it is nothing to do => unable to implements health & gameover finding a game idea and how to built the final gameplay took also some precious minutes... also start/intro screen & end screen should be prepared before the contest (no time to do them in the contest)
|
|
|
|
jimsmi6
JGO n00b  Posts: 12
|
 |
«
Reply #46 on:
2010-04-11 23:10:29 » |
|
thanks Alan_W you done a really great job too & last but not least fully finished ! some thing I noticed about the contest is that it requiere to be really well prepared, here are some problem I meat : lost some precious minute only for looking over internet to the apple picking sound ... last ten minutes are too short  ... even if it is nothing to do => unable to implements health & gameover finding a game idea and how to built the final gameplay took also some precious minutes... also start/intro screen & end screen should be prepared before the contest (no time to do them in the contest) Well, in a way this is like improvisational comedy; you make things up as you go. I got on IRC about 30 mins early and started thinking of ideas (that time before the hour was my planning). So essentially this is how my time was allotted: -30 mins to -10 mins: Planning -10 mins to 0 mins: Setting up project in Eclipse and getting base classes from my engine setup/imported (this was within that early start that was given)0 mins to 10 mins: Camera translation math, drawing the grid lines, drawing centered fox sprite 10 mins to 20 mins: Random map generation and knife shooting (8 directional with random 'life' and speed) 20 mins to 30 mins: Hackish collision detection and score system 30 mins to 40 mins: Polishing some stuff, adding "levels" (which just regenerate the map), the "Level up" with a timer so it goes away 40 mins to 45 mins: Final little things like the preface/mission explaining that the game is supposed to be terrible (lol) 45 mins to 60 mins: Pretty much done at this point... switched to URL loading on my engine, built the JAR, obfuscated it, uploaded images and the jar to my web host. Granted, this was a simple design and I wish I had been able to add more to it. I think with a longer time limit (maybe 2 to 2.5 hours) the games would look better overall. Some things I could have added with more time: -Health bars over the objects with random HP per object -Some sort of map scenery like a tree or a bush (it's pretty boring right now) -Textured ground -Make the objects wander around instead of being stationary -Doctored the images some more (like giving the apple eyes and a grimaced face) -An actual menu
|
|
|
|
|
CommanderKeith
JGO Wizard     Posts: 1455 Medals: 9
|
 |
«
Reply #47 on:
2010-04-12 03:25:39 » |
|
Very very funny games. CrapAssassin seems like the most playable/finished, love the name too Well done everyone knocking these up so quickly. Good value for 1hr 
|
|
|
|
|