Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (489)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (554)
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 ... 6
1  Games Center / 4K Game Competition - 2014 / Re: Java4k Launcher (v1.1) on: 2014-06-14 03:02:47

Woah, I'm surprised you got on! I was having the problem with http://Java4k.com
It's working now, did you change anything? It might have been the fact that my internet shut of earlier.
2  Game Development / Newbie & Debugging Questions / Re: Rendering with VBOs on: 2014-06-14 01:49:44
Just use Immediate mode. Much better no matter how old  Tongue
3  Discussions / Miscellaneous Topics / Re: Quad core + 2gb of ram on: 2014-06-05 02:58:39
Really, if you're constrained on money that much, I'd go with a laptop rather than a desktop. (EDIT: unless you already have peripherals and are only buying the tower)
I'd also wait until I have more money, because there's a certain threshold not worth going below, but maybe your needs are less than mine. I got a $300 laptop in 2009 (for christmas), it was fine for me then, but even 2 some years ago I wouldn't have touched it with a ten foot pole. Now looking to get a $900+ one because much less and I'll regret not getting certain features later. Again, it depends on what you're okay with having.

Couldn't I just update the desktop for newer parts. This store called tigerdirect sells barebone kits with basic PC elements. I can just upgrade that.
4  Discussions / Miscellaneous Topics / Re: Quad core + 2gb of ram on: 2014-06-05 02:47:53
I just got $100 for a graduation gift. My grandma and other relatives are willing to send some over(Mostly my grandmah) She might send about $150 - $250 leaving me with around $300. Now that I have better Idea of my money, what desktop should I start off with for now? I was thinking about 4gb RAM and 3.0 GHz CPU to start with.(Desktop)
5  Discussions / Miscellaneous Topics / Re: Quad core + 2gb of ram on: 2014-06-01 14:54:34
Is there something that runs a bit faster than my dual core 4gb ram laptop that's under $400? I can't spend too much right now, but I could still update the components of it later. I've been looking at this(yes, I know it's a laptop, but there are many youtube videos on its' fast performance)
http://www.amazon.com/Transformer-T100TA-C1-GR-Detachable-Touchscreen-Laptop/dp/B00FFJ0HUE/ref=br_lf_m_8620056011_1_1_img?ie=UTF8&s=pc&pf_rd_p=1780456582&pf_rd_s=center-5&pf_rd_t=101&pf_rd_i=8620056011&pf_rd_m=ATVPDKIKX0DER&pf_rd_r=0FDJCQYXYXK5TY3GY0KW

This is a quad core with windows 8 which I admire, but then it has only 2gb of ram.
6  Discussions / Miscellaneous Topics / Re: Quad core + 2gb of ram on: 2014-05-31 16:55:33
Thanks, but  could you keep in mind I'm spending under about $400  Tongue
7  Discussions / Miscellaneous Topics / Quad core + 2gb of ram on: 2014-05-30 05:11:52
Would a quad core laptop with 2gb of ram work well for extreme multitasking and some gaming. I read quad core let's you do more things. I thought ram does that. What is rams purpose then? Also what features make up a good programming / gaming pc.
8  Game Development / Newbie & Debugging Questions / Re: Game won't run, going crazy. on: 2014-05-11 17:11:43
Dude I had the same problem and solved in about 2 minutes ago  Shocked. First off, are you using any libraries? (LWJGL, Slick2D, LibGDX, etc..)
9  Games Center / Showcase / Re: DemonShooter ! First game release on: 2014-05-11 15:10:11
none of the images loaded. All I saw was a window with the words demon shooter inside of it.(Just like the window title)

This happens when you don't extract it from the Zip archive.

I extracted it to a folder on my desktop. It did the same thing, is this incorrect?

10  Game Development / Newbie & Debugging Questions / Re: [LWJGL] How to properly load images and use them in a JAR on: 2014-05-11 14:42:02
Even when zipped I get the same results. Do I have o use textures in lwjgl? It's all complicated
11  Game Development / Newbie & Debugging Questions / Re: [LWJGL] How to properly load images and use them in a JAR on: 2014-05-11 03:51:55
I tried keeping the jar in a folder with a batch file that launches it. It still pops up and disappears giving the input stream errors Cry
12  Game Development / Newbie & Debugging Questions / Re: [LWJGL] How to properly load images and use them in a JAR on: 2014-05-11 01:06:03

2) Outside Eclipse, make sure the jar containing your resources is in the same place as the jars containing your classes (if they aren't all in the same jar).

Given the folder (package) 'res' and the file 'res/foo.png', then getResourceAsStream("res/foo.png") should work in both cases.


Is the jar containing the resources the first jar I make that doesn't run. I don't understand step 2 so well.
I'm going to look at some source code for an example but does anyone have a good visual tutorial on this?  Huh Huh Huh Huh Huh Huh Huh Huh Huh
13  Game Development / Newbie & Debugging Questions / Re: [LWJGL] How to properly load images and use them in a JAR on: 2014-05-11 01:00:04
Yes you would need to put it in a zip. Though I'm sure anyone with a computer could unzip a folder and hit a file. Tongue Though I understand when your packing these games off and shipping them you have to act like your consumer is a complete computer noob.

Lol you got the idea. Like my little sisters, I don't think they understand how to even make a file
14  Game Development / Newbie & Debugging Questions / Re: [LWJGL] How to properly load images and use them in a JAR on: 2014-05-11 00:14:36
You don't always need to use the class like this:

1  
MainClass.class.getResourceAsStream("res/resource.png");


You could just do this:

1  
"res/resource.png"


And then put a res folder in the same folder with the jar. This is a really cool thing to do when you want your players to be able to edit your textures like texture packs in Minecraft. I believe thats how Notch did that anyways.


Wouldn't I need to put it in a zip? I want them to just download the game and run it without any other files.


Given the topic title, I'm assuming that OP wants the resources in the jar.
Also, doing so doesn't stop anyone who wants to from modifying resources.

What is OP?
15  Game Development / Newbie & Debugging Questions / Re: [LWJGL] How to properly load images and use them in a JAR on: 2014-05-10 23:39:57
Here is the video of what I did: http://www.mediafire.com/watch/vjsnf1b1xoy6kdz/texturesssss.mp4
16  Game Development / Newbie & Debugging Questions / Re: [LWJGL] How to properly load images and use them in a JAR on: 2014-05-10 23:35:01
My res/ is a resource folder that'd not under the src/.
Ignore the error in Begginer. Is this right? I have a video loading of what I did. Ill post it in a second
17  Game Development / Newbie & Debugging Questions / Re: [LWJGL] How to properly load images and use them in a JAR on: 2014-05-10 22:50:25
Er, remove the "new File" part. That was my mistake!

1  
TextureLoader.getTexture("PNG", ThisClass.class.getResourceAsStream("res/Baddy.png"));





1  
         wood = TextureLoader.getTexture("PNG", MainFS.class.getResourceAsStream("res/Baddy.png"));
gives the exception :
1  
2  
3  
4  
Exception in thread "main" java.lang.NullPointerException
   at org.newdawn.slick.opengl.TextureLoader.getTexture(TextureLoader.java:64)
   at org.newdawn.slick.opengl.TextureLoader.getTexture(TextureLoader.java:24)
   at FSMain.MainFS.main(MainFS.java:75)
18  Game Development / Newbie & Debugging Questions / Re: [LWJGL] How to properly load images and use them in a JAR on: 2014-05-10 22:28:17
Well then reference the class itself.

1  
TextureLoader.getTexture("PNG", ThisClass.class.getResourceAsStream(new File("res/Baddy.png"));


I tried
1  
ef = new File("res/Baddy.png");

1  
2  
3  
4  
5  
wood = TextureLoader.getTexture("PNG", MainFS.class.getResourceAsStream(ef.getPath()));code] and got the exception :
[code]Exception in thread "main" java.lang.NullPointerException
   at org.newdawn.slick.opengl.TextureLoader.getTexture(TextureLoader.java:64)
   at org.newdawn.slick.opengl.TextureLoader.getTexture(TextureLoader.java:24)
   at FSMain.MainFS.main(MainFS.java:75)



I also tried
1  
TextureLoader.getTexture("PNG", ThisClass.class.getResourceAsStream(new File("res/Baddy.png")));


and got the exception:
1  
The method getResourceAsStream(String) in the type Class<MainFS> is not applicable for the arguments (File)
  Emo[/code]
19  Game Development / Newbie & Debugging Questions / Re: [LWJGL] How to properly load images and use them in a JAR on: 2014-05-10 22:16:51
Remember, if it's in a Jar it's not typically accessible through the strema. You have to do somethin' extra to get it. Try (And replace THISCLASS with the class making use of that command):

1  
TextureLoader.getTexture("PNG", THISCLASS.getClass().getResourceAsStream(new File("res/Baddy.png"));



That's also another problem, I get this error in that syntax:
1  
Cannot make a static reference to the non-static method getClass() from the type Object
.
Maybe because I run everything in my main method. The main class doesn't have a constructor.
20  Game Development / Newbie & Debugging Questions / Re: [LWJGL] How to properly load images and use them in a JAR on: 2014-05-10 21:59:26
What does cmd exactly say?
It tells me:
1  
2  
3  
4  
5  
java.io.FileNotFoundException: res\FlubberFlap.png (The system cannot find the p
ath specified)
        at java.io.FileInputStream.open(Native Method)
        at java.io.FileInputStream.<init>(FileInputStream.java:131)
        at FSMain.MainFS.main(MainFS.java:68)


In line 68 I use:
1  
2  
wood = TextureLoader.getTexture("PNG", new FileInputStream(
               new File("res/Baddy.png")));


Someone said not to use a new file, but im not sure exactly what to do. If you can look at my source, my main class is MainFS.
21  Game Development / Newbie & Debugging Questions / [LWJGL] How to properly load images and use them in a JAR(SOLVED) on: 2014-05-10 21:29:21
Figured it out Cheesy
22  Java Game APIs & Engines / Engines, Libraries and Tools / Re: [LWJGL] Game not running when used in JarSplice on: 2014-05-10 16:30:07
1  
2  
3  
4  
Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
   Cannot use this in a static context

   at FSMain.MainFS.main(MainFS.java:68)
23  Java Game APIs & Engines / Engines, Libraries and Tools / Re: [LWJGL] Game not running when used in JarSplice on: 2014-05-10 16:07:43
Never use Files when packing them inside the JAR file. You have to do this.

1  
InputStream stream = this.getClass().getClassLoader().getResourceAsStream("res/ImageThingy.png");

Then

1  
wood = TextureLoader.getTexture("png", stream);

The
res/
can be either source folder or a package, anything will work.

Great, I understand this. Could you give an example of how to use it, I keep getting a static error.
24  Java Game APIs & Engines / Engines, Libraries and Tools / Re: [LWJGL] Game not running when used in JarSplice on: 2014-05-10 05:27:44
If I'm unclear still, this is exactly what I'm doing.At the very end my results are a blank window for about a second. Please tell me what Im doing wrong, I really need to understand:
Video of what I did: http://www.mediafire.com/watch/oohf1qnh2oefkxp/exportsfail.mp4
25  Games Center / WIP games, tools & toy projects / Re: Airships Engine on: 2014-05-10 04:51:07
How do you record without a youtube video? gif?
26  Java Game APIs & Engines / Engines, Libraries and Tools / Re: [LWJGL] Game not running when used in JarSplice on: 2014-05-10 04:43:36
I remember that. Should I start off with
1  
File img = new File("/res/ImageThingy.png");
then
1  
wood = TextureLoader.getTexture("png", new FileInputStream(img));
The
1  
res/
is a source folder.
27  Games Center / Showcase / Re: Super Spineboy on: 2014-05-10 03:27:07
Great animation and artwork, I still couldn't get too far ha. I found a bug in the left bound when you first spawn. I kept jumping and got stuck in the wall for a bit.
28  Games Center / Showcase / Re: DemonShooter ! First game release on: 2014-05-10 03:19:17
none of the images loaded. All I saw was a window with the words demon shooter inside of it.(Just like the window title)
29  Java Game APIs & Engines / Engines, Libraries and Tools / Re: [LWJGL] Game not running when used in JarSplice on: 2014-05-10 03:15:34
Can I have your screenshot of the package tree? Expand it completely and send us a screenshot.


This is the whole Project. FSMain is the package I'm working with. MainFS is the main class.:




This is how I loaded textures

based on https://www.youtube.com/watch?v=naE3nbreSUo  Pointing

I'll message you the full cource code for the main class  if you want. It's not too long, It's just the drawing methods that  take up space.
30  Java Game APIs & Engines / Engines, Libraries and Tools / Re: [LWJGL] Game not running when used in JarSplice on: 2014-05-09 23:56:30
This is how I did it with Java2D. Right now the
1  
img  = this.getClass().getResource("foo.txt");
gives an error. I'll try to rephrase the question, How do I load textures from the Slick_util.jar into a fat jar. I watched videos on how and I can easily get the libraries and jars, it's just I don't have the textures when I run it. I put the res/ folder in the src/ folder now. The textures don't load still ofcourse.

Either use
1  
img  = this.getClass().getClassLoader().getResourceAsStream("res/foo.txt");
or
1  
img  = this.getClass().getResourceAsStream("/res/foo.txt");


Notice the "/" if you don't use getClassLoader(). Also, the AsStream part is necessary.

I forgot the code to create Images and load them. I deleted the code I used to remember, but can't I just do this with the textures?
1  
wooda = TextureLoader.getTexture("PNG", new FileInputStream(new File("res/Baddy.png")));

This works except for when I eport the jar in Jarsplice. That is what I learned but someone suggested this which ddn't work:
1  
wood = TextureLoader.getTexture("PNG", MainFS.class.getClassLoader().getResourceAsStream("res/FlubberFlap.png"));


error:
1  
2  
3  
4  
Exception in thread "main" java.lang.NullPointerException
   at org.newdawn.slick.opengl.TextureLoader.getTexture(TextureLoader.java:64)
   at org.newdawn.slick.opengl.TextureLoader.getTexture(TextureLoader.java:24)
   at FSMain.MainFS.main(MainFS.java:67)


Instead of slick_util, should I just use the normal image rendering somehow Huh I have no idea what other way to draw and load them .
Pages: [1] 2 3 ... 6
 

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

The first screenshot will be displayed as a thumbnail.

TehJavaDev (18 views)
2014-08-28 18:26:30

CopyableCougar4 (26 views)
2014-08-22 19:31:30

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

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

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

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

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

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

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

BurntPizza (39 views)
2014-08-08 02:01:56
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

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

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

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

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

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

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

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