Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (581)
games submitted by our members
Games in WIP (500)
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  Java Game APIs & Engines / Engines, Libraries and Tools / Re: libdgx 3d Texture Issues on: 2014-04-18 00:32:12
Image hosting changed to imgur. You should be able to see them now. Sorry about that.
2  Java Game APIs & Engines / Engines, Libraries and Tools / libdgx 3d Texture Issues on: 2014-04-18 00:21:48
I'm trying to get myself started on 3d with libgdx. However, my textures seem to be giving me some problems. I have the model all textured and done in blender as shown:

But when I load it into libgdx, I come up with this:


If anyone has some insight as to what I might be doing wrong, that would be great.
Also, if you want to read the code I'm using, I'm following Xoppa's tutorial as shown here:
http://blog.xoppa.com/loading-models-using-libgdx/
3  Game Development / Game Mechanics / Re: Passing a variable vs. Storing that variable on: 2014-02-14 04:38:49
Ok, thanks. I was only citing Notch's code because it was one example that I could think of.
4  Game Development / Game Mechanics / Passing a variable vs. Storing that variable on: 2014-02-14 03:03:44
Just as a general question I was wondering which method would be the best practice. Passing the variable containing the game world in the update function during every update of an entity, or, upon creation of the entity, store it as a variable in the entity class. I've used the second method before and it worked just fine. If I recall correctly minecraft uses the former of the two. What is your opinion on which is better?
5  Game Development / Newbie & Debugging Questions / the left hand side of the assignment must be a variable? on: 2013-09-16 04:17:42
I'm having a bit of trouble with one function in my problem and it's giving me the answer that I've put as the title. I'm pretty dang sure I haven't done anything wrong, but it's still throwing the error.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
public class Line {
   public Vec2D p1, p2;
   public Line(Vec2D p1, Vec2D p2){
      this.p1 = p1;
      this.p2 = p2;
   }
   public boolean intersects(Line l){
      if( ( ((p1.x - p2.x)(l.p1.y - l.p2.y)) - ((p1.y + p2.y)(l.p1.x - l.p2.x)) ) == 0) return false; // here's where the error is
     return true;
   }
}

Any ideas?

EDIT: wow I feel stupid. I've been in calc class too long and forgot to put the * symbols in.. DISREGARD THIS THREAD
6  Game Development / Newbie & Debugging Questions / Re: Need advice regarding java libriaries on: 2013-09-14 14:24:06
For my first games, I've been using Java's built in library, Java2d. It works perfectly fine for most of the stuff I do. It's just not terribly efficient though.
7  Games Center / WIP games, tools & toy projects / Re: Eclipse - Moon Base Simulator on: 2013-09-08 21:38:01
I'll think about reorganizing some of the UI, anything in this can be subject to change.

As for the Jar, when i export the project from the IDE (Eclipse), i just select Runnable Jar.
8  Games Center / WIP games, tools & toy projects / Re: Eclipse - Moon Base Simulator on: 2013-09-08 19:34:25
Thanks for the feedback. When you say that you have to open the menu to access the buttons, do you mean the construction menu? Or do you mean just the menus in general? I tend to think of the goal sort of like a Dwarf Fortress idea where the goal is to survive. I do plan on implementing a tutorial section that explains what everything does. I'll start working on that ASAP for anyone who tries it.
9  Games Center / WIP games, tools & toy projects / Re: Eclipse - Moon Base Simulator on: 2013-09-05 22:21:47
One of my favorite features as of yet is the economy system. You can watch the trade prices of materials and any traders will base their trade price on the market price.
10  Games Center / WIP games, tools & toy projects / Re: Eclipse - Moon Base Simulator on: 2013-09-05 01:08:07
Sorry about that. Here's a couple of pics in game, I really need to add a way to make it take screenshots and save them.
This is the construction menu, where you'll find all the available buildings that can be made, along with all specifications as to them.

This is the Crew management system. You can view information about crew and view applicants that wish to join your crew.
11  Games Center / WIP games, tools & toy projects / Eclipse - Moon Base Simulator on: 2013-09-04 23:20:48
My latest project is a little something called Eclipse. And yes, the IDE gave me the idea for the name. Anyway, in this game, you manage and build your own moon base. From managing crew, to mining the moon's surface for ore to trade or smelt, there are lots of features planned for this. It's been in development since late July and I thought that it was about time to show off my progress.
Any comments or criticisms are greatly appreciated.

Download it here! FYI it's about a 21mb file.
https://www.dropbox.com/s/bszt2sau5mz6czp/build10.jar
12  Discussions / General Discussions / Re: What You Do When You are Burnt Out on: 2013-08-17 04:32:51
Reddit, TF2, or maybe even do something I'm actually supposed to be doing...
13  Game Development / Newbie & Debugging Questions / Re: Having an issue loading text files on: 2013-08-15 21:00:12
OK, I've got it now. I've got it just how you set it up, jonjava. Also, I had no idea that the string for the name was case sensitive. You people have been a huge help. Thanks so much.
14  Game Development / Newbie & Debugging Questions / Re: Having an issue loading text files on: 2013-08-15 20:37:08
Now, quick question, with the res folder in the build path, shouldn't it automatically take everything from the res folder and drop it into the bin folder?

Yes. There's no need to put everything inside the src folder. There's a problem somewhere else. Lemme hack an example program for some "working" code.
Okay, i tried deleting all the images and .src files from the bin folder and when i went to run it, it didn't automatically put them back.
15  Game Development / Newbie & Debugging Questions / Re: Having an issue loading text files on: 2013-08-15 20:32:25
Now, quick question, with the res folder in the build path, shouldn't it automatically take everything from the res folder and drop it into the bin folder?
16  Game Development / Newbie & Debugging Questions / Re: Having an issue loading text files on: 2013-08-15 19:11:13
I did as you said, and both worked perfectly in the workspace, but STILL not when i export. I double checked that the files made it into the jar as well.
17  Game Development / Newbie & Debugging Questions / Re: Having an issue loading text files on: 2013-08-15 18:59:59
Ok, so I changed it to:
1  
return Assets.class.getResourceAsStream("/" + name);

and that works fine and dandy in eclipse, but still throws a null pointer when run from a jar.
18  Game Development / Newbie & Debugging Questions / Re: Having an issue loading text files on: 2013-08-15 18:04:06
@SHC
 I'm not having any trouble loading images. They load perfectly fine. However, the trouble is with InputStreams.

@jonjava
 So, I moved the 'res' folder from 'src' and put it alongside the 'src' folder. Then I added it to the build path. Images still load fine, but the .src files will not load. The problem has got to be somewhere in this line.
1  
      return Assets.class.getClassLoader().getResourceAsStream("/" + name);

As it is always returning null.
19  Game Development / Newbie & Debugging Questions / Re: Having an issue loading text files on: 2013-08-15 17:39:23
Yeah, this should help to clear things up.

and all the images and .src files are in 'res'
20  Game Development / Newbie & Debugging Questions / Re: Having an issue loading text files on: 2013-08-15 17:25:31
I did like SHC said and created a new package called 'res' and used explorer to move the files into there. They get exported automatically and the folder and all of the files are present in the exported JAR. When I go to the bin folder, there is a folder called res.
21  Game Development / Newbie & Debugging Questions / Re: Having an issue loading text files on: 2013-08-15 16:04:59
Yet again, it works perfectly fine in Eclipse, however, it throws the null pointer when run from a jar. Here's the stack trace. I don't know what good it will do.

and here's the methods.
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  
  private static void loadFirstNamesMale(){
      try{
         InputStream url = getInputStream("firstNamesMale.src");
         BufferedReader reader = new BufferedReader(new InputStreamReader(url));
         String line = "";
         while((line = reader.readLine()) != null){
            firstNameMale.add(line);
         }
         System.out.println("Loaded: firstNamesMale.src");
      }catch(Exception e){
         e.printStackTrace();
      }
   }
   private static void loadLastNames(){
      try{
         InputStream url = getInputStream("lastNames.src");
         BufferedReader reader = new BufferedReader(new InputStreamReader(url));
         String line = "";
         while((line = reader.readLine()) != null){
            lastName.add(line);
         }
         System.out.println("Loaded: lastNames.src");
      }catch(Exception e){
         e.printStackTrace();
      }
   }
   private static InputStream getInputStream(String name){
      return Assets.class.getClassLoader().getResourceAsStream("res/" + name);
   }
22  Game Development / Newbie & Debugging Questions / Re: Having an issue loading text files on: 2013-08-15 05:57:24
I did as you said in your first post and moved everything over into a package and setup the input stream getter, however, I'm still getting a null pointer when I create the BufferedReader.
23  Game Development / Newbie & Debugging Questions / Having an issue loading text files on: 2013-08-15 04:48:43
I'm currently having an issue where my files will load fine with eclipse, however, they won't load when the jar is exported and run. Here is the code that is giving me trouble.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
   private static void loadFirstNamesMale(){
      try{
         URL url = (Assets.class.getResource("/firstNamesMale.src")); // This is apparently returning as null.
        BufferedReader reader = new BufferedReader(new FileReader(new File(url.getFile())));
         String line = "";
         while((line = reader.readLine()) != null){
            firstNameMale.add(line);
         }
         System.out.println("Loaded: firstNamesMale.src");
      }catch(Exception e){
         e.printStackTrace();
      }
   }

I can't seem to find the problem. Any help is appreciated.
24  Discussions / General Discussions / Re: Looking for tips on drawing textures on: 2013-08-05 05:28:55
It doesn't even have to be tileable. I just want a texture that looks reminiscent of the moon and follows the same ARt style
25  Discussions / General Discussions / Looking for tips on drawing textures on: 2013-08-05 05:15:48
I wasn't 100% sure where to post this, so I figured this would be the place. I'm trying to make a Moon Base Simulator and I'm working on a background texture for the surface of the moon. Something that can be tiled easily.However, I can't seem to get anything to look right. Here's the menu screen for reference to the art style. (And yes, I know how to do screenshots properly.) Any help would be greatly appreciated.
26  Game Development / Newbie & Debugging Questions / Re: Libgdx crashing? on: 2013-05-17 21:29:57
I'm working on a top down tile based mining game, based off of the game Lego Rock Raiders. I'm only running it on PC. Here's a pastebin for the error file. http://pastebin.java-gaming.org/7da697f8c54
27  Game Development / Newbie & Debugging Questions / Libgdx crashing? on: 2013-05-17 16:55:33
I'm working with libgdx and I'm getting an error message that looks just like this:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
#
# A fatal error has been detected by the Java Runtime Environment:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x76039c7f, pid=3372, tid=588
#
# JRE version: 7.0_07-b11
# Java VM: Java HotSpot(TM) Client VM (23.3-b01 mixed mode, sharing windows-x86 )
# Problematic frame:
# C  [msvcrt.dll+0x9c7f]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# An error report file with more information is saved as:
# C:\Users\Trevor\Dropbox\Coding\workspace\LRR\hs_err_pid3372.log
#
# If you would like to submit a bug report, please visit:
#   http://bugreport.sun.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
AL lib: alc_cleanup: 1 device not closed

It happens after 25 seconds almost every time. I'm rather confident that it's not an error on my side, but I'd like to know what's going on.
28  Game Development / Game Mechanics / Re: Libgdx 2D lights [Solved] on: 2013-05-15 21:30:30
As I said that I was really only looking for a method to make an alpha mask, I've finally found something suitable. However, it seems as though it is not efficient at all. This is what I've got.
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
      Pixmap lightMesh = new Pixmap(width, height, Pixmap.Format.RGBA8888);
      Blending blending = Pixmap.getBlending();
      lightMesh.setColor(0f, 0f, 0f, 0f);
      Pixmap.setBlending(Blending.None);

      int newX = Math.round(x);
      int newY = Math.round(y);

      lightMesh.fillCircle(newX, newY, radius);
      Pixmap.setBlending(blending);
      lightMesh.setColor(Color.BLACK);
29  Game Development / Game Mechanics / Re: Libgdx 2D lights on: 2013-05-14 22:37:25
Well, I guess I'm not so much looking for lighting as I am for creating an alpha mask. That seems like a more reasonable approach to what I'm doing.
30  Game Development / Game Mechanics / Libgdx 2D lights on: 2013-05-14 16:31:37
I'm attempting to figure out how I can add lights to my current game, it's top down 2d and there need to be multiple instances of the lights that are moving. I'll focus on making them dynamic at another date. But, I have no idea how i would do this with libgdx. Any further details can be provided at request. Any help or suggestions is greatly appreciated.
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.

xsi3rr4x (53 views)
2014-04-15 18:08:23

BurntPizza (51 views)
2014-04-15 03:46:01

UprightPath (65 views)
2014-04-14 17:39:50

UprightPath (48 views)
2014-04-14 17:35:47

Porlus (65 views)
2014-04-14 15:48:38

tom_mai78101 (89 views)
2014-04-10 04:04:31

BurntPizza (149 views)
2014-04-08 23:06:04

tom_mai78101 (245 views)
2014-04-05 13:34:39

trollwarrior1 (203 views)
2014-04-04 12:06:45

CJLetsGame (210 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
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!