Java-Gaming.org Hi !
Featured games (81)
games approved by the League of Dukes
Games in Showcase (513)
Games in Android Showcase (119)
games submitted by our members
Games in WIP (575)
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 ... 14
1  Discussions / General Discussions / Re: development block on: 2014-10-19 23:14:58
It sounds like you need to break your problem down into smaller individual pieces.

Instead of trying to solve HUGE_PROBLEM_XYZ, then trying to keep track of all the things you need to do for that, break it down into small_problem_x, small_problem_y, and small_problem_z.

Approach each problem as if it was independent of the others- and if they aren't independent, then you need to break them down even further. Focus on one problem at a time, and don't even think about the others until you're finished with the first. That way you can focus on one small detail at a time instead of the hundreds of things you need to do to solve your original problem.

Only when you have each separate problem solved, completely individually, then you should start thinking about combining them to solve your first big problem.
2  Game Development / Game Mechanics / Re: Collision and gravity on: 2014-10-16 15:00:28
It sounds messy.

You either have to deal with the approach you're taking and do the complicated determination of whether something is a wall or a floor, or you can simplify your approach and determine ahead of time whether and object is a wall or a floor. Keep in mind that a barrel might be comprised of multiple surfaces: two walls and a floor, for example.
3  Game Development / Game Mechanics / Re: Collision and gravity on: 2014-10-16 14:09:17
Can't you just store whether each object is a floor or a wall and do the calculation based on that boolean?
4  Discussions / Miscellaneous Topics / Re: Poor performance with JFileChooser on: 2014-10-16 13:16:22
if boot off things in the EDT right ahead it can still hang and screw you over. invokeLater from the EDT ensures the new action is queued to the end, rendering the current EDT process not block. Cranky

I'm not really sure what you're trying to say here, but if the EDT is already hung on a long-running process, using invokeLater() won't help you at all.

on the other side, if you run invokeAndWait from the EDT you make it hang 100%.

Erm, no. You'll get an error because you can't call invokeAndWait() from the EDT.

Lot of disinformation in this thread, which is why OP needs to post something that we can run instead of just throwing out random guesses.
5  Game Development / Newbie & Debugging Questions / Re: Game states for menus? on: 2014-10-16 13:09:27
Sure, this might work, but it also sounds like overkill. What's wrong with some good-old-fashioned if statements?
6  Game Development / Networking & Multiplayer / Re: Server UI - graphical vs command line on: 2014-10-16 13:08:44
Why are you asking?

Are you implementing your own server controller? Are you shopping around for options for yourself?

This is pretty subjective, so I'm not sure what you're asking. It's a bit like asking: which is better, burritos or spaghetti?

(burritos is better)
7  Game Development / Newbie & Debugging Questions / Re: Exporting Slick Game without JarSplice on: 2014-10-15 12:54:02
Awesome, glad it works for you!
8  Game Development / Newbie & Debugging Questions / Re: Switching Maps on: 2014-10-15 12:51:54
Like I said, we need *you* to elaborate. We've outlined the basics: whenever you need to switch maps, just change whatever variable holds your "current" map to point to the value of your new map.

If you want anything more specific than that, you're going to have to provide some of your code- preferably in the form of an MCVE.
9  Discussions / Miscellaneous Topics / Re: Poor performance with JFileChooser on: 2014-10-14 23:37:37
Again, can you provide an MCVE that demonstrates the problem? This shouldn't be a disconnected snippet, but it should be just enough code that we can copy and paste it as-is and run it on our own machines. With what you've provided so far, the best anyone can do is guess.

I would guess that you're doing something with threading or the EDT, but there's no way to diagnose that without an MCVE.
10  Game Development / Newbie & Debugging Questions / Re: Direction Animation Switch on: 2014-10-14 21:34:33
What exactly do you mean by "it runs debug mode"? What is "it" in this case? How are you running your code?
11  Game Development / Newbie & Debugging Questions / Re: Switching Maps on: 2014-10-14 21:33:40
It depends entirely on how your map works. If your map is, for example, a 2D array of tiles, then just pointing your array variable to a different 2D array of tiles would do the trick.

We can't really answer this question without more info on how your code is setup. What have you tried?
12  Discussions / Miscellaneous Topics / Re: Poor performance with JFileChooser on: 2014-10-14 21:32:24
Guyz, chill o-o

I'm just throwing random ideas which might hit the jackpot o-o

Isn't that how debugging works?

With respect.. no, that is not at all how debugging works.

Debugging works by consulting the API, documentation, and tutorials to check your assumptions.

In this case, assuming that Java has to search the whole hard drive (what?) for the current directory is an invalid assumption, which the API, documentation, and tutorials can tell you.

Recommended reading:

http://docs.oracle.com/javase/tutorial/uiswing/components/filechooser.html
http://docs.oracle.com/javase/7/docs/api/javax/swing/JFileChooser.html

OP, where is this code being executed? If you just execute it from the main() method, does it still hang? Do you have any threading going on? Are you somehow tying up the GUI with a long-running task?
13  Discussions / Miscellaneous Topics / Re: Poor performance with JFileChooser on: 2014-10-14 18:55:08
I've never seen this happen. Can you show us an MCVE that demonstrates the problem?
14  Game Development / Newbie & Debugging Questions / Re: Pathfinding? on: 2014-10-14 12:18:38
Google.

It does seem that most of OP's questions would be better served by a google search than a forum post. I suppose some people like talking about doing things more than they like doings, though.

That is not meant to be insulting, but seriously OP- a google search goes a long way, and most of the questions you ask here could be solved in a few minutes that way.

And if all you want to do is talk about this stuff instead of actually doing it, that's fine too- but showing us what you've already thought about will make for more interesting discussion than the "give me information" posts you seem to prefer.

Recommended reading: http://www.catb.org/esr/faqs/smart-questions.html

And this is for StackOverflow, but it contains some universally good advice: http://meta.stackoverflow.com/questions/260648/stack-overflow-question-checklist
15  Discussions / General Discussions / Re: Worried on: 2014-10-09 15:48:20
That's not how it works. Knowledge is not a zero-sum game. Learning more about C++ doesn't mean you have to forget what you know about Java in order to make room.

In fact, learning another language is one of the best ways to help you understand the first one. Knowing the pros and cons of one language helps you frame the pros and cons of another language.

Programming languages are like tools. Learning how to use a hammer does not mean you'll never be able to pick up a screwdriver again.
16  Game Development / Newbie & Debugging Questions / Re: I'm desperate on: 2014-10-09 13:08:29
You might consider starting with Processing. It's built on top of Java, but offers a simplified syntax that lets you get something visual and interactive up and running in just a few lines of code. Definitely worth checking out: http://processing.org/

Shameless self-promotion: I've been writing tutorials that take you from knowing absolutely nothing about programming, through Processing, into basic Java, then through Swing and eventually to more complicated things like LWJGL, JOGL, libGDX, and Android development. Might also be worth checking out: http://staticvoidgames.com/tutorials/intro/whatIsProgramming
17  Discussions / General Discussions / Re: Learned more than intended.. on: 2014-10-08 17:43:36
You say that now, but just wait until 2 classes from now when you get into the more advanced stuff. You'll be begging to go back to if statements and for loops.

It can be easy to get a bit of an ego if you're in a class that you think you already understand, but that goes away pretty quickly when you find yourself in a room full of people who make you look like a script kiddie.

(and if you've never felt that way, then you're hanging out with the wrong people)
18  Game Development / Newbie & Debugging Questions / Re: Are there any issues with importing static variables & arrays ? on: 2014-10-07 14:14:29
The short answer is that yes, abusing (or misusing) the static keyword can definitely lead to huge headaches.

The static keyword is used for a specific purpose: when you have data that isn't associated with a particular instance. Think constants, or shared data, or utility functions.

Misusing it to make it "easier" to access the data of a particular instance is a horrible idea. It's just as bad as making everything public for the same reason.

A real-life example: at my job, we have a piece of map software. This map software was written using static variables all over the place, just to make it easier to pass information around- after all, the program only ever had a single map, so we only really had one instance to deal with anyway.

That worked fine, until a requirement came down to show *two* maps next to each other. That job turned out to be *much* harder than it should have been, because of the misuse of the static keyword. We had to go in and refactor all of the code, when it should have been as simple as just creating a second instance.

So misusing the static keyword is a very very very bad habit to get into. It's a pretty horrible code smell, and tells me that you should either refactor your code or get into better coding habits.
19  Discussions / Miscellaneous Topics / Re: What are possible front ends for a java audio library? on: 2014-10-07 12:42:30
Since your existing library uses Java client-side code, your options are much more restricted. You can either use Swing, JavaFX, an OpenGL wrapper like JOGL, a more involved wrapper like Processing or libGDX, or another option like the ones you mentioned.

The pros of Swing is that it's tried-and-true and pretty easy to jump into. The cons is that it's a bit dated at this point. This is probably what I would recommend, especially since it sounds like your friend is a bit of a novice. Being able to just google your problem is a huge bonus.

JavaFX is pretty much the opposite: it's harder to find tutorials and whatnot, but it is a more modern solution for client-side Java. If your friend was a little more familiar with programming, this would probably be the way to go.

OpenGL wrappers are probably overkill for what you need, unless you want to do some fancy visualization stuff. You could also mix OpenGL stuff and Swing or JavaFX.

Processing might be an interesting choice, especially since it has such low overhead to get a window up and displaying animations. It's not a typical choice for application-style GUIs, but there are some libraries that make it pretty doable.

It might be a worthwhile exercise for your friend to put together a simple "hello world" GUI in each of the above, just to see which he likes the best. As you know, at least half of programming is doing research, reading the documentation, and experimenting, so maybe the best thing you can do for him is to say "here are your options, start exploring them on your own".
20  Game Development / Newbie & Debugging Questions / Re: Exporting Slick Game without JarSplice on: 2014-10-06 12:05:22
Shameless self-promotion: I created a tool that does exactly what you're talking about, available here: JarMatey
21  Game Development / Newbie & Debugging Questions / Re: How do I attatch javadoc for "java.awt.Graphics?" on: 2014-10-04 13:28:45
I assume you're talking about eclipse?

If so, right click your project, then go to properties. In the Properties menu, go to the Java Build Path section on the left. On that section, go to the Libraries tab.

On the Libraries tab, you should have a JRE or a JDK listed. Expand that by clicking the little triangle next to it, and under that you should see rt.jar. Expand rt.jar, and you should see a Source Attachment option. Click that and then click the edit button, which brings up a dialog where you can enter the location of the source zip.

The source zip comes with the JDK, so it's in the directory your JDK is in. For example mine is located at C:/Program Files/Java/jdk1.7.0_51/src.zip

Select "External location" and then navigate to your src.zip location, then click OK in all of the screens. That should do it!

If that doesn't make sense, googling "eclipse attach jdk source" seems to return a bunch of informative results. Like this one: http://www.mkyong.com/eclipse/eclipse-how-to-attach-jdk-source-code/

Edit: I believe you can also do this from the "this class doesn't have any attached source" screen, just click the "attach source" link/button and then navigate to the src.zip in your JDK. The effect should be the same though.
22  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Library to make a 2d game look 3d? on: 2014-10-02 17:25:25
I mean it's really hard for us to answer the types of questions you've been asking, other than to point you to google and the basic tutorials.

There are a bunch of libraries out there to help you out (LWJGL, JOGL, libGDX, JMonkeyEngine, Processing, Slick, etc), but which one is right *for you* isn't really something we can decide for you. It all depends on which library fits inside *your* head the best, which one jives with your programming style and way of thinking.

That's why I think you need to run through some basic tutorials. Go through the basic tutorials of LWJGL, see what you like. Then go through the basic tutorials of JOGL, see what  you like. Then repeat with libGDX. Keep doing that until you have a basic understanding of the libraries and some idea of which one works for your goals. We  can't give you this information, because it depends entirely on *you*.

But yeah, if you want to display stuff in 3D, you're going to have to learn "3D stuffs".
23  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Library to make a 2d game look 3d? on: 2014-10-02 17:11:19
Sorry to tell you this, but it's going to take much longer than 1 day to become familiar with what you're looking for.

You need to take a step back and go over the basics instead of trying to find a tool that does the work for you.
24  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Library to make a 2d game look 3d? on: 2014-10-02 16:45:46
You have plenty of other options. I highly suggest you do some research.
25  Game Development / Newbie & Debugging Questions / Re: [jbox2d] Rotation is killing me... on: 2014-10-02 13:29:30
I watched the video and I still have no idea what your question is...?
26  Game Development / Newbie & Debugging Questions / Re: Is there a way to use polygons in a 2d game? on: 2014-10-01 14:28:13
How is this post different than your other post?

What have you tried? What has your googling told you? What library are you using? Have you tried googling whether it's possible to use 3D polygons in that library?
27  Discussions / General Discussions / Re: How do you come up with ideas for games? on: 2014-10-01 14:10:58
I agree with Cas.

Ideas are cheap. Most of us probably get many "offers" from non-programmers (muggles?) who have this "great idea for a game that combines CoD and WoW and all I need is a programmer to do the actual coding, oh and an artist, and a sound guy... but don't worry, if you work for free, I'll give you 5% of the future profit from the game!"

To answer your question, I come up with ideas randomly, all the time. I have a list of "future program ideas" on my phone that I pick from whenever I have a weekend free. I think it would be harder for me *not* to have these random ideas! I realize that might sound a bit jerkish to somebody currently going through programmer's block, but I would bet that most people here are the same way.

I've heard other people say that they have trouble coming up with ideas, and that always baffles me. My prediction is that perhaps you just don't have enough practice programming, so you don't even know what you're capable of yet. Try working through some basic tutorials, or some not-so-basic tutorials (inevitable shameless self promotion).

Start with Pong, even if it sounds boring. When you have it working, try sprucing it up. Can you add different types of levels, maybe with obstacles? How about powerups? What about a cooperative Pong game where you're fighting against some enemy together? How about switching the game up and playing as the ball, trying to avoid the paddles? Can you reimagine Pong as an RPG game, or an FPS, or a turn-based game? How about as a card game? Or a board game? Have as much fun as possible- add explosions, pictures of cats, whatever.

Also, I think you're approaching it from the wrong angle: instead of sitting there, bored, trying to force yourself to think of the next big game idea, why not do something else you enjoy? What are your other hobbies? If nothing else, go for a walk! Really look around at what's going on, and think about how you might abstract that into a program. See that squirrel digging up acorns? (I guess he'd be burying them now that it's fall.) How could you create a mechanic out of that (note that I didn't even say game mechanic)? Could you make some kind of "squirrel sim" where you buried nuts? Would it be top-down, grid based, 2D side-scrolling, or something else entirely? What kinds of programming constructs would you need to create your squirrel sim? How would you do each part?

And notice how small you're starting, just thinking about a squirrel moving around in a world. What would the controls be? How would you program those controls?

Those are the kinds of thoughts that pop into my head *all the time*. And if that kind of daydreaming doesn't sound fun to you, then you might be in the wrong business.

But if it *does* sound fun to you, then maybe you go home and keep thinking about that squirrel. Maybe you're taking a shower and you think "a-ha! It would be pretty fun if I used a grid-based top-down world and used the arrow keys to control the squirrel!" and then maybe you get some free time and you write a little SquirrelSim prototype.

How would you make a game out of it? The daydreaming begins again. Maybe it's a one-player race against time, where you try to find and bury as many acorns as possible in 60 seconds. Maybe it's a two player game where one squirrel hides acorns and the other squirrel tries to dig them up. Maybe it's a memory game where you try to match similar colored acorns. Maybe it's a typing game where you have to spell words quickly to dig up an acorn.

Anyway, that's how I come up with ideas for games: by not trying to come up with ideas for games and just thinking about the world around me instead, and by using what I know about programming to try to dissect stuff into abstractable chunks.
28  Discussions / Business and Project Management Discussions / Re: Starting a small dev business on: 2014-10-01 13:35:25
I highly advise taking a step back and starting much smaller.

You're approaching this from the wrong angle: instead of starting out trying to make money and start a company, why don't you just have fun? It sounds like you're interested in programming, and that's great. Why not use that interest and invest in yourself by getting as much practice as possible?

You don't do this by trying to make a profit or start a company (whatever that means). Instead, you do this by just sitting down and programming stuff. You practice, maybe start gaining a following (if you're lucky), and only then (which might take years) should you start worrying about making money.

But if you're dead-set on trying to sell your product (which I highly advise against), you might try putting your stuff on Google Play or something like Desura (note: I've never used Desura, but it might be worth looking into).

Alternatively, you could think about advertisements instead of sales. Put a banner ad on your website, and if your games are popular enough to attract a following, you might make some money that way.

But seriously, don't worry about money.
29  Game Development / Newbie & Debugging Questions / Re: [LIBGDX] How to draw terrain for truck/car game? on: 2014-09-30 14:31:13
Step 1 is to get something really basic working, then work your way up. Can you draw a single point? Can you draw a triangle? Can you draw an entirely flat terrain?

If you're having trouble with that, post an MCVE with hard-coded (not randomized) values and we can take a look.

If you can get the basics working, then start thinking about that dumb friend of yours. Write out (in English, not code) exactly what you're trying to do.

When you have the basics working perfectly, and the instructions written out clearly, then you can think about combining them.
30  Discussions / Miscellaneous Topics / Re: Java won't let me time travel on: 2014-09-30 14:00:16
Haha!

Guess I'll just keep my fingers crossed for the singularity then!
Pages: [1] 2 3 ... 14
 

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

The first screenshot will be displayed as a thumbnail.

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

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

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

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

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

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

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

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

BurntPizza (36 views)
2014-10-11 23:10:45

BurntPizza (75 views)
2014-10-11 22:30:10
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!