I’ll be out at that time so I won’t even be able to watch! :’(
Good luck & have fun guys!
I’ll be out at that time so I won’t even be able to watch! :’(
Good luck & have fun guys!
Pretty much what I’m planning to do :persecutioncomplex:
but there will be a subject no ? or is it free ?
Same here. Got a loose idea setup and have as much automated as possible (actor management, resource management, build, etc).
Just waiting on the theme/sprites now …
what I am preparing too, right now
No subject, you just have you use these sprites!
http://www.otcsw.com/files/ImagePack.zip
(Please don’t start for another 35 minutes)
not many ppl over at #jgo-petite
do we have to use all the sprites in the pack? or can we get away with using just 2-3?
its been 7 min… ur really productive
missing stuff :
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
wow look nice
here is my dirty one hour source code
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.soundA.loop();
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();
/*
* Update enemies
*/
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);
/*
* Draw enemies
*/
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);
}
//g.drawImage(this.imageA,this.mouseX,this.mouseY,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());
}
}
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
[url=http://homepage.ntlworld.com/alan.d.waddington/java/competitions/petite/april2010/MatchingBlocksPetite.html]
http://homepage.ntlworld.com/alan.d.waddington/java/competitions/petite/april2010/final_version.png
[/url]
Click on image to play.
(I’ve made the html background black and white now)
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?
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.
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.