Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (109)
games submitted by our members
Games in WIP (537)
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]
1  Game Development / Newbie & Debugging Questions / LibGDX yDown and text problem on: 2014-01-14 23:16:07
When drawing when BitmapFont and the y is facing down on the orthographic camera, like this:
1  
2  
3  
4  
5  
6  
//y is facing down
camera.setToOrtho(true, 800, 480);
//...
batch.begin();
font.draw(batch, "Example Text", 10, 30);
batch.end();
the text flips upside down.
Making the y face upwards fixes this problem:
1  
camera.setToOrtho(false, 800, 480);
but if there comes a time when I want to have y facing down, I want to find a solution to this problem.
2  Game Development / Newbie & Debugging Questions / Re: LibGDX can't load Textures I get? on: 2013-10-24 22:29:29
Did you add images to the build path?
libgdx.png is put in place when the setup-ui makes your projects. As for the other images, try refreshing eclipse (specifically the android project).

Possibly the PNG files are formatted in a way that LibGDX cannot handle. At least, I remember having this problem once with a set of public domain PNG's I used. Opening them in paint.net and saving them as PNG again solved the problem for me.
Thanks, but none of these solutions work. The android project didn't compile, and Java generated some errors, so maybe that has something to do with it? I don't care for the HTML project.
1  
2  
3  
4  
5  
Description   Resource   Path   Location   Type
The project was not built since its build path is incomplete. Cannot find the class file for java.lang.Object. Fix the build path then try building this project   drop-android      Unknown   Java Problem
The project was not built since its build path is incomplete. Cannot find the class file for com.google.gwt.core.client.EntryPoint. Fix the build path then try building this project   drop-html      Unknown   Java Problem
The type java.lang.Object cannot be resolved. It is indirectly referenced from required .class files   MainActivity.java   /drop-android/src/com/badlogic/drop   line 1   Java Problem
The type com.google.gwt.core.client.EntryPoint cannot be resolved. It is indirectly referenced from required .class files   GwtLauncher.java   /drop-html/src/com/badlogic/drop/client   line 8   Java Problem

EDIT: Nvm. I didn't refresh the assets folder, because since I closed Eclipse the day before and then restarted it today, I thought it would refresh automatically.
3  Game Development / Newbie & Debugging Questions / Re: LibGDX can't load Textures I get? on: 2013-10-24 02:26:59
Is images your root folder for your textures? Gdx.files.internal (I believe) automatically detects your root folders, so all you need to do is specify the path in that folder. Try loading droplet.png without the images/.
I did, that's the first thing I did. I dropped droplet.png into a new folder (images) because since libgdx.png was in a folder, I kind of thought that would solve the problem.
4  Game Development / Newbie & Debugging Questions / [SOLVED] LibGDX can't load Textures I get? on: 2013-10-24 02:13:31
I'm new to LibGDX. I used the setup-ui and got the projects, loaded it in eclipse, and ran the application. The data/libgdx.png got loaded. But, when I was following this tutorial:
https://github.com/libgdx/libgdx/wiki/A-simple-game
I came up to the point before creating user input, and I decided to test if LibGDX would load up the images or not.
Instead, Java generated this error:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
Exception in thread "LWJGL Application" com.badlogic.gdx.utils.GdxRuntimeException: com.badlogic.gdx.utils.GdxRuntimeException: Couldn't load file: images/droplet.png
   at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:113)
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: Couldn'
t load file: images/droplet.png
   at com.badlogic.gdx.graphics.Pixmap.<init>(Pixmap.java:140)
   at com.badlogic.gdx.graphics.glutils.FileTextureData.prepare(FileTextureData.java:64)
   at com.badlogic.gdx.graphics.Texture.load(Texture.java:175)
   at com.badlogic.gdx.graphics.Texture.create(Texture.java:159)
   at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:133)
   at com.badlogic.gdx.graphics.Texture.<init>(Texture.java:122)
   at com.badlogic.drop.Drop.create(Drop.java:23)
   at com.badlogic.gdx.backends.lwjgl.LwjglApplication.mainLoop(LwjglApplication.java:127)
   at com.badlogic.gdx.backends.lwjgl.LwjglApplication$1.run(LwjglApplication.java:110)
Caused by: com.badlogic.gdx.utils.GdxRuntimeException: File not found: images\droplet.png (Internal)
   at com.badlogic.gdx.files.FileHandle.read(FileHandle.java:127)
   at com.badlogic.gdx.files.FileHandle.length(FileHandle.java:580)
   at com.badlogic.gdx.files.FileHandle.readBytes(FileHandle.java:215)
   at com.badlogic.gdx.graphics.Pixmap.<init>(Pixmap.java:137)
   ... 8 more

I put the images in the assets folder in the android project and everything. Why does the libgdx.png get loaded but not the new images? I even did the exact code the tutorial was doing.
Can somebody help?
5  Games Center / WIP games, tools & toy projects / Re: Logica on: 2013-07-28 00:52:35
It's really cool!

Some suggestions:
If you try to take back a switch (lever), it will just toggle its state.

I also have a vague feeling this was inspired by a certain sandbox voxel game...
6  Games Center / WIP games, tools & toy projects / Re: HeroesGrave's 7dRTS Game on: 2013-07-26 02:45:30
Looks cool  Grin
RTS, right? When will we get to the fighting?  Smiley
7  Game Development / Newbie & Debugging Questions / [SOLVED]LibGDX - LWJGLApplication on: 2013-07-26 02:30:24
I've decided to try to learn LibGDX by the docs, and only read a tutorial if necessary.
Long story short, to try to test if LibGDX works, I'm making a simple window. I can't use Eclipse or NetBeans, so I use Crimson Editor.
The program can't run because it threw an exception, stating that it can't find gdx.dll?
What's wrong? If you need more information:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
import ... ApplicationAdapter;
import ... LWJGLApplication;

public class MainWindow extends ApplicationAdapter {
  public MainWindow() {
    new LWJGLApplication(this, 800, 600, false);
  }

  public static void main(String[] args) {
    new MainWindow();
  }
}


Command:javac -cp .;gdx.jar;gdx-backend-lwjgl.jar MainWindow.java
Command:java -cp .;gdx.jar;gdx-backend-lwjgl.jar MainWindow

Thank you!
8  Games Center / Showcase / Re: Arising on: 2013-03-07 00:13:13
The System of Tarsonis, eh?
Starcraft reference?
Yes Starcraft might have been some inspiration  Roll Eyes
Also, in the tutorial mission, it says:
"Here are some strong turrets WICH..."
But, I like the game. Really fast-paced, and the only nice RTS I could find in a browser  Wink
9  Games Center / Showcase / Re: Siege on: 2013-03-06 22:02:28
Added some new grass tiles.

Thank you. The lime green grass was getting headache inducing.
Other than that, looks good! Iw would love to help test.

In my opinion, I thought the lime green was better.

The game sounds cool. Are you going to release a download link anytime
soon?
10  Games Center / WIP games, tools & toy projects / Re: Isotröma (Tesseract 2) on: 2013-03-05 22:02:25
Well... in the Realitron level, instead of terrain in FRONT of you,
it's under you...  Roll Eyes

But, thanks for the feedback!  Grin
11  Games Center / Featured Games / Re: State of Fortune on: 2013-03-05 00:04:56
Cool.
My suggestion would take ALOT of work,
but maybe you could turn it into a realistic Minecraft?
Or maybe a First Person Hunger Games?
12  Games Center / WIP games, tools & toy projects / Re: Pixel Zombies on: 2013-03-04 22:56:19
I love how the zombies are just little faces! haha!
Well, maybe the zombies got mutated so much they lost their bodies.  Cheesy
13  Games Center / WIP games, tools & toy projects / Re: Isotröma (Tesseract 2) on: 2013-03-04 22:05:36
If you'd like to watch some Youtube,
I uploaded a gameplay video, which also shows another bug
in the Realitron tutorial level:
https://www.youtube.com/watch?v=lRtgArv9luo
14  Games Center / WIP games, tools & toy projects / Re: Isotröma (Tesseract 2) on: 2013-03-03 01:49:10
This game...
is amazing...
Can't wait until you finish it. Cheesy

EDIT: I found a bug.
Not that major, and it doesn't affect gameplay.
At tuto_02, I teleported, hit the flag, and then the
LEVEL DONE screen... looks like you're still in that
zooming in mode.

Did that make sense? It's not easy to explain.
15  Games Center / WIP games, tools & toy projects / Re: Izalys World - 2d side scroller (run and jump game) on: 2013-03-02 00:16:05
I love the style of art.
I didn't test it yet, but it looks good.
I'll give it a try.
16  Game Development / Newbie & Debugging Questions / Re: Block Collision on: 2013-03-01 22:11:27
Some flaws,

a) I see no temp2 assignment
b) the second IF is useless - remember what ELSE means
c) setting a boolean variable by IF-ELSE can be simplified like
1  
temp.setFalling(!temp.collisionCheck(temp2));

I didn't copy and paste the code, so instead I typed it quick:
a) it was to be:
1  
Block temp2 = (Block) blocks.get();

b) it was to be:
1  
if else(blah)

c) Thank you
1  
break;

break the loop when you find the block. Read up on java keywords.
I thought break only applied to while loops, and switch.
And also, since that code is in a while loop, I thought that it would break that loop with the for loop.
Anyways, thanks for the solution.
17  Game Development / Newbie & Debugging Questions / [Solved]Block Collision on: 2013-03-01 00:32:52
I already know the problem, but I don't know how to fix it.

So I have code, like this:
1  
2  
3  
4  
5  
6  
7  
8  
9  
for (int i = 0; i < units.size(); i++) {
 Unit temp = units.get(i);
  for (int i2 = 0; i2 < blocks.size(); i2++) {
   if (temp.collisionCheck(temp2))
    temp.setFalling(false);
   else (!temp.collisionCheck(temp2))
    temp.setFalling(true);
  }
}


And if the player collides with a block, it would stop falling, and vice versa.
But, since it checks with each block,
it would be true that it collided with one block, but since it didn't collide with the rest,
it would start falling again.

It's very hard for me to solve this problem,
could somebody help?  Smiley
If you need more source code, I'll provide a link.
And this is not the same problem as the "Rectangle.intersects" problem I had.  Wink
18  Game Development / Newbie & Debugging Questions / Re: BoundingBox( Rectangle ) class, help? on: 2013-02-27 22:26:38
Make little rectangles on each side.
Like this:
http://info.sonicretro.org/SPG:Solid_Tiles
19  Game Development / Newbie & Debugging Questions / Re: LWJGL vs LibGDX on: 2013-02-26 22:45:44
Thank you!
I guess I'll use LibGDX.
20  Game Development / Newbie & Debugging Questions / Re: Rectangle.intersects on: 2013-02-26 00:10:12
OK.
Here's the source code you've been asking for.
http://pastebin.com/dPtwZYf6
21  Game Development / Newbie & Debugging Questions / LWJGL vs LibGDX on: 2013-02-25 22:15:40
So, in the time I've been programming, I've heard of those two libraries.
I've been thinking of converting my game into using one of those two libraries,
and I wondered what are the pros and cons of each one.

I was looking on each of their websites, and their features are very alike.

So, could somebody list the pros and cons, or help me decide?
22  Discussions / General Discussions / Re: Java on PS4! on: 2013-02-25 22:09:48
 Shocked
That would be cool if Java games got onto the PS4
Now, what about XBox720?
23  Games Center / WIP games, tools & toy projects / Re: Aeva: A text-based RPG on: 2013-02-21 22:18:43
Seems cool.
Is it like a rogue?
24  Game Development / Newbie & Debugging Questions / [Solved] Rectangle.intersects on: 2013-02-15 00:07:19
How does it work?

Because I made a class called Unit with a parent of Rectangle.
I'm trying to have it so that when you drag the mouse, it would create a
Rectangle, and I would test it to see if it intersects with Unit.

I did that, but for some reason, Java wouldn't detect if the Unit intersects or not.
 Huh

Could somebody help?

EDIT: I solved it.
Pages: [1]
 

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

The first screenshot will be displayed as a thumbnail.

CogWheelz (17 views)
2014-08-01 22:53:16

CogWheelz (15 views)
2014-08-01 22:51:43

CopyableCougar4 (20 views)
2014-08-01 19:37:19

CogWheelz (19 views)
2014-07-30 21:08:39

Riven (27 views)
2014-07-29 18:09:19

Riven (16 views)
2014-07-29 18:08:52

Dwinin (14 views)
2014-07-29 10:59:34

E.R. Fleming (42 views)
2014-07-29 03:07:13

E.R. Fleming (13 views)
2014-07-29 03:06:25

pw (44 views)
2014-07-24 01:59:36
Resources for WIP games
by CogWheelz
2014-08-01 18:20:17

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

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

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

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

HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22
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!