Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (687)
Games in Android Showcase (198)
games submitted by our members
Games in WIP (758)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1] 2 3 ... 7
1  Games Center / Showcase / Misspelled - Test your spelling of the most commonly misspelled English words on: 2016-05-24 20:24:37


Misspelled is a game where you can test and enhance your spelling skills. You are given 4 different words and your job is to pick the one that is spelled CORRECTLY. The other 3 words will all be wrong in some way or another. There are 3 game modes:
  • Marathon - Answer as many consecutive questions as possible. You are given 30 seconds for each question. You get 3 strikes before you lose.
  • Time Attack - Answer as many questions as you can in 60 seconds.
  • Zen - Free play mode. No timers or strikes, just play as you like.
As this is my first app, I'd love to hear any feedback or suggestions you may have. The app is completely free and only requires internet permission to access the online leaderboard.

https://play.google.com/store/apps/details?id=com.toasted.misspelled
2  Game Development / Newbie & Debugging Questions / Re: Libgdx Freetype font glitches on android? on: 2016-04-22 15:34:26
Sure thing. Here is the wrapper that I have for Freetype fonts:
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  
package com.toasted.misspelled;

import java.util.HashMap;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.graphics.Color;
import com.badlogic.gdx.graphics.g2d.BitmapFont;
import com.badlogic.gdx.graphics.g2d.GlyphLayout;
import com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator;
import com.badlogic.gdx.graphics.g2d.freetype.FreeTypeFontGenerator.FreeTypeFontParameter;
import com.badlogic.gdx.utils.Align;

public class Font{
   
   public static Font font0;
   public static Font font1;
   public static Font font2;
   public static void init(){
      font0 = scale(Gdx.graphics.getWidth() / 9, Color.WHITE, null);
      font1 = scale((int) (Gdx.graphics.getWidth() / 9 * 3.1f), Color.WHITE, null);
      font2 = scale((int) (Gdx.graphics.getWidth() / 9 * .81f), Color.WHITE, null);
   }

   private static FreeTypeFontGenerator fgen = new FreeTypeFontGenerator(Gdx.files.internal("ArchivoBlack.otf"));
   public static Font getFont(int size, Color color, Color outline){
      if(fontCache.get(new FontInfo(size, color, outline)) != null)
         return fontCache.get(new FontInfo(size, color, outline));
         
      FreeTypeFontParameter parameter = new FreeTypeFontParameter();
      //parameter.borderColor = outline;
      //parameter.borderWidth = 1;
      parameter.size = size;
      parameter.color = color;
      parameter.shadowOffsetX = 2;
      parameter.shadowOffsetY = 2;
      parameter.shadowColor = Color.GRAY;
      Font f = new Font(fgen.generateFont(parameter), size);
      fontCache.put(new FontInfo(size, color, outline), f);
     
      return f;
   }
   private static Font scale(int size, Color color, Color outline){
      return getFont((int)(size * Renderer.scale.x), color, outline);
   }
   public static void dispose(){
      fgen.dispose();
   }
   private static class FontInfo {
      int size;
      Color color;
      Color outlineColor;
      public FontInfo(int size, Color color, Color outlineColor){
         this.size = size;
         this.color = color;
         this.outlineColor = outlineColor;
      }
      public boolean equals(Object o){
         FontInfo fi = null;
         if(o instanceof FontInfo) fi = (FontInfo)o;
         if(fi == null) return false;
         return size == fi.size && color.equals(fi.color) && fi.outlineColor.equals(this.outlineColor);
      }
   }
   private static HashMap<FontInfo, Font> fontCache = new HashMap<FontInfo, Font>();
   private BitmapFont bitmap;
   public int size = 0;
   private GlyphLayout gl = new GlyphLayout();
   public Font(BitmapFont font, int size){
      this.bitmap = font;
      this.size = size;
   }
   public void draw(Renderer g, String s, float x, float y){
      bitmap.draw(g, s, x, y + bitmap.getLineHeight() - bitmap.getAscent() * 2);
   }
   public void draw(Renderer g, String s, float x, float y, float w){
      gl.setText(bitmap, s);
      bitmap.draw(g, s, x - gl.width / 2, y, w, Align.left, false);
   }
   public float getRaise(){
      return -bitmap.getDescent();
   }
   public float getCap(){
      return bitmap.getCapHeight();
   }
   public float getWidth(String s){
      gl.setText(bitmap, s);
      return gl.width;
   }
   public float getHeight(){
      return bitmap.getLineHeight();
   }
   public Color getColor(){
      return bitmap.getColor();
   }
   public void setColor(Color c){
      bitmap.setColor(c);
   }
   public void draw(Renderer g, String s, float x, float y, float w, boolean wrap){
      bitmap.draw(g, s, x, y, w, Align.left, wrap);
   }
   public BitmapFont getBitmap(){
      return bitmap;
   }


And here is what one of the draw calls looks like:
1  
Font.font2.draw(g, "HIGH SCORE:", getWidth() / 2 - Font.font2.getWidth("HIGH SCORE:") / 2, getHeight() * .25f);
3  Game Development / Newbie & Debugging Questions / Libgdx Freetype font glitches on android? on: 2016-04-22 04:44:42
I've been working on a little app lately and I decided to use freetype for the font and it's been working great on the desktop client. However, on Android, I get these weird glitches in the drawing of some characters, and some characters won't draw at all. If I change the font size by the slightest bit, the characters that aren't working start to work, but other characters stop working then. I don't know if anyone else has had this problem before. Any help would be greatly appreciated. Here are some pictures to show exactly what I'm talking about. http://imgur.com/a/0y7wo
4  Game Development / Networking & Multiplayer / Lag Compensation on: 2016-01-23 20:49:15
I've been working on a little multiplayer game based on Valve's Source Multiplayer method (Described here: https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking) and I'm coming across an issue which someone asks on the page, but no answer is presented. I was wondering if anyone here could help me answer it. The question is as such:

Quote
From the page: After 100 milliseconds, the client will receive the server snapshot that contains the changes based on the user command he predicted earlier.
After 50 milliseconds, though, the client will receive a server snapshot that does not yet contain the changes based on the user command. Does the client simply ignore this snapshot? If so, what are the rules governing this?

In my case, this causes a stuttering when players let go of a movement key. Any help? I can provide some code if necessary, however, I think this is more of a conceptual issue than code issue.
5  Game Development / Game Mechanics / Re: [Libgdx]Looking to make a 3D effect with 2D sprites. (Example in thread) on: 2015-10-09 15:53:21
Actually, What I'm really looking for is how to accomplish the textured ground and scaling of objects as they come closer. I'd like to do this with sprites drawn to the screen instead of models.
6  Game Development / Game Mechanics / [Libgdx]Looking to make a 3D effect with 2D sprites. (Example in thread) on: 2015-10-09 03:14:04
I'm trying to figure out how to make a 3d effect with 2d sprites, but I have no idea where to even start. I want to make something like this:

https://www.youtube.com/watch?v=34JbhA154To

But with a higher camera angle. If anyone can point me in the direction of what I need to accomplish this, it'd be much appreciated. Thanks.
7  Game Development / Newbie & Debugging Questions / Re: GLContext class not found? [Solved] on: 2015-09-30 19:05:54
Yeah, I think I've got it all sorted out. This time I used lwjgl's actual website and all seems to be working fine without that code. Thanks.
8  Game Development / Newbie & Debugging Questions / GLContext class not found? on: 2015-09-30 17:45:50
I'm trying to follow a tutorial for LWJGL 3 and I've stumbled across a problem. The tutorial tells me to use the line:
1  
GLContext.createFromCurrent()

However, I cannot find the GLContext class anywhere in the lwjgl library.
Here's a link to the tutorial I am using: https://www.youtube.com/watch?v=yzDZIN1eSGQ
If anyone knows what could be going on, I would appreciate the help. Thanks.
9  Game Development / Networking & Multiplayer / Re: Netcode works perfectly on one network, doesn't work on another. on: 2015-06-01 01:21:20
I'm entering the IP address for the server manually.
10  Game Development / Networking & Multiplayer / Netcode works perfectly on one network, doesn't work on another. on: 2015-05-31 17:46:02
This code isn't necessarily a code oriented question, but I was hoping someone might have an idea of what to do. I've got networking working in this app I'm working on, where I have an android client connect to a desktop server running on a laptop. I have two routers in my house, where one is just an old linksys and the other is an apple airport extreme. My app works great when both server and client are connected to the linksys. However, the client cant seem to find the server when connected to the airport. I'm using libgdx's built in networking if that helps. Does anyone know what is the issue here?
11  Games Center / WIP games, tools & toy projects / Re: Army Men - a 3do fangame! on: 2015-02-01 03:15:41
Really like the look of this. Downloaded it, but I couldn't get it to run. I get an exception when at the loading map screen.

How much RAM does your machine have?
In the batch file included, try raising the max amount of RAM if possible.

batch file:
1  
java -Xmx1G -Xms1G -jar Game.jar

1G is the amount of RAM. If 1 does not work for you, raise to 2.
Oh, I forgot to put the arguments before the -jar. Got it working.
12  Games Center / WIP games, tools & toy projects / Re: Army Men - a 3do fangame! on: 2015-01-31 20:26:39
Really like the look of this. Downloaded it, but I couldn't get it to run. I get an exception when at the loading map screen.
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  
C:\Users\Eddie\Downloads\ARMY MEN (1)>java -jar Game.jar -Xms2048m -Xmx2048m
SETTING ICON
SHADER ERROR: Uniform 'normalMatrix' does not exist in shader program net.mantag
ames.armymen.Game$TransparencyShader@b62d79!

Starting up SoundSystem...
Initializing LWJGL OpenAL
    (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.or
g)
OpenAL initialized.

Loading global resources
Starting to load MD3
  Loading tags
    tag_barrel: (3.8070388, 0.011169279, 0.39257425)
  Loading surfaces
    g
MD3 File loaded!
Starting to load MD3
Starting to load MD3
  Loading tags
    tag_weapon: (0.60052204, -0.25301063, 0.583339)
    tag_camera: (0.19334438, -1.3352519, 2.8884773)
  Loading surfaces
    g
MD3 File loaded!
Starting to load MD3
  Loading tags
    tag_torso: (6.077345E-11, 1.9356355E-7, 3.88718)
  Loading surfaces
    default
MD3 File loaded!
LOADED IN 3.626 seconds
Setting up world
Detected NVIDIA card.
Vendor: nvidia corporation
Renderer: geforce 840m/pcie/sse2
Post processing pipeline: [net.mantagames.anarchyengine.post.MergeProcessor@1f62
e33, net.mantagames.anarchyengine.post.BloomRenderer@b1e9b8, net.mantagames.anar
chyengine.post.ToneMapper@1406a17, net.mantagames.anarchyengine.post.FXAAProcess
or@af004b]
ARB_base_instance supported, using for decal rendering.
C:\Users\Eddie\Downloads\ARMY MEN (1)\Resources\maps\Kitchen.wad
  Loading map...Exception in thread "main" java.lang.OutOfMemoryError: Java heap
 space
        at net.mantagames.anarchyengine.model.BinFile.<init>(BinFile.java:38)
        at net.mantagames.armymen.world.GameMap.load(GameMap.java:189)
        at net.mantagames.armymen.world.GameMap.<init>(GameMap.java:64)
        at net.mantagames.armymen.world.World.loadWorld(World.java:130)
        at net.mantagames.armymen.Client$2.execute(Client.java:119)
        at net.mantagames.anarchyengine.World.doTasks(World.java:23)
        at net.mantagames.armymen.world.World.draw(World.java:214)
        at net.mantagames.armymen.Client.draw(Client.java:290)
        at net.mantagames.anarchyengine.Core.startGameLoop(Core.java:178)
        at net.mantagames.armymen.Client.<init>(Client.java:80)
        at net.mantagames.armymen.Client.main(Client.java:374)
13  Game Development / Game Mechanics / Pathfinding without a grid on a 2d plane on: 2014-10-23 19:27:12
I've been working on a little side project where it's just two endless armies fighting each other and I've begun adding buildings to it so that they can refill their ammo and such things. The issue I'm having is in having pathfinding AROUND the buildings. Right now the buildings stop the fighters in their tracks and the fighters can't find their way around. I don't have any sort of grid in place either. This is an example of what is happening:
14  Game Development / Newbie & Debugging Questions / Re: Programming an online top-down game for newbies - Questions on: 2014-10-20 17:53:17
I'd like to hear your honest opinion!
As beginner, don't do an online multiplayer game at all.
I had the same thought. When I see "newbie" and "online-multiplayer" in the same post, I see a recipe for disaster. This is not always the case, but I still hazard opening the can of worms labeled "multiplayer" as a first serious project.
15  Game Development / Newbie & Debugging Questions / Libgdx - Tiled Map object properties on: 2014-09-15 02:02:57
I'm having a bit of trouble with trying to iterate through the list of keys provided by Libgdx's MapObject class. As I'm trying to iterate through them, I only receive the data for the first item in the list. Here's what I've got.
1  
2  
3  
4  
5  
MapProperties p = o.getProperties();
while(p.getKeys().hasNext()){
   String s = p.getKeys().next();
   System.out.println(s);
}

All I'm getting is the name of the first key, x, over and over. Any help would be great.
16  Game Development / Game Mechanics / LIBGDX - Xbox360 Controller joystick conversion on: 2014-09-14 01:32:28
I'm working with Libgdx's controller library, trying to make a platformer. I want the joystick to behave like d-pad however. Specifically, I need to only recognize one direction at a time, and I need to recognize when the player lets go of the stick and it returns to the center position. Any insight to this would be much appreciated. Pardon the messy code. This is what I've got going so far:
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  
   public boolean axisMoved(Controller controllerN, int axisCode, float value) {
     
      if(Math.abs(value) > joystickDeadzone){
         switch(axisCode){
         case 0:
            if(value < 0){
               controller.keyDown(ControlMapXbox.upAxis);
            }
            if(value > 0){
               controller.keyDown(ControlMapXbox.downAxis);
            }
            break;
         case 1:
            if(value < 0){
               controller.keyDown(ControlMapXbox.leftAxis);
               
            }
            if(value > 0){
               controller.keyDown(ControlMapXbox.rightAxis);
            }
            break;
         case 2:
           
            break;
         case 3:
           
            break;
         case 4:
            if(value < 0){
               controller.keyDown(ControlMapXbox.rightTrigger);
            }
            break;
         }
      }
      return false;
   }
17  Game Development / Newbie & Debugging Questions / Re: making an inventory work. on: 2014-08-18 17:47:52
Here's some quick code I wrote up. No time to try it so tell me if it doesn't work.
This is just a mockup of what I would suggest for the "MyButton" class. (Although, I don't recommend naming it that.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
public class MyButton extends JButton{

   public Item i;

   public MyButton(....., Item i){ // The "......." is whatever arguments you're already passing to create the JButton, if any.
      super(....);
      this.i = i;
   }
   public Item getItem(){
      return i;
   }
}


Here's where your button press would be handled.
1  
2  
3  
4  
5  
6  
7  
8  
public void actionPerformed(ActionEvent e){
   Object o = e.getSource();
   if(o instanceof MyButton){
      MyButton b = (MyButton)o;
      b.getItem().doAction(player);
   }
   
}
18  Game Development / Game Mechanics / Re: [LibGDX] Edges on 3D models on: 2014-08-18 12:00:02
I don't have much experience with 3d, but am I going to see much of a performance drop from using shaders?
19  Game Development / Game Mechanics / [LibGDX] Edges on 3D models on: 2014-08-18 03:13:03
I'm starting to work with 3d and I have an aesthetic that I'm trying to reach. I want to be able to have my models show with extra emphasis on the edges of the models, like in Cel Shading, but without the toonish lighting. I haven't been able to find very much info on this or if this is even possible with LibGDX. If anyone has some insight on this, it would be much appreciated.
20  Game Development / Newbie & Debugging Questions / Re: making an inventory work. on: 2014-08-15 14:40:07
I would make an extension of whatever button class you are using that has an Item variable in it. When you generate all of your buttons, add the item object to the constructor of the button. Then, when you process the actionevent, you can cast the source of the event to your new button class. From your source, you can access the item variable you had stored in it.
21  Game Development / Newbie & Debugging Questions / Re: making an inventory work. on: 2014-08-15 11:40:29
If I were to approach this, I would have to agree with you up until you start throwing actionlisteners in. I'm not sure if this is best practice, but I would have all the "Items" extend one abstract class. In the abstract class, I would have an abstract method called something like "doAction(Player player, Environment env)". Then, you can have each item class have its own instruction, without throwing all the instructions into one class. Of course, the issue with this is that you have to create a new class for every item.
22  Game Development / Game Mechanics / Re: Plane physics on: 2014-08-11 13:59:46
@opiop65
That's a much better way at explaining it that what I had. Thank you.
23  Game Development / Game Mechanics / Re: Plane physics on: 2014-08-11 12:34:48
No, by definition, the wing would not be generating any lift. Lift is defined as , "Upward-acting force on an aircraft wing or airfoil." If the plane is still moving forward when it stalls and begins to fall, that is due to the momentum that the plane has from it's previous movement. Now, assuming the wind speed is 0, you just have the force of the wind moving at the horizontal speed of the plane colliding with the top of the wing, slowing its horizontal speed. I hope that makes sense to you.
24  Discussions / General Discussions / Re: What? Your game isn't a pixelated retro masterpiece? on: 2014-07-18 14:41:16
I use pixel art for my work primarily because I just flat out suck at drawing. Nobody I know is any good with animation, and I find that I can do my best art when I don't need such a finite control on the art and pixels are great to hide that. I'll admit it, I won't call my games "Retro" or "8-bit", because I'm not using the same constraints that they had to abide by and attempt to work around back then. I'd personally rather have a minimalistic look to my games, which I believe can also be provided by pixels.
25  Games Center / Featured Games / Re: [Slick2d] Retro-Pixel Castles > Now on Steam! < on: 2014-07-15 20:32:24
Just downloaded it to try it out. First thoughts, I'm digging all the art. Second thoughts, "Oh, I can only use the map editor". Third Thoughts, "Umm.. It crashes whenever I get to the loading map screen."
26  Game Development / Newbie & Debugging Questions / Re: Libgdx sound lag? [solved] on: 2014-07-14 12:01:51
Yeah, the clip ran perfectly fine on PC. I know I didn't do anything special for it because I downloaded it from freesound and didn't even look at the sample rate until there was an issue.
27  Game Development / Newbie & Debugging Questions / Re: Libgdx sound lag? [solved] on: 2014-07-14 02:53:01
Success has been had! I lowered the sample rate on the clip from about 96k to 44.1k. It plays perfectly fine now!
28  Game Development / Newbie & Debugging Questions / Re: Libgdx sound lag? on: 2014-07-12 01:50:33
Well I'm fairly certain that the issue is NOT with the phone lacking power. It's a newer Samsung Galaxy S4, and I've also run it on a couple of other newer phones as well.
29  Game Development / Newbie & Debugging Questions / Re: Libgdx sound lag? on: 2014-07-11 12:25:14
Well, here's my Audio.java class. It's not the greatest, but hey, I'm open for suggestions.
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  
package com.toasted;

import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.audio.Music;
import com.badlogic.gdx.audio.Sound;
import com.badlogic.gdx.files.FileHandle;

public class Audio {
   public static Sound beep0 = newSound("blip.wav");
   public static Sound swing = newSound("swing.wav");
   public static Sound crumble = newSound("crumble.wav");
   public static Sound laser = newSound("laser.wav");
   public static Sound vaporize = newSound("vaporize.wav");
   public static Sound thump = newSound("thump.ogg");
   public static Sound siren = newSound("siren.ogg");
   public static Sound wood = newSound("wood.ogg");
   public static Sound chain = newSound("chain.ogg");
   
   public static Sound whiteSedan = newSound("whiteSedan.ogg");
   public static Sound cleanUp = newSound("cleanUp.ogg");
   public static Sound carl = newSound("carl.ogg");
   public static Sound thankYou = newSound("thankyou.ogg");
   public static Sound dairy = newSound("dairy.ogg");
   public static Sound special = newSound("special.ogg");
   public static Sound cashews = newSound("cashews.ogg");
   
   public static final float cleanUpRuntime = 2.0F;
   public static final float whiteSedanRuntime = 5.0F;
   public static final float carlRuntime = 7.5F;
   public static final float thankYouRuntime = 7.75F;
   public static final float dairyRuntime = 5.75F;
   public static final float specialRuntime = 7.0F;
   public static final float cashewsRuntime = 6.0F;
         
   public static Music gameLoop = Gdx.audio.newMusic(Gdx.files.internal("sound/musicLoop.ogg"));
   public static Music rageMusic = Gdx.audio.newMusic(Gdx.files.internal("sound/rage.ogg"));
   
   public final static float SWING_VOL = .5F;
   public final static float VOL = 1.0F;
   public static boolean enabled = true;
   
   public void pauseAll(){
      beep0.pause();
      swing.pause();
      crumble.pause();
      laser.pause();
      vaporize.pause();
      thump.pause();
      siren.pause();
      wood.pause();
      whiteSedan.pause();
      cleanUp.pause();
      chain.pause();
     
      gameLoop.pause();
      rageMusic.pause();
   }
   
   public static void play(Sound s){
      if(enabled)
         s.play(VOL);
   }
   public static void loop(Sound s){
      if(enabled)
         s.loop(VOL);
   }
   public static void loop(Sound s, float vol){
      if(enabled)
         s.loop(vol);
   }
   public static void play(Music m){
      if(enabled)
         m.play();
   }

   
   public static void playRandomPitch(Sound sound, float vol){
      if(!enabled) return;
      float pitch = Global.r.nextFloat();
      sound.play(vol, (pitch * 1.0F) + 1.0F, 0);
   }
   
   private static Sound newSound(String filename){
      return Gdx.audio.newSound(Gdx.files.internal("sound/"+filename));
   }
}

And this is where I believe I'm seeing my problem.
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  
for(int i = 0;i < products.size();i++){
         Product p = products.get(i);
         if(p.position.x < player.position.x && player.position.x - p.position.x > 32){
            products.remove(p);
         }
         if(!p.exists()){
            //shatter
            for(int j = 0;j < 5;j++){
               particles.add(new Particle(p.position, new Vec2D(Global.getRandomInt(1, 10), 0), 2.0F, true, Art.frag(p.item)));
            }
            productCounter[p.ID]++;
            products.remove(p);
            Global.score += (int)Global.multiplier * Product.points[p.ID];
            if(p.sliced) {
               rage += 1 * (Global.crown ? 1.5F : 1F);
               Audio.playRandomPitch(Audio.crumble, .25F);
            }else{
               switch(rageType){
               case lazerVision:
                  Audio.play(Audio.vaporize);
                  break;
               }
            }
            if(rage > 100){
               rage = 100;
            }
         }
      }
30  Game Development / Newbie & Debugging Questions / Re: Libgdx sound lag? on: 2014-07-10 16:04:01
Well, yeah I guess it would just be running slowly. There's not any noticable latency between when the sound is supposed to play and when the sound actually plays. Sorry for the misnomer there.
Pages: [1] 2 3 ... 7
 
roseslayer (603 views)
2016-08-06 11:43:29

roseslayer (557 views)
2016-08-06 09:43:11

xTheGamerCodes (630 views)
2016-08-04 15:40:59

xTheGamerCodes (623 views)
2016-08-04 15:40:24

orrenravid (970 views)
2016-07-16 03:57:23

theagentd (1048 views)
2016-07-11 14:28:54

Hydroque (1161 views)
2016-07-06 05:56:57

Hydroque (1088 views)
2016-07-03 08:52:54

GrandCastle (905 views)
2016-07-01 09:13:47

GrandCastle (650 views)
2016-07-01 09:09:45
Rendering resources
by Roquen
2016-08-08 05:55:21

Rendering resources
by Roquen
2016-08-08 05:52:42

Rendering resources
by Roquen
2016-08-08 05:50:38

Rendering resources
by Roquen
2016-08-08 05:49:53

Rendering resources
by Roquen
2016-08-08 05:32:39

Making a Dynamic Plugin System
by Hydroque
2016-06-25 00:13:25

Java Data structures
by BinaryMonkL
2016-06-13 21:22:09

Java Data structures
by BinaryMonkL
2016-06-13 21:20:42
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!