Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (480)
Games in Android Showcase (110)
games submitted by our members
Games in WIP (546)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 [2]
  ignore  |  Print  
  JGO Petite - Sunday, April 11, 6:00PM GMT  (Read 12387 times)
0 Members and 1 Guest are viewing this topic.
Offline DzzD
« Reply #30 - Posted 2010-04-11 19: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

Offline kappa
« League of Dukes »

JGO Kernel


Medals: 75
Projects: 15


★★★★★


« Reply #31 - Posted 2010-04-11 19: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
Offline DzzD
« Reply #32 - Posted 2010-04-11 19:10:26 »

wow look nice

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline DzzD
« Reply #33 - Posted 2010-04-11 19:11:15 »

here is my dirty one hour source code Smiley
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.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());
    }
   
}

Offline woogley
« Reply #34 - Posted 2010-04-11 19:14:10 »

Unfortunately I'd need another 15mins to finish this, but oh well Smiley

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
Offline jimsmi6

Senior Newbie





« Reply #35 - Posted 2010-04-11 19:14:54 »

Here's my entry:

"CrapAssassin"



Playable at: http://midtro.com/jgo-petite/
Offline Alan_W

JGO Knight


Medals: 8
Projects: 3


Java tames rock!


« Reply #36 - Posted 2010-04-11 19: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.
Offline DzzD
« Reply #37 - Posted 2010-04-11 19: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?

Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #38 - Posted 2010-04-11 19: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. Smiley

http://www.otcsw.com/files/MagicFox.zip



See my work:
OTC Software
Offline kappa
« League of Dukes »

JGO Kernel


Medals: 75
Projects: 15


★★★★★


« Reply #39 - Posted 2010-04-11 19:38:48 »

thanks for all the ppl entering, contest was great fun, one hour of mad coding really enjoyed it Smiley

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! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 11
Exp: 10 years


Game Engineer


« Reply #40 - Posted 2010-04-11 19:39:38 »

Yay, fun times! I'll put a post in to see when people want to go next.

See my work:
OTC Software
Offline DzzD
« Reply #41 - Posted 2010-04-11 19: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 ?

Offline Alan_W

JGO Knight


Medals: 8
Projects: 3


Java tames rock!


« Reply #42 - Posted 2010-04-11 20: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.
Offline Alan_W

JGO Knight


Medals: 8
Projects: 3


Java tames rock!


« Reply #43 - Posted 2010-04-11 20: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  Smiley

Time flies like a bird. Fruit flies like a banana.
Offline Alan_W

JGO Knight


Medals: 8
Projects: 3


Java tames rock!


« Reply #44 - Posted 2010-04-11 20:18:49 »

Unfortunately I'd need another 15mins to finish this, but oh well Smiley

I like the gravity effect on the sword.  Just needed that collision detection  Smiley

Time flies like a bird. Fruit flies like a banana.
Offline DzzD
« Reply #45 - Posted 2010-04-11 20: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 Smiley ... 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)





Offline jimsmi6

Senior Newbie





« Reply #46 - Posted 2010-04-12 03: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 Smiley ... 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
Offline CommanderKeith
« Reply #47 - Posted 2010-04-12 07:25:39 »

Very very funny games. CrapAssassin seems like the most playable/finished, love the name too Smiley 

Well done everyone knocking these up so quickly. Good value for 1hr  Cheesy

Pages: 1 [2]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

atombrot (23 views)
2014-08-19 09:29:53

Tekkerue (22 views)
2014-08-16 06:45:27

Tekkerue (21 views)
2014-08-16 06:22:17

Tekkerue (12 views)
2014-08-16 06:20:21

Tekkerue (19 views)
2014-08-16 06:12:11

Rayexar (57 views)
2014-08-11 02:49:23

BurntPizza (37 views)
2014-08-09 21:09:32

BurntPizza (29 views)
2014-08-08 02:01:56

Norakomi (36 views)
2014-08-06 19:49:38

BurntPizza (66 views)
2014-08-03 02:57:17
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!