Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (121)
games submitted by our members
Games in WIP (577)
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  Discussions / Miscellaneous Topics / Anyone Keen for CoD: Advanced Warfare? on: 2014-10-24 15:29:53
As you all probably know, Advanced Warfare is coming out in a week and a half. I'm pretty excited! Is anyone getting the game on PC? If so, would you like to play together some time? Just thought it'd be more fun to play in a group while chatting Smiley

How do you guys think the game will turn out? Revolutionary while keeping the elements that make Call of Duty fun as they advertise, or another disappointment like Ghosts?
2  Game Development / Newbie & Debugging Questions / Re: Mouse input, finding tile below mouse. on: 2014-10-23 08:03:38
Not having looked at your source code since I'm currently in a lecture, have you tried minusing and dividing?
3  Game Development / Newbie & Debugging Questions / Re: LibGDX + Tiled, Slants and curves... on: 2014-10-23 08:00:41
If you're checking collisions on a tile basis, you could give the stairs tiles a property like "CollisionHeight" and make your character collide with the specified height rather than the top of the tile.

I've been able to implement slants, slopes and curves using Box2D, although at this point you may not want to use Box2D if you're not already using it.
4  Discussions / Community & Volunteer Projects / Need Someone To Test Admob on iOS for my game on: 2014-10-23 02:57:31
Hey JGO,

I've finished developing and releasing my first game on Android, however I'd also like to release it on iOS but I don't have a Mac computer for testing. Would anyone be able to help me see if my Admob ads run and display properly on iOS, if I upload my Libgdx project?

Here's the project: http://www44.zippyshare.com/v/83380028/file.html

I'd greatly appreciate any help Smiley

Thank you,
Rayexar
5  Game Development / Newbie & Debugging Questions / Libgdx Coordinates to Box2D using Viewport on: 2014-10-13 07:09:19
I have a Body that I want to move towards the touch position (screenX, screenY). My current method for doing this works, but only for when the screen resolution is the same as the viewport width and height.

1  
2  
3  
4  
5  
@Override
   public boolean touchUp(int screenX, int screenY, int pointer, int button) {
      Vector3 touch = camera.unproject(new Vector3(screenX, screenY, 0));
      Vector2 direction = new Vector2((touch.x - currentBody.getPosition().x), (touch.y - currentBody.getPosition().y));
//normalise, scale etc...


I think the part I'm stuck on is converting the camera coordinate to the Box2D coordinate. When I resize the window, the Body doesn't move directly at the mouse, it's a bit off. I'm using a FitViewport with a virtual resolution of 640x1136
6  Game Development / Newbie & Debugging Questions / Re: Box2D Circle works but not pentagon Polygon? on: 2014-10-12 11:01:17
Thank you very much, that fixed it Cheesy
7  Games Center / Showcase / Re: Bubblution on: 2014-10-12 09:34:24
Thanks for the suggestion, the video is being rendered and will be uploaded shortly.

If anyone has an android device and doesn't mind, could you please do me a favour? I ask this because I don't have an android device, and I can't sign in from the emulator. I've implemented leaderboards using Google Play Services, but I haven't actually been able to test it. Would someone be able to test it for me? I just need you to see whether you can submit a score, and view the leaderboard. Your score should be submitted automatically at the end of a game.
8  Game Development / Newbie & Debugging Questions / Re: Box2D Circle works but not pentagon Polygon? on: 2014-10-11 01:49:27
Well, there are no errors, the Fixture just isn't being created. Not sure how else I can describe the problem.

Edit: Instead of trying to fix this problem, it would also help if someone told me how to create a pentagon fixture given the centre and radius.
9  Discussions / Miscellaneous Topics / Re: Is drinking half a bottle of vodka safe? on: 2014-10-10 06:06:07
Cheers for all the replies everyone. I told my friend what you guys said, and he called all of you losers (jokingly of course).
10  Game Development / Newbie & Debugging Questions / Re: Box2D Circle works but not pentagon Polygon? on: 2014-10-10 03:49:00
Good point, I've corrected that but the pentagons still aren't coming up properly
11  Games Center / Showcase / Bubblution on: 2014-10-10 01:48:10
This is my first properly completed game, available on Google Play: https://play.google.com/store/apps/details?id=com.rayexar.monsterblaster.android



<a href="http://www.youtube.com/v/ZXXmVykCYvM?version=3&amp;hl=en_US&amp;start=" target="_blank">http://www.youtube.com/v/ZXXmVykCYvM?version=3&amp;hl=en_US&amp;start=</a>

Continuous side-scrolling shooter with weapon upgrades and powerups, and different types of enemies. Made using Libgdx.

I'd really appreciate any feedback, constructive criticism and suggestions. If anyone provides ideas that I use, you'll be credited.
12  Game Development / Newbie & Debugging Questions / Re: I'm desperate on: 2014-10-09 12:44:37
It probably would help if you're already familiar with Java before doing game dev, but I went into game development before I had a sound understanding of the basics. I picked up bits and pieces of Java as I learned game development, looking things up as I went. I still remember creating my own swing applications and Java2D games without knowing what "extends" and @Override public void run() meant, and I struggled to understand even after looking up tutorials.
13  Discussions / Miscellaneous Topics / Re: Is drinking half a bottle of vodka safe? on: 2014-10-09 12:38:20
Thanks guys, I'll just stick to a few shots, 1/4 bottle max. You guys may have saved my life because I probably would have done it if I didn't post here Cheesy

That is not called a "friend", it is called an "enemy". Or an "asshole".

He's a good friend, this is just a fun challenge Tongue
14  Discussions / Miscellaneous Topics / Is drinking half a bottle of vodka safe? on: 2014-10-09 11:21:18
Well basically my friend is forcing me to drink half a bottle of vodka. I don't want to black out or get extremely drunk or hungover. I don't drink very often.

Any experienced vodka drinkers here? I just want to know whether half a bottle is too much, and if so what's the maximum safe amount?
15  Game Development / Newbie & Debugging Questions / Box2D Circle works but not pentagon Polygon? on: 2014-10-09 10:57:07
I honestly have no idea why, but this code I'm using to create a Polygon Shape doesn't seem to work. I'm trying to create a regular pentagon given the centre and radius. Circle and Box shapes work.

Here's the code:

Circle, which works:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
Body createCircle(float centreX, float centreY, float radius, BodyType bodyType) {
      BodyDef bodyDef = new BodyDef();
      bodyDef.type = bodyType;
      bodyDef.position.set(centreX, centreY);

      Body body = world.createBody(bodyDef);

      CircleShape circle = new CircleShape();
      circle.setRadius(radius);

      FixtureDef fixtureDef = new FixtureDef();
      fixtureDef.shape = circle;
      fixtureDef.density = 0.5f;
      fixtureDef.friction = 0.4f;
      fixtureDef.restitution = 1f;

      body.createFixture(fixtureDef);

      circle.dispose();
     
      return body;
   }
   


Pentagon, doesn't work:
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  
   Body createPentagon(float centreX, float centreY, float radius, BodyType bodyType) {
      BodyDef bodyDef = new BodyDef();
      bodyDef.type = bodyType;
      bodyDef.position.set(centreX, centreY);
     
      Body body = world.createBody(bodyDef);
     
      PolygonShape shape = new PolygonShape();
      Vector2[] vertices = new Vector2[5];
     
      for(int i=0; i<=4; i++) {
         vertices[i] = new Vector2(centreX + (float) (radius*Math.cos(i*72)), (float) (centreY + radius*Math.sin(i*72)));
      }
     
      shape.set(vertices);
     
      FixtureDef fixtureDef = new FixtureDef();
      fixtureDef.shape = shape;
      fixtureDef.density = 0.5f;
      fixtureDef.friction = 0.4f;
      fixtureDef.restitution = 1f;

      body.createFixture(fixtureDef);
     
      shape.dispose();
     
      return body;
   }


Any ideas? Is it the maths I'm using wrong?
16  Game Development / Newbie & Debugging Questions / Re: I'm desperate on: 2014-10-09 02:27:28
I don't think you can easily pick up the skills in just a few tutorials. If you have the mindset that you can quickly learn how to make games, then move on to make a big, awesome game, you'll end up getting desperate. I didn't completely understand everything when I first started by following tutorials, but I tried many different tutorials which explained things differently, and that helped.

I used these tutorials for Java2D game development: https://www.youtube.com/user/Ulixava/playlists

Then moved onto Slick 2D: https://www.youtube.com/watch?v=AXNDBQfCd08

And finally Libgdx: https://www.youtube.com/playlist?list=PLXY8okVWvwZ0JOwHiH1TntAdq-UDPnC2L and https://www.youtube.com/playlist?list=PLXY8okVWvwZ0qmqSBhOtqYRjzWtUCWylb

I understand your frustration when you can't keep up with the tutorial, but just stick to it and you'll get it eventually. It does take time. What I think helped me the most was, after learning from tutorials, making my own game (different from the one in the tutorial) from scratch, applying what I learned without copying the code.

It also helped that I had a friend who's good at programming, and useful forums like this one Tongue, to ask when something didn't make sense.
17  Game Development / Newbie & Debugging Questions / Re: Generate Platforms (Rectangles) Randomly on: 2014-10-08 10:30:48
That was very useful, thank you very much!
18  Discussions / General Discussions / Re: What is wrong with reinventing the wheel? on: 2014-10-08 06:57:34
I just find it boring using other people's stuff when you can make your own version... It also makes me happier knowing that when I finish a game, I have made the game engine and the launcher creator...

I know what you mean, it is enjoyable and satisfying knowing that you made more of it yourself.
But why don't you create your own computer from parts you make from scratch, rather than just use "other people's stuff"? Then create your own programming language and operating system?
19  Game Development / Game Mechanics / [Libgdx] Move Box2D Body on Swipe on: 2014-10-07 01:31:27
I have a Box2d Body with a fixture attached, and I would like to move the Body by swiping on the screen. The Body should move according to the direction and "speed" of the swipe, with a faster/longer swipe applying a larger force on the Body.

How would you implement this in Libgdx? I'm stuck on the Input aspect (what to do with the InputProcessor).

Update: Well I've just tried MouseJoints and they're not what I'm looking for. I've decided to try applying an impulse to the body on touchDragged, but now I need a way to limit the velocity of a Body so that it never goes above a maximum.

If I check whether the velocity exceeds the maximum before applying an impulse, after the applied impulse, the velocity can still go above the max.
20  Game Development / Newbie & Debugging Questions / Generate Platforms (Rectangles) Randomly on: 2014-10-05 07:23:24
Hey everyone,

I'm trying to figure out how to generate platforms so that they would be set out in a way like this:



Imagine a platformer where the player should be able to "run" and "jump" onto all of the platforms.

I've tried generating a random boolean every frame with a  certain chance that it would be true, and if true, create a rectangle of random length (in a range of course), as the x-position increases across the map. This didn't work because at times there were platforms really close together, and sometimes it would be impossible to get from one side of the map to another (platforms too far apart).

The

Could someone suggest an algorithm I could use? I need to know "when" and "where" to create a platform, and how to generate the positions and sizes.

Other info which may be relevant, I'm using Box2D, the player is a 2x2m box.

Thanks
21  Game Development / Newbie & Debugging Questions / Re: LibGDX - Scrolling Texture Y-Axis on: 2014-10-02 09:09:10
I did this recently:

Render one image at y-position 0, and another at y-position Gdx.graphics.getHeight(). Every frame, for each texture, subtract an amount, scrollRate*Gdx.graphics.getDeltaTime() from the y-pos of each texture. Every frame, check whether the y-position of the bottom texture is equal to or less than -(negative) screenHeight , and if so, set it equal to screenHeight.
22  Game Development / Newbie & Debugging Questions / Boolean Methods in Libgdx InputProcessor and GestureListener on: 2014-09-30 03:58:33
I haven't really thought about this before because I've had no problems with the Libgdx InputProcessor or GestureListener, but what is the purpose of returning a boolean in, for example, the touchDown and fling methods?

1  
2  
3  
4  
5  
6  
public class InputHandler implements InputProcessor, GestureListener {

   @Override
   public boolean touchDown(float x, float y, int pointer, int button) {
      return false;
   }


In this case, touchDown returns false. Changing it to return true doesn't seem to have any effect. Could someone please explain this?
23  Game Development / Newbie & Debugging Questions / Re: LibGDX - Coordinate Issue with Gdx.input.istouched on: 2014-09-29 05:53:26
Is the rectangle being created and rendered at a different position on the screen as the image? Try rendering the rectangle on the screen to see it's position.

Did you set the projection matrix of the spritebatch and shaperenderer correctly? You should post your code so we can see, but I have a feeling you don't have the touch coordinates and screen coordinates set properly for the different screen resolution your android device might have.
24  Game Development / Newbie & Debugging Questions / Re: LibGDX Eclipse Setup Issues on: 2014-09-25 11:53:44
With the android errors, I got it working by exporting as an APK, then running that on an emulator or device.
25  Game Development / Newbie & Debugging Questions / Re: How do I create a good play button in libGDX? on: 2014-09-25 11:40:18
Do you want the button to come up after one second? If so, do this.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
boolean taskUpScheduled = false;
if(btnPressed == true){
            y = y + 4;
            btnPressed = false;
         }else if(btnPressed == false && !taskUpScheduled) {
taskUpScheduled = true;
           Timer.schedule(new Task() {
           
            @Override
            public void run() {
                y = 800 / 2 - 188 / 2;
taskUpScheduled = false;
            }
         }, 1);
         }


If you mean you want to set the screen after a second, you can do Timer.schedule(Timer.task, time delay), and set the screen in the Timer.task. Sorry I can't type the code properly right now because I'm on an iPad. But basically, just use Timer.schedule when you want to run some code after a time delay.
26  Discussions / Miscellaneous Topics / Re: I'm scared of Unity on: 2014-09-24 08:02:47
Some people work hard creating programs from pure assembly or machine code, while you get to use a programming language which is easier to use and has more tools.

Then why just stick with pure java, or any other programming language for that matter? You still get more control, flexibility and potential. If you make games because you want a final product that you can show off or sell, do whatever is easiest for that goal. I still think there are many advantages using Java compared to unity depending on what you want to do.

Personally I rather use Java + Libgdx over Unity/Game maker because I find it more enjoyable and still able to produce the same results. Besides, Unity has a pretty steep learning curve; people who use it also would have worked hard to learn it. And by the way, with PHP, I think it's starting to become out of date, being replaced with other web frameworks like Ruby on Rails.

BTW I also have a feeling you like programming because it makes you feel like you have more skill, and other people find it more impressive (nothing wrong with that of course Smiley).
27  Discussions / General Discussions / Re: Are Java applets really "dead" for indie developers? on: 2014-09-22 06:05:34
Funorb (http://www.funorb.com/) is pretty successful and it's games are applets.
28  Discussions / Miscellaneous Topics / Marmalade and Cocos2d-x on: 2014-09-19 09:12:11
I've just come across this: https://www.madewithmarmalade.com/ and it looks amazing.
https://www.youtube.com/watch?v=NWOKVCbB8JE

Looks like it's got all the features Libgdx has, but with more successful commercial games out there made with Marmalade.

My friend told me about this today: http://www.cocos2d-x.org/ which also looks good.

What do you guys think? Better than Libgdx? Other alternatives to these frameworks out there?

Personally I'm fine with Libgdx, but it seems like there's a lack of tutorials on integrating platform specific services such as Admob and Game Center (iOS). I got everything working eventually, but after all that, I really don't want to experience all that headache again, so I'm looking for an alternative.
29  Game Development / Newbie & Debugging Questions / Re: Game Doesn't Start on Android Emulator on: 2014-09-19 04:33:12
It worked in the end. Still comes up with the error message, but the game runs fine afterwards. It also runs on proper android devices Smiley

I had to turn GPU on and snapshot off in the emulator settings.
30  Game Development / Newbie & Debugging Questions / Re: iOS and Android Leaderboards and Ad Integration on: 2014-09-17 11:33:54
I'm following this tutorial: http://www.agur.pl/blog/implementing-admob-for-libgdx/

and I'm stuck at the bit where AdRequests are created. In the tutorial, they do this:

1  
2  
AdRequest adRequest = new AdRequest();
        AdRequest fadReq = new AdRequest();


however I can't create an AdRequest, as eclipse says it requires a Builder parsed into the constructor. Any ideas on how this is done?

UPDATE: This solved the problem: http://stackoverflow.com/questions/25123447/admob-new-adrequest-unrecognized-by-eclipse
Pages: [1] 2 3 4
 

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

The first screenshot will be displayed as a thumbnail.

theagentd (20 views)
2014-10-25 15:46:29

Longarmx (53 views)
2014-10-17 03:59:02

Norakomi (47 views)
2014-10-16 15:22:06

Norakomi (35 views)
2014-10-16 15:20:20

lcass (39 views)
2014-10-15 16:18:58

TehJavaDev (69 views)
2014-10-14 00:39:48

TehJavaDev (69 views)
2014-10-14 00:35:47

TehJavaDev (61 views)
2014-10-14 00:32:37

BurntPizza (74 views)
2014-10-11 23:24:42

BurntPizza (47 views)
2014-10-11 23:10:45
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

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
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!