Java-Gaming.org Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (576)
Games in Android Showcase (155)
games submitted by our members
Games in WIP (626)
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 ... 29
1  Game Development / Newbie & Debugging Questions / Re: Make a camera with changeable size on: 2015-05-04 17:29:13
Why not just use JOGL/LWJGL/libGDX?
2  Game Development / Newbie & Debugging Questions / Re: How Do i Random Generate Something like this on: 2015-05-03 13:18:54
Short answer: yes, this is very possible.

Longer answer: you have to break this down into smaller steps, then tackle the steps one at a time. Which exact step are you stuck on?

For the actual generation, just google something like "java dungeon generator" or "java maze generator". I've personally used Prim's algorithm, but there are a bunch of others.

For working with images, that's going to depend on your exact setup, any frameworks you're using, etc. Try googling "java read image" or "java modify image" or "java output image" for individual steps.

Good luck!
3  Discussions / Miscellaneous Topics / Re: What do you define as a programming language? on: 2015-05-02 02:32:38
This is another askyahoo situation isn't it? where no one have an opinion or thought on their own, instead they just go to sources to give the absolute definition.

You've asked a question which is at best debatable, and at worst simply trivial. I'm not sure what you were expecting, but you got a great starting point to a discussion- what is Turing complete? What are some interesting nooks and crannies of that definition? How do the languages you mentioned fit into that definition?

But instead of reacting with genuine curiosity or even stating your own thoughts, you came back with petulance and misplaced irritation, which you expressed by being rude to the people trying to provide you with an actual conversation.

You either came here for the sole purpose of trolling, or English isn't your first language and you've massively misunderstood the tone of the replies you've received.

Either way, the answer is to calm down, re-read the replies until you fully understand them, research what's being said, and then come back with an apology.

I'm not sure what purpose this entire thread is supposed to serve, but if you post on a technical forum, expect technical responses. We don't really have time to entertain your misplaced temper tantrums.
4  Game Development / Newbie & Debugging Questions / Re: Pong power ups on: 2015-04-30 13:31:14
This does not sound like a reason to use threads.

Threads are *basically* a way to make the computer do two things at once- in reality, the computer is simply switching between two different things. An example would be loading a file while updating a progress bar- one thread would load the file, another thread would draw the progress bar.

Most games use a single game loop thread, that way they don't have to worry about a bunch of synchronization.

One approach to your problem would be to simply store the "start" time of and temporary objects, then remove them when the elapsed time exceeds the time limit. No need for threads there.
5  Game Development / Newbie & Debugging Questions / Re: 1D Perlin Noise on: 2015-04-29 18:42:59
Do you really need Perlin noise? Why not just add and subtract random values from a start value? Something like this:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
public class Main  {

   public static void main(String... args) {

      float value = 1000f;
     
      for(int i = 0; i < 100; i++){
         
         value += -10 + Math.random()*20;
         
         System.out.println(value);
      }
   }
}
6  Game Development / Newbie & Debugging Questions / Re: 1D Perlin Noise on: 2015-04-29 18:37:14
Well, this is the downside of trying to hamfist code you find on the internet. That noise1() function looks like it always returns 0.

You can try to debug it to figure out why, but why not just write your own instead, that way you know what you're dealing with?
7  Game Development / Newbie & Debugging Questions / Re: 1D Perlin Noise on: 2015-04-29 18:27:34
Where are you getting the PerlinNoiseGenerator class?
8  Game Development / Newbie & Debugging Questions / Re: Getting started with game programming on: 2015-04-28 13:55:34
You're going to get a lot of two cents from people, and this is one of those things that 10 different people will have 15 different opinions about. There isn't any single correct path, so part of it is trying different things out and figuring out what you like the best.

Like others have said, libGDX is pretty much the go-to Java game development library. One of its major perks is that you can deploy as a Java jar (which can be converted to a platform-specific executable), or to Android (or even iOS through RoboVM), or even as JavaScript/html5. The awesomeness of this cannot be overstated.

Some people prefer to work at a slightly lower level, which means more "work" but more control over what's going on under the hood. Those people would recommend LWJGL (which libGDX is built on top of) or JOGL (which is pretty much just a Java wrapper of OpenGL).

However, all of the above require an intermediate Java knowledge: you need to understand the basic syntax like if statements, loops, etc. But you also need to understand things like OOP, different data structures, etc. For that reason, I personally don't recommend that you start out with LWJGL or libGDX.

Instead, I highly recommend you check out Processing. Processing is built on top of Java, so you're learning all the right syntax, but it's also designed to be very easy to get something visual and interactive (like, say, a game) up and running without worrying about a lot of setup.

Like SauronWatchesYou said, I run a little website called Static Void Games that has a bunch of tutorials designed to take somebody like you from Processing and into Java, with the goal of "graduating" to something like libGDX. You can check out the tutorials here if that sounds like something that might help you.
9  Discussions / Business and Project Management Discussions / Re: developers wanted for Freelords - a strategy game. on: 2015-04-23 18:57:48
Here's a list of similar threads that I got from putting the word "team" in the forum's search box. I'm sure I could find more. You might consider contacting some of these folks.

http://www.java-gaming.org/topics/brutal-fighters-let-s-build-a-team/35510/view.html
http://www.java-gaming.org/topics/newbie-dev-looking-for-a-team/35741/view.html
http://www.java-gaming.org/topics/norakomi-is-looking-for-a-team-graphic-designers-coders-music-composers/33270/view.html
http://www.java-gaming.org/topics/creating-game-developer-s-team-for-beginners/35703/view.html
http://www.java-gaming.org/topics/team-looking-for-programmer-s-rev-sharing/30666/view.html
http://www.java-gaming.org/topics/game-programmer-looking-for-team/34113/view.html
http://www.java-gaming.org/topics/looking-for-team-members/32671/view.html
http://www.java-gaming.org/topics/looking-for-team-experience/31855/view.html
http://www.java-gaming.org/topics/developing-a-new-free-roam-2d-game-team-needed/29020/view.html
http://www.java-gaming.org/topics/creating-dev-team-java-2d/32681/view.html
http://www.java-gaming.org/topics/recruitment-for-team-technic/35201/view.html
http://www.java-gaming.org/topics/looking-for-a-small-team/32642/view.html
http://www.java-gaming.org/topics/lookign-for-members-to-make-a-team/28830/view.html
http://www.java-gaming.org/topics/join-our-team-jumpbutton-studio/31554/view.html
http://www.java-gaming.org/topics/looking-to-create-a-small-dev-team/32220/view.html
http://www.java-gaming.org/topics/looking-for-indie-team-working-on-a-virtual-world-game/30186/view.html
http://www.java-gaming.org/topics/3d-binding-team-based-contest-idea/18983/view.html
http://www.java-gaming.org/topics/looking-for-some-guys-to-make-a-2d-rpg/35789/msg/339347/view.html#msg339347
http://www.java-gaming.org/topics/starting-a-team-music-composer-developer-and-3d-designer-writer-needed/35765/view.html
http://www.java-gaming.org/topics/looking-for-a-developer/35877/view.html
10  Java Game APIs & Engines / OpenGL Development / Re: Precision and value range on: 2015-04-23 14:06:13
The problem with floats (and doubles) is that they have a limited number of significant digits that they can care about. So it's not really a matter of "how big a number do you need" or "how small a number do you need" - it's how many significant digits do you need?

It sounds like you want both worlds: both really small numbers, and really large numbers. And that's going to be a problem.

You can work with really large numbers, but you start losing precision at around, uh, 9 digits- that's not exact, and it's not even how it really works, but it's an okay estimation to use. Consider this:

1  
2  
3  
4  
5  
6  
7  
8  
9  
public class Main{
   public static void main(String[] args){
     
      float x = 123456789;
      float y = x + 1;
     
      System.out.println(x == y); // prints out true!
   }
}


You can also work with really small numbers, but again, you only get about 9 digits of precision:

1  
2  
3  
4  
5  
6  
7  
8  
9  
public class Main{
   public static void main(String[] args){
     
      float x = 1;
      float y = x + .00000001f;
     
      System.out.println(x == y); // prints out true!
   }
}


You might reconsider how much precision you really need- do you really need sub-meter precision as well as precision for things that are over a light year away? It sounds like it's time to rethink how you're organizing stuff, maybe by packing them into "neighborhoods" instead of trying to do the whole shebang at once. It really depends what you're going for, but you can't have the best of both worlds.
11  Discussions / Business and Project Management Discussions / Re: developers wanted for Freelords - a strategy game. on: 2015-04-23 02:33:58
How much ya payin?
12  Game Development / Newbie & Debugging Questions / Re: Looking for Source Code Ressources on: 2015-04-22 14:54:27
You might be interested in the GitHub Game Off that just happened. Bunch of new open-source games were created.

For that matter, many, if not most, game jams end up with a bunch of open-source games, including Ludum Dare, which just happened this past weekend.

You can also find non-jam games on GitHub.

But if we're being honest, diving into somebody else's game code is probably not a great way to learn good software design.
13  Discussions / General Discussions / Re: What do you think of Greenfoot? on: 2015-04-20 18:28:01
I mean high school college i think thats right Shocked

Okay cool. Well that makes much more sense- starting out with Greenfoot in 9th grade or so is pretty reasonable, whereas it might seem a little too easy for a university class.

Keep in mind that you can write Java code with Greenfoot, so it's not exactly as simple as Scratch. But mostly, if you want to dive in to "real" programming without Greenfoot, then you don't have to wait for a class to do that!
14  Game Development / Newbie & Debugging Questions / Re: Looking for Source Code Ressources on: 2015-04-20 17:12:06
Shameless self-promotion: many of the games on Static Void Games are open-source. What you can do with that source depends on the game, so make sure to check with the developers before using anything.

However, the game you've mentioned (an MMO) is not trivial, so you really might want to start smaller.
15  Discussions / Miscellaneous Topics / Re: advanced 'Knapsack problem' on: 2015-04-20 16:55:58
Can I ask you why you chose this problem? It seems rather specific- is it homework?

Your approach sounds like a greedy algorithm- it might work okay, but it will get stuck in a "local optimum" if, for example, the best solution involves moving more than one student. A cheap way to get around that is by moving X students instead of 1, but that quickly gets into taking-too-long land.

A more interesting approach might be to use other algorithms, such as evolutionary computation.

But it's hard to help with general "how do I do this" type questions without seeing anything you've tried.
16  Discussions / General Discussions / Re: What do you think of Greenfoot? on: 2015-04-20 16:31:18
I've never used Greenfoot, but I understand the appeal of it. Teaching programming is hard, especially to people who have never seen a line of code before. Languages like Java can be even harder, because of how much boilerplate you need to know just to get something running.

From what I can tell, Greenfoot tries to eliminate that boilerplate and teach OOP, one of the hardest concepts for novices to understand, right from the start. I would say that these are good goals to have, and trying these goals is important if Java is going to reclaim any of the ground that it's already lost to JavaScript.

I personally prefer Processing to fill that role, and if I were teaching the basics (which I would love to do), that's what I would use. But Greenfoot is one of the earlier projects trying to accomplish these goals, which is one of the reasons it's so popular. Now we have Code.org and all of its associated educational programming tools, but Greenfoot is still used.

But I guess the point is, if you don't like Greenfoot, then your worst case scenario is that you'll have to try stuff outside of class, which already was probably true.

Also: when you say college, do you mean "high school age college" or "university age college"? I never know what that word means on the internet...
17  Discussions / Miscellaneous Topics / Re: Can Word Lists be Copyrighted on: 2015-04-09 13:09:55
1. Don't trust legal advice from unqualified strangers.

There's a lot of misinformation in this thread. Anybody reading it should take everything with a grain of salt.
18  Game Development / Newbie & Debugging Questions / Re: Questions about creating a level editor. on: 2015-04-06 12:27:09
Well, like I said: most of this depends more on your personal preferences than anything. I would maybe argue that if you don't know how to write files yet, then it might be a good idea to start with something simpler first- walk before you run and all that.

But there are plenty of ways to use a database in Java- you run SQL calls directly, or you can hide behind something like Hibernate. Some people would use a database right away, other people hate database programming. So it's really up to you.

I will say that nothing on the client side is 100% "secure" from tampering by a player. A player could even decompile your code and modify it. So I'm not sure you should waste a ton of time worrying about that aspect of things.
19  Game Development / Newbie & Debugging Questions / Re: Questions about creating a level editor. on: 2015-04-05 23:54:02
Hm, Interesting. Like I said I have no idea on how to read and output to a file so i'll have to research that extensively.

That's step one. Googling "java output text file" or "java read Strings from file" return a ton of results.


Another question I have is, is it possible to have the level editor output from a file but also have many of the game parts to be serializable for easy game saving? Or is there a better option for saving game data?

Is it possible? Sure. Better? That part really depends on your preferences more than anything.

Saving stuff as text files has the benefit of being human-readable, so you could "hack" the file just by opening it in a text editor and changing the values. That makes debugging easier. Saving things as serialized Objects makes it easier to read/write more complicated Objects, but it requires that everything in the Object tree also be serializable, which isn't always an option. You also have to be careful with different versions of serialized objects- old serialized files won't work if you update the class- although you'll have a similar issue with backwards compatibility with the text files as well.

As always, the best thing to do is just dive in. Maybe start by creating small example projects- one that tests out writing to and reading from text files, and one that tests out serialization. See which one works better for you.
20  Game Development / Newbie & Debugging Questions / Re: Questions about creating a level editor. on: 2015-04-05 23:35:00
This is really going to depend on the type of game you're creating, how you want users to interact with your level editor, how you want to load files, how everything fits into your head as a programmer, etc. There isn't a single one-size-fits-all solution, so there isn't a great answer for you. It's like if an artist asked "how should I paint this picture?" There are just too many possible answers, and the whole point of painting is that it's up to the artist.

I will say that saving your own file type is trivial. Just output Strings to a text file the same way you would any other text file, and give it whatever file extension you want. Then read in those Strings the same way you would any other text file.

Another approach might be to look into serialization.
21  Games Center / Showcase / Re: Hit Heal on: 2015-04-03 13:29:00
Fun idea, well executed, nice polish. Might be a little *too* simple for many players, but I could see handing this to some kids to shut them up for a few minutes!
22  Game Development / Newbie & Debugging Questions / Re: Property based pattern for a game. on: 2015-04-03 00:47:22
So i took your advice and did some profiling.

And those numbers aren't really all that high. Are they different? Absolutely, and they're going to be. But 6 MB is nothing, especially if it's easier to use, maintain, etc.

If you want to create something just for the fun of it, go for it. But it seems like you're over-engineering a pretty solved problem, imho.

But like I said: if it sounds fun to program, then program the heck out of it!
23  Discussions / General Discussions / Re: Looking for a developer on: 2015-04-02 17:17:16
Yeah okay thanks for that I was going to carry on the development whilst I wait, but hey lets go for it.

You might start by posting to the Work-In-Progress Board whenever you have something for us to check out.

One quick question I want to have a login screen that remembers your username and password on the internet. I also want it so that if you log on from another phone it remembers all your information so like details of your business card. What would I use to do this.

Well, you're talking about a database here. That's an entire field in and of itself, and it can get pretty complicated. You might start out by learning some basic SQL (W3 Schools is a great place to start), and then move up to things like JDBC.
24  Discussions / General Discussions / Re: Looking for a developer on: 2015-04-02 13:32:32
You seem like a nice guy or gal, so can I offer some advice based on my limited experience?

You're approaching this from the wrong direction.

You say you've got some development experience, and that's awesome. Use that. You've already taken an Android app to market, so you've got a lot of the hard work done.

Instead of trying to look for a developer to work for you (more on that in a second), take a deeper dive into the development yourself. Break your entire project down into much smaller individual pieces. What's the absolute smallest, very next thing you know you need to do? Figure out how to do that, then do it. Make a bunch of tiny example programs that just do one thing, and when you get stuck, post that example project here, and we can help you along.

Because what you're looking for doesn't really come cheap. You either want a tutor or an employee. I know you think you're just looking for somebody to have fun and program with, but that's not really how any of this works. You're either not going to get any takers, or you're only going to get people who make the whole thing more difficult.

Any developer who can do the things you're talking about probably has his or her own personal (or professional) project that they're working on. They probably aren't going to stop and try to take on your vision as well. We don't have enough time for our own ideas, let alone everybody who emails us with an idea for an app.

Instead, you'll have to build a prototype. Get the basics in place. When you have something up and running and can show people, then you might attract other people who want to work with you. Maybe.

Ideas are cheap. Managers are cheap. People looking for a team are usually in over their head. The best thing you can do for your project is to get your hands dirty and just start working on it.

Here's a list of similar threads that I got from putting the word "team" in the forum's search box. I'm sure I could find more. Notice how many of them went anywhere.

http://www.java-gaming.org/topics/brutal-fighters-let-s-build-a-team/35510/view.html
http://www.java-gaming.org/topics/newbie-dev-looking-for-a-team/35741/view.html
http://www.java-gaming.org/topics/norakomi-is-looking-for-a-team-graphic-designers-coders-music-composers/33270/view.html
http://www.java-gaming.org/topics/creating-game-developer-s-team-for-beginners/35703/view.html
http://www.java-gaming.org/topics/team-looking-for-programmer-s-rev-sharing/30666/view.html
http://www.java-gaming.org/topics/game-programmer-looking-for-team/34113/view.html
http://www.java-gaming.org/topics/looking-for-team-members/32671/view.html
http://www.java-gaming.org/topics/looking-for-team-experience/31855/view.html
http://www.java-gaming.org/topics/developing-a-new-free-roam-2d-game-team-needed/29020/view.html
http://www.java-gaming.org/topics/creating-dev-team-java-2d/32681/view.html
http://www.java-gaming.org/topics/recruitment-for-team-technic/35201/view.html
http://www.java-gaming.org/topics/looking-for-a-small-team/32642/view.html
http://www.java-gaming.org/topics/lookign-for-members-to-make-a-team/28830/view.html
http://www.java-gaming.org/topics/join-our-team-jumpbutton-studio/31554/view.html
http://www.java-gaming.org/topics/looking-to-create-a-small-dev-team/32220/view.html
http://www.java-gaming.org/topics/looking-for-indie-team-working-on-a-virtual-world-game/30186/view.html
http://www.java-gaming.org/topics/3d-binding-team-based-contest-idea/18983/view.html
http://www.java-gaming.org/topics/looking-for-some-guys-to-make-a-2d-rpg/35789/msg/339347/view.html#msg339347
http://www.java-gaming.org/topics/starting-a-team-music-composer-developer-and-3d-designer-writer-needed/35765/view.html

I'm not trying to discourage you. Quite the opposite, in fact. The best thing you can do is just get to work. Post updates. Post questions. But looking for a team is one of nails in the coffin that seem to doom novice projects like this. Good luck.
25  Discussions / Miscellaneous Topics / Re: Installing Android SDK Problem on: 2015-04-01 12:43:23
Why are you pausing an installation and then installing something in that location while it's paused? That sounds like a recipe for disaster.

90% of problems like these can be solved by simply uninstalling and reinstalling everything. Maybe try that?
26  Game Development / Newbie & Debugging Questions / Re: Capturing - arrow keys and letters on: 2015-03-31 12:44:16
Maybe an exercise for another time then, but I couldn't work out how to use .contains() with Bytes instead of byte.  I guess I'd need to write a comparator that used Byte.byteValue to compare the actual values

You don't need a Comparator. It should work fine.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
import java.util.ArrayList;
import java.util.List;

public class Main{

   public static void main(String... args) {
      List<Byte> bytes = new ArrayList<Byte>();
     
      bytes.add((byte)1);
      bytes.add((byte)2);
      bytes.add((byte)3);
      bytes.add(new Byte((byte)4));
     
      for(byte b = 0; b <= 5; b++){
         System.out.println("Contains " + b + ": " + bytes.contains(b));
      }
   }
}


This code prints out:

Contains 0: false
Contains 1: true
Contains 2: true
Contains 3: true
Contains 4: true
Contains 5: false

Just make sure you're actually checking against a byte and not an int!
27  Game Development / Newbie & Debugging Questions / Re: Property based pattern for a game. on: 2015-03-30 18:42:32
Wouldn't be better to use an ImmutableIntObjectMap (GS Collection) that rather using Properties which fallsback to Java's collection?

Why?

Really the only way to answer this is to do some profiling. But I would be pretty surprised if you notice any huge differences in performance for something like this. Just go with whatever fits in your head the best, without reinventing the wheel too much.
28  Game Development / Newbie & Debugging Questions / Re: Property based pattern for a game. on: 2015-03-30 18:37:52
You've pretty much described what the Properties class already does. Why not just use that?

Recommended reading:

https://docs.oracle.com/javase/8/docs/api/java/util/Properties.html

https://docs.oracle.com/javase/tutorial/essential/environment/properties.html
29  Game Development / Newbie & Debugging Questions / Re: Capturing - arrow keys and letters on: 2015-03-30 15:22:55
I think the behavior of your arrow keys is going to depend on your keyboard and your system. In fact, I've never seen the behavior you're describing: my arrow keys act just like my other keys.

And with my suggestion of simply keeping track of the variables separately, you wouldn't really care about the keyPressed() function being called multiple times. Here is some pseudocode:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
boolean upPressed = false;

void keyPressed(KeyEvent ke){
  if(ke.getKeyCode() == KeyEvent.VK_UP){
      upPressed = true;
   }
}

void keyReleased(KeyEvent ke){
  if(ke.getKeyCode() == KeyEvent.VK_UP){
      upPressed = false;
   }
}

void gameLoop(){
   if(upPressed){
      //up is pressed, go up
   }
}
30  Game Development / Newbie & Debugging Questions / Re: [Unsolved] Bullet not shooting in correct direction! on: 2015-03-30 15:08:36
Weird, all my code like this, I Negate it lol. If I don't it shoots opposite.

That probably means you have the source/goal mixed up in your subtraction. It's not the end of the world, just one extra step you don't really need.
Pages: [1] 2 3 ... 29
 
ClaasJG (40 views)
2015-04-30 20:33:25

Riven (24 views)
2015-04-30 13:25:12

ClaasJG (45 views)
2015-04-27 13:36:51

BurntPizza (51 views)
2015-04-23 03:42:11

theagentd (52 views)
2015-04-22 16:23:07

Riven (65 views)
2015-04-16 10:48:47

Duke0200 (76 views)
2015-04-16 01:59:01

Fairy Tailz (59 views)
2015-04-14 20:13:12

Riven (63 views)
2015-04-12 21:36:37

bus hotdog (88 views)
2015-04-10 02:39:32
How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14

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