Java-Gaming.org Hi !
Featured games (88)
games approved by the League of Dukes
Games in Showcase (679)
Games in Android Showcase (194)
games submitted by our members
Games in WIP (734)
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 4
1  Game Development / Newbie & Debugging Questions / Re: Porting an Android Game Framework for Java Desktop usage on: 2016-04-18 03:16:07
I'm not sure how many they have on the official LibGDX team (it's open source so there are several contributors), but yeah Mario is one of the official guys. If you decide to make the switch there are a variety of listeners already provided in LibGDX for handling touch, multi-touch, keyboard, fling, etc.

I haven't tested on iOS yet (no mac to compile on) but desktop and Android work perfectly. On desktop it handles mouse clicks and on Android it handles touch using the same listener code. For text input LibGDX also launches the Android onscreen keyboard but on desktop it uses the physical keyboard. You don't have to handle any of the differences as that's all hidden away by the "magic" of LibGDX. It's very slick! Smiley
2  Game Development / Newbie & Debugging Questions / Re: Porting an Android Game Framework for Java Desktop usage on: 2016-04-17 22:51:14
Have you tried looking into any of the cross-platform frameworks available? A while back I was recommended LibGDX here on the forum and it is really fantastic. With one code base you can easily compile to desktop, Android, iOS, and web and all of this is done automatically for you. So you don't have to have multiple versions of the same project or move code around. Smiley
3  Game Development / Newbie & Debugging Questions / Re: [SOLVED] [LibGDX] Curved Path Constant Speed Problem with End Points on: 2016-04-16 06:59:46
That's alright, no worries! Smiley

I did have high level math in college because I minored in calculus-based physics, but it's just been a while since I've heard the terms and had to apply this stuff. If you don't keep on top of it, it slips away. lol

I am really happy with the look-up table method, but if you'd like to share your example code that would be great too. Thanks! Smiley
4  Game Development / Newbie & Debugging Questions / Re: [LibGDX] Curved Path Constant Speed Problem with End Points on: 2016-04-12 07:31:27
UPDATE

I tried using the lookup table method and got it working. Smiley I was worried I'd have to store thousands and thousands of values in order for it to be precise, but turns out that 100 looks pretty perfect. That really is a great method. I currently have a slight freeze for a fraction of a second at the very beginning, but hopefully I'll be able to figure that out. I've been stuck on this for a while, so I'm glad to be done with this bug! Cheesy
5  Game Development / Newbie & Debugging Questions / Re: [LibGDX] Curved Path Constant Speed Problem with End Points on: 2016-04-10 21:15:01
I think that's the problem I'm having with researching this stuff because even your "simple solution" of Gaussian quadrature method...I had to google that. lol So it might not be insane for those who have kept up with their higher level math skills, but if you haven't kept up with it then it is kind of insane when you don't grasp the simple explanations.

As long as I don't try to force the speed to be constant, then the path motion works without glitching or locking up...but obviously the speed varies over the curve. So it seems like there should be a way to unitize the fact that it's possible to move over the zero derivative without glitching and when it does start moving make that speed constant.

This method removes all constant speed code.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
private Vector2 getValue(float delta){
   // set t in the range [0,1] for path
   dist += speed * delta;
   if (dist > pathLength){
      dist = tPrev = 0;
   }
   t = dist / pathLength;
   
   path.valueAt(result, t);
   
   tPrev = t;
   return result;
}


So I guess what I'm trying to do is:
IF dot is moving THEN make speed constant
IF dot is not moving (zero or close to zero derivative) THEN skip to a frame when it is moving and make that speed constant

I know it's kind of a odd problem to explain, but hopefully that makes sense.

I'm also not sure how to go about breaking the curves up. What kind of curves would you use if not BSpline/Bezier curves and how would you line them back up so they flow smoothly one into the other? It seems like that would be even more difficult to pull off.
6  Game Development / Newbie & Debugging Questions / Re: [LibGDX] Curved Path Constant Speed Problem with End Points on: 2016-04-10 19:56:42
Yeah, I'm trying to figure out how to handle the special case and this has proven to be rather difficult.

The BSpline requires 3 control points at the end points in order to pull the curve all the way to the first control point. With only one control point at the ends the path actually starts after the first control point and ends before the last control point. Having multiple control points in the same location is also helpful for shaping the curve (making it a sharper curve at a particular point). So if I could allow multiple control points and then somehow step over that point smoothly while moving along the path, that would be perfect.

I have tried a lot of different methods to move beyond that point and this one theoretically seems like it has potential.

To summarize, I store the previous location value (in the vector2 "lastPoint") and then check to see if it the position has moved at all from the last frame. The position should change every frame so if the position hasn't changed then it's encountered a zero derivative. When it encounters a zero derivative, I keep increasing the curve parameter t and going through all the position calculations again in a loop until the position has changed, then it escapes the loop once the distance is greater than an allowed minimum speed (minSpeed = 1) and the derivative is greater than 1.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
private Vector2 getValue(float delta){
   do {
      // set t in the range [0,1] for path
      dist += speed * delta;
      if (dist > pathLength){
         dist = tPrev = tConst = tConstPrev = 0;
         lastPoint.set(0,0);
      }
      t = dist / pathLength;
     
      // CONSTANT SPEED
      dt = t - tPrev;
      path.derivativeAt(derivative, tConstPrev);
      tConst += dt * (speedAverage / derivative.len());  // << ERROR when derivative.len() is 0
      path.valueAt(result, tConst);
   }
   while (result.dst(lastPoint)<minSpeed || derivative.len()<1);
   
   lastPoint.set(result);  
   tPrev = t;
   tConstPrev = tConst;
   
   return result;
}


I did the same thing where I calculate the average speed to keep it from including zero derivatives in the average speed.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
private void pathLength_SpeedAverage(){
   float segmentCount = 20000;
   pathLength = 0;
   
   path.valueAt(lastPoint, 0);
   for (float i=0; i<=1; i+=1.0/segmentCount){
      path.valueAt(result, i);
      if (result.dst(lastPoint) >= minSpeed){
         path.derivativeAt(result, i);
         if (result.len()>1){
            pathLength += result.len();
           
            lastPoint.set(result);
         }
      }
   }
   speedAverage = pathLength / segmentCount;
   lastPoint.set(0,0);
}


That's where I'm at so far with this method. If the zero derivative occurs at the first control point then the program just locks up. If the zero derivative is moved towards the center of the curve then it occasionally works (moving past the zero derivative) on some passes through the curve and on others it glitches.

I have looked into the arc-length parameterization methods (or parametarizing by "s") and most of what I've found involves an insane amount of math (it's been a while since calculus lol) and I don't really understand the pseudo code provided. This pdf seems to pop up in pretty much every thread talking about this topic.
https://www.geometrictools.com/Documentation/MovingAlongCurveSpecifiedSpeed.pdf
The simplest one I've seen uses a lookup table to store arc length values along the curve and then searches the table to find the closest arc length and then grabs the next one and guesses at a value in between them. But I'm not really a fan of this method.

It seems like I'm really close with my current method because the constant speed part is working perfectly. It's just this one special case that I need to get figured out. So if there is a way to manipulate t in order to step over any zero (or near zero) derivatives, then that should solve my problem. Smiley
7  Game Development / Newbie & Debugging Questions / Re: [LibGDX] Curved Path Constant Speed Problem with End Points on: 2016-04-10 01:10:01
Thanks for the response delt0r.

I'm not sure what you mean by "i would replace curves with a non degenerate curve that has the same path but a different form in t", can you elaborate on that?

BSplines will work really well in my situation because I'm going to be creating complex paths which would be hard to piece together myself from individual curves. BSplines handle all the math and makes sure the individual Bezier curves join together smoothly. So if I can figure out a way to smoothly step over the zero (or near zero) derivatives at the end points then everything else will work great.
8  Game Development / Newbie & Debugging Questions / [SOLVED] [LibGDX] Curved Path Constant Speed Problem with End Points on: 2016-04-10 00:01:18
Hi all, I’m trying to move an image at a constant speed over a curved path in LibGDX. I calculated the average speed needed to travel the curve by taking the derivative at various points along the curve and averaging them. Then I multiply the path’s position (t) by a ratio of the average speed and the speed at the current location of the curve. This method for setting constant speed works great.

The problem I’m having occurs when multiple control points (3 or more) are put in the same location. Then the speed at this point is 0 (or close to 0) and dividing the average speed by a speed of 0 causes problems in the calculations.

BSpline requires three control points to be placed at the ends in order to have the curve actually reach the start and end at the end points. If I only put 1 or 2 control points at the ends the path starts after the first control point and ends before the last control point. For my application it is important that the motion reaches the end points because I will be linking together multiple BSplines and it’s important for them to line up correctly and to not have any time gaps between them either.

I’ve tried several different attempts at moving over the zero derivative area, but none of them were successful. I also asked on stackoverflow and there’s been some discussion in the comments but it hasn’t been solved yet.
http://stackoverflow.com/questions/36392634/curved-path-constant-speed-and-end-points

Here is a short sample program and I've included comments to indicate where the problem is. Any help getting this figured out would be greatly appreciated. Thanks.

NOTE: I used CatmullRomSpline in my example instead of BSpline only because I found a bug in the BSpline’s derivative method, which has been fixed but is not yet in the stable version of LibGDX.

Test.java
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  
public class Test extends Game {
   private Stage stage;
   private MyPath path;
   private Array<Texture> textures = new Array<Texture>(Texture.class);
   private Array<Image> images = new Array<Image>(Image.class);
   
   @Override
   public void create () {
      Gdx.graphics.setDisplayMode(1000, 1000, false);
      stage = new Stage();
      stage.setViewport(new ScreenViewport(stage.getViewport().getCamera()));
      Gdx.input.setInputProcessor(stage);
      createImages();
      path = new MyPath(Gdx.graphics.getWidth(), Gdx.graphics.getHeight(), images);
      stage.addActor(path);
   }  
   @Override
   public void render () {
      Gdx.gl.glClearColor(0.1f, 0.1f, 0.1f, 1.0f);
      Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
      stage.act(Gdx.graphics.getDeltaTime());
      stage.draw();
   }
   
   // IMAGES
   private void createImages(){
      images.add(getImage(Color.GREEN, true));
      for (int i=0; i<MyPath.pointsData.length; i++){
         images.add(getImage(Color.WHITE, false));
      }
   }
   private Image getImage(Color color, boolean fillCircle){
      Pixmap pixmap = new Pixmap(50, 50, Pixmap.Format.RGBA8888);
      pixmap.setColor(color);
      if (fillCircle){
         pixmap.fillCircle(pixmap.getWidth()/2, pixmap.getHeight()/2, pixmap.getWidth()/2-1);
      } else {
         pixmap.drawCircle(pixmap.getWidth()/2, pixmap.getHeight()/2, pixmap.getWidth()/2-1);
      }
      textures.add(new Texture(pixmap));
      pixmap.dispose();
      return new Image(textures.peek());
   }
   @Override
   public void dispose(){
      while (textures.size > 0){
         textures.pop().dispose();
      }
      stage.dispose();
      super.dispose();
   }
}


MyPath.java
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  
public class MyPath extends WidgetGroup {
   private Path<Vector2> path;
   private Vector2 result=new Vector2(), derivative=new Vector2();
   private float t, tPrev, dt, tConst, tConstPrev, dist, pathLength, speedAverage;
   private Image dot;
   
   private float speed = 1500 * 1000;
   
   public static final Vector2[] pointsData = {
      new Vector2(100, 100),
      new Vector2(100, 100),
//      new Vector2(100, 100),   // << UN-COMMENT TO PRODUCE BUG
     
      new Vector2(350, 800),
      new Vector2(550, 200),
      new Vector2(650, 400),
      new Vector2(900, 100),
      new Vector2(900, 100)
   };
   
   public MyPath(int width, int height, Array<Image> images){
      this.setSize(width, height);
      path = new CatmullRomSpline<Vector2>(pointsData, false);
      pathLength_SpeedAverage();
      addImages(images);
   }
   
   @Override
   public void act(float delta){
      result = getValue(delta);
      dot.setPosition(result.x - dot.getWidth()/2, result.y - dot.getHeight()/2);      
   }
   private Vector2 getValue(float delta){      
      // set t in the range [0,1] for path
      dist += speed * delta;
      if (dist > pathLength){
         dist = tPrev = tConst = tConstPrev = 0;
      }
      t = dist / pathLength;
           
      // CONSTANT SPEED
      dt = t - tPrev;
      path.derivativeAt(derivative, tConstPrev);
      tConst += dt * (speedAverage / derivative.len());  // << ERROR when derivative.len() is 0
      path.valueAt(result, tConst);
     
      tPrev = t;
      tConstPrev = tConst;
      return result;
   }
   
    private void pathLength_SpeedAverage(){
      float segmentCount = 20000;
      pathLength = 0;
      for (float i=0; i<=1; i+=1.0/segmentCount) {  
         path.derivativeAt(result, i);
         pathLength += result.len();
      }
      speedAverage = pathLength / segmentCount;
   }
   
    private void addImages(Array<Image> images){
      dot = images.items[0];
       for (int i=1; i<images.size-1; i++){
          images.items[i].setPosition(pointsData[i].x - images.items[i].getWidth()/2, pointsData[i].y - images.items[i].getHeight()/2);
         addActor(images.items[i]);
      }
      addActor(dot);
    }
}
9  Discussions / General Discussions / Re: Looking for Beta Testers for Android Metronome App [UPDATE: now in google store] on: 2015-05-23 04:36:29
Hi Phil, wow...thank you for your detailed suggestions. I appreciate it!

It’s great to hear that the audio timing and pendulum animations worked for you as these are the things I mainly wanted to test at this point. Everything else is still very much a work in progress and will be getting tweaked a lot.

The blue glow buttons don’t do anything yet, but they will eventually be the “power buttons” to enable or disable the settings in each section.

My Android phone only has a backspace key, so maybe Android doesn’t recognize the delete key? When running the desktop version from within Eclipse the delete key works. I just finished making my own keyboard that only has number, enter, backspace, and cancel buttons. It also automatically overwrites the previous number when the control is initially selected so it doesn’t have to be cleared before entering a new value.

The controls are real time signatures, but for normal time signatures (with no subdivision) you also have to set the subdivision to be the same as the numerator in the time signature. This is probably why 3/4 played faster than 4/4. If the three controls in the “sound” section are 3, 4, 4 then it takes one measure of 3/4 divides it into 4 notes. However, setting those controls to 3, 4, 3 will give the actual 3/4 time signature and it should line up perfectly with 4, 4, 4. This will be modifies eventually so that the subdivision control will be able to select between subdividing by beats or by bars and disabling (and hiding) the subdivision control entirely.

There will be a dropdown list that has the common denominator values for standard time signatures, but I’m also leaving the option to enter in your own values manually as irrational meters do technically exist, even if they are not common:
http://en.wikipedia.org/wiki/Time_signature#Irrational_meters

I want to allow for anything the user may want to try without imposing my own limitations on it. Most metronomes only allow you to select certain values from a drop down list for both the top and bottom numbers, whereas in mine you can input a custom time signature of 23/13 if you want and it will play it. This is a new concept I have not seen yet in any of the metronomes I’ve looked at.

You will be able to customize sounds for creating compound meters as there will be controls to edit each individual beat in the measure. You will be able to change the sound file, volume for accents/grace notes, and enable/disable certain beats to create rhythmic patterns.

That “burst of notes” bug you described also happens occasionally while changing settings during runtime as well. I think I can fix this bug during the pause as LiGDX has methods for handing the pause state, which I haven’t implemented yet. But I’m not sure what’s causing the runtime bug to happen yet.

The settings are lost because right now it’s removing and recreating many of the objects when new sounds are generated. This was a quick approach just while I was getting everything going, but this will be changed so it can save and recall settings.

Thanks again!
10  Discussions / General Discussions / Re: Achievement Milestones on: 2015-05-17 19:32:32
IMO what you should learn is all relevant to what you want to do. There is so much to learn in programming and you may never need certain aspects of it. For example, when I was going to university for programming my final project was a music related project that worked with MIDI and none of my teachers could help with with it. My teachers never had a need to use the MIDI sequencer in the way I was trying to use it, so they didn't learn about it...but I sure needed it! I did finally figure it out and get it working out of necessity for my project.

The best way to learn is to work on projects you are interested in and then learn what you need to in order to make it work. Take on difficult projects and you cannot help but learn a lot. Smiley
11  Discussions / General Discussions / Re: Looking for Beta Testers for Android Metronome App on: 2015-05-14 14:48:21
UPDATE: I have changed the installation to go through the google play store as a beta version. It's much easier to install and try out now that there is no more awful manual APK installation! Smiley
12  Discussions / General Discussions / Re: Looking for Beta Testers for Android Metronome App on: 2015-05-12 05:50:21
quew8, you are right that it is beats in a bar. It takes one measure of the time signature (say 4/4) and then subdivides it into how ever many notes you want (8 notes, or 13 notes, etc). When inputting normal time signatures with no subdivision then it is a mirror of the time signature. For example, for a 7/8 time signature the three controls would be 7, 8, and 7. This isn't ideal for working with normal time signatures, but it'll be easier when the other controls are added to give more options. Thanks again!
13  Discussions / General Discussions / Re: Looking for Beta Testers for Android Metronome App on: 2015-05-09 22:52:44
Hi quew8, thanks for your feedback. I will be adding the option to switch the subdivision between "beats" or "bars", so it'll be able to do both.

I went with bar subdivision for now because a key feature of my metronome is being able to play polyrhythms (for example, playing 3 beats against 4 beats where both of the "1" beats line up) which is easier to setup with subdivisions over the bar. You can still get beat subdivision in the mean time with straight forward math such as 4*3=12 notes per bar for triplets, 4*5=20 notes per bar for quintuplets, etc but I will be adding the option to do both before the official release. Thanks again! Smiley
14  Discussions / General Discussions / Looking for Beta Testers for Android Metronome App [UPDATE: now in google store] on: 2015-05-09 03:27:30
Hi all,

Would anyone with an Android smart phone be willing to beta test a metronome app I’m working on? It is still a work in progress and there are a lot more features that need to be added. No musical knowledge is required! At this point I’m only looking to try it out on a few different devices (I only have two at my disposal) to make sure there aren’t any glaring problems with it before adding more features to it. However, if we have musicians here I’m definitely open to feature and design suggestions! Smiley

Screenshot:



*** UPDATE ***

I’ve changed the way my metronome app is installed and it is now available through the google play store as a beta version. The installation process is a lot better and simpler than the previous manual APK install.

1) Join the "Metronome Beta Test" google community using your google account (only members of this group have permission to be a beta tester for my metronome).
https://plus.google.com/u/0/b/110003924608839499785/communities/104590479161660685475

2) Accept the invitation on the google play store to be a beta tester here.
https://play.google.com/apps/testing/com.tekker.metronome.android

3) Follow the link "download it from the Play Store" or use this direct link to install it.
https://play.google.com/store/apps/details?id=com.tekker.metronome.android

That's it! Smiley Thanks for checking it out.
15  Game Development / Newbie & Debugging Questions / [SOLVED] [LibGDX] Error when exporting Android APK with ProGuard on: 2015-05-07 22:55:51
Hi all,

I’m trying to export an Android APK with Proguard and I’m getting this error:
1  
2  
3  
4  
[2015-05-06 19:29:31 - Metronome-android] Proguard returned with error code 1. See console
[2015-05-06 19:29:31 - Metronome-android] proguard.ParseException: Unknown option '(' in argument number 14
[2015-05-06 19:29:31 - Metronome-android]    at proguard.ConfigurationParser.parse(ConfigurationParser.java:191)
[2015-05-06 19:29:31 - Metronome-android]    at proguard.ProGuard.main(ProGuard.java:484)


The config file mentioned here already exists in my Android project folder, which is named “proguard-project.txt”.
https://github.com/libgdx/libgdx/wiki/ProGuard-DexGuard-and-libGDX

And in the project.properties file I uncommented the line specified in the comments to enable ProGuard and resaved the file:
1  
2  
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt


I'm using Eclipse and to export the APK, I right-clicked the Android project and selected: Android Tools --> Export Signed Application Package
Then I went through the process to export it. When I clicked “Finish” I got the error mentioned above.

I have been able to successfully run ProGuard on a desktop application but I can't get the Android version to work, any ideas what I’m doing wrong? Thanks!


EDIT: I had parenthesis in my Eclipse project's file path and apparently that was causing ProGuard to crash. Creating a new project with no white space or odd symbols in the file path fixed the problem.
16  Game Development / Newbie & Debugging Questions / Re: [LibGDX] Creating menu. Button madness? on: 2015-04-11 05:17:16
but now I still cant figure out how to check if the mouse is hovering the button.
If all you need to do is change the image of the button when it is hovered over then you can do this without adding another listener by setting the "over" and "checkedOver" drawables in the ButtonStyle. However, if you need to do more stuff than just change than image then you will need to add a listener.
17  Game Development / Newbie & Debugging Questions / Re: Best tutorials on the basics? on: 2015-03-24 16:51:21
^^^ THIS! Smiley Tutorials Point is awesome and the topics are organized very well, which makes it easy to refresh on the parts you need.
18  Game Development / Newbie & Debugging Questions / Re: Libgdx font blurring on: 2015-03-24 16:39:21
FreeTypeFonts can be any size, they don't have to be 10px or multiples of it. The comment you posted might be regarding the use of the default BitmapFont provided by LibGDX in their uiskin...which doesn't apply to what you're doing.

It appears you're generating two fonts, "textFont" and "font". Are you trying to create two different fonts with two different sizes or just one font? (As a side note, the default font size for the parameter is 16, so you are actually generating two fonts of size 16.)

Are you resizing the font(s) elsewhere? With FreeTypeFonts you don't want to resize these later, you can create the font at the specific size that you need and it will look perfect.

You also want to make sure that you set all the parameters BEFORE you generate the BitmapFont. Generating the font is the last step because it creates an actual bitmap image of all the characters in your font using whatever parameters you have set at the time. As long as you get the size right and don't try to change it later, the font should come out perfect (and the filter types don't matter as these only apply when scaling).

1  
2  
3  
4  
5  
FreeTypeFontGenerator gen = new FreeTypeFontGenerator(Gdx.files.internal("font.ttf"));
FreeTypeFontParameter params = new FreeTypeFontParameter();
params.size = 16;
BitmapFont font = gen.generateFont(params);
gen.dispose();
19  Game Development / Newbie & Debugging Questions / Re: LibGDX: Memory management concerning Textures on: 2015-03-17 15:59:00
From my understanding of LibGDX anything that has a dispose method will not be garbage collected automatically and it is necessary to use the dispose method otherwise you will have memory leaks.
20  Discussions / General Discussions / Re: where can i get better at java? on: 2015-03-09 04:40:30
Here are a few tutorial sites that might be helpful.

The beginner Java course here is free.
http://courses.caveofprogramming.com/courses/java-for-complete-beginners

Mind blowing amount of tutorials! Shocked For certain languages (such as Java) they have an IDE built in so you can type code directly into the webpage and run it to see what it does. Pretty ingenious.
http://www.tutorialspoint.com/tutorialslibrary.htm

And for tutorial videos, TheNewBoston youtube channel is really good and entertaining too.
https://www.youtube.com/user/thenewboston/playlists
21  Game Development / Newbie & Debugging Questions / Re: LibGDX Displaying Textures on: 2015-02-24 00:48:32
Stage contains a SpriteBatch and does all of the rendering through it, so it's essentially a helper class that allows things to be handled in a much simpler way. As an example, this is the render method in my Game class.

1  
2  
3  
4  
5  
6  
7  
@Override
public void render () {
   stage.act();
   Gdx.gl.glClearColor(0.10f, 0.10f, 0.08f, 1.0f);
   Gdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);
   stage.draw();
}


That updates and renders absolutely everything in my entire app. I'm fairly new to LibGDX myself, and I started with SpriteBatch and Sprites...but after making this change I haven't looked back. It's definitely worth it and not nearly as difficult to use as it might appear at first glance.
22  Game Development / Newbie & Debugging Questions / Re: LibGDX Displaying Textures on: 2015-02-24 00:30:28
As another option, look into the LibGDX Actor and Stage classes. If you make all of your entities extend Actor, you can add them to the Stage and then updating and rendering is super simple using only stage.act() and stage.draw(). The stage goes through every actor that has been added to it and performs the action (either updating or rendering) so you can update and/or draw everything with only one line just as you want. Smiley
23  Discussions / Miscellaneous Topics / Re: Super Serious Selfie Thread. on: 2015-02-08 08:18:12
DRUMS! DRUMS! DRUMS! DRUMS! DRUMS! DRUMS! DRUMS! DRUMS! DRUMS!

24  Game Development / Newbie & Debugging Questions / Re: [LibGDX] FreeTypeFont Outline and Drop Shadow? on: 2015-02-01 05:42:35
UPDATE: rinold started a new pull and finished the outline and drop shadow feature. It has now been merged into LibGDX, I just tested it out and it works perfectly!
Here is the link: https://github.com/libgdx/libgdx/pull/2774
25  Game Development / Newbie & Debugging Questions / Re: java.awt.Point class in Android on: 2015-01-25 21:20:54
Here is the source for awt.Point, which you can copy and paste to create a new class which performs all of the same functions.
http://grepcode.com/file/repository.grepcode.com/java/root/jdk/openjdk/6-b14/java/awt/Point.java
26  Game Development / Newbie & Debugging Questions / [SOLVED] [LibGDX] FreeTypeFont Outline and Drop Shadow? on: 2015-01-25 20:55:02
Hi all,

Does anyone happen to know if there is currently a way to add an outline and a drop shadow to a FreeTypeFont in LibGDX? I've done quite a bit of searching but there's not much information on this topic. I did find this on github which looks like it would do exactly what I want, but it doesn’t appear that it was finished.
https://github.com/libgdx/libgdx/pull/2191

I also tried posting on the LibGDX forum a few days ago but didn't get any responses.

Thanks. Smiley
27  Discussions / General Discussions / Re: Game Sound effects? on: 2015-01-03 23:02:57
Could also get the demo of your DAW of choice and use that, for instance FL Studio demo is free and the only limitation is not being able to open previously saved projects, which wouldn't be a big deal if you're just processing some one-off sound files. I believe the situation is similar for other DAWs.
Reaper is a little different as it works on the honor system, the demo version is fully functional and never expires. Definitely worth checking out, it is an awesome DAW!
http://www.reaper.fm/
28  Discussions / General Discussions / Re: Programmer jokes on: 2015-01-03 21:06:08
... and those that never get first base.
LOL Grin Grin Grin
29  Discussions / General Discussions / Re: Would it be worth porting to c++? on: 2015-01-03 20:59:37
What about using LibGDX? From what I've read, LibGDX does the performance critical stuff in C/C++. And you get the added benefits of automatically handling ports to mobile devices (Android, iOS, and Blackberry).
30  Discussions / General Discussions / Re: 2015 Game Development Goals on: 2015-01-02 23:51:14
What I did in 2014:

Exactly one year ago today, I decided to dust off my idea of creating a polyrhythmic (two or more different rhythms played simultaneously) metronome application and start working on it again. I've had the idea for about 4 years but kept running into problems that I couldn't get past, thus never made any kind of serious progress with it. After picking it up again, I had hit another wall with it...but then....I found this forum!!! Smiley And thanks to the help of the amazing members here I was able to not just move forward on my project, but get the core functionality working better than I could have ever dreamed possible. It's still a work in progress, but it is coming along extremely well. I also made the switch over from Java SE to using LibGDX (based on the recommendation of several forum members here) which has been a challenge all on its own.

Finding this forum was the best part of 2014 as I probably would have stopped working on my project yet again and put it back on the shelf. I have learned so much in just the 6 months or so that I've been here, it's crazy.

What I plan to do in 2015

Release my metronome! I'm not going to say "finish" as I think I will keep adding more features to it for as long as I can. And of course, I plan to spend lots more time here! Cheesy
Pages: [1] 2 3 4
 
DarkCart (20 views)
2016-05-29 02:30:33

Hydroque (36 views)
2016-05-26 14:45:46

Mac70 (47 views)
2016-05-24 21:16:33

theagentd (54 views)
2016-05-14 18:38:35

theagentd (87 views)
2016-05-10 22:37:41

theagentd (92 views)
2016-05-10 22:33:46

IanParcs (119 views)
2016-04-18 14:18:53

KaiHH (115 views)
2016-04-18 08:35:41

KaiHH (135 views)
2016-04-15 12:43:58

theagentd (142 views)
2016-04-14 02:16:17
FPS Camera Tutorial
by Hydroque
2016-05-22 05:40:58

Website offering 3D Models specifically for games for free
by vusman
2016-05-18 17:23:09

Website offering 3D Models specifically for games for free
by vusman
2016-05-09 08:50:56

Website offering 3D Models specifically for games for free
by vusman
2016-05-06 11:10:21

Website offering 3D Models specifically for games for free
by vusman
2016-04-29 12:56:17

List of Learning Resources
by SilverTiger
2016-02-05 09:39:47

List of Learning Resources
by SilverTiger
2016-02-05 09:38:38

List of Learning Resources
by SilverTiger
2016-02-05 09:35:50
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!