Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (524)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (592)
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  Discussions / General Discussions / Re: What is your favorite layout? on: 2011-12-21 11:37:07
My games always have a fixed-size frame and therefore I always just use the 'null'-layout and set the dimension and coordinates for each component manually.
It's easy and straightforward. I'm surprised that apparently nobody else does it this way.
2  Game Development / Newbie & Debugging Questions / Re: NullPointerException with multi-dimentional array. on: 2011-11-24 12:51:35
Quote
Also, a small eclipse problem (for people who use the eclipse IDE), ..., (i googled it but i didnt get any results, mainly because i cant think of a decent search query for my problem)
Try Googling on 'eclipse intellisense not working ubuntu'.
3  Discussions / General Discussions / Re: Oh so true.... on: 2011-11-19 07:29:20
It happened to me a few times also. In some cases, I was able to find a solution after hours of trial & error.
I then created an account for that particular forum and replied with my solution to break the cycle,
but I just got angry reactions, 'How dare you, waking up an old thread !'..
So much for doing something back for the community ...   Clueless
4  Discussions / Miscellaneous Topics / Re: why do power supplies explode? on: 2011-11-18 09:48:14
A powersupply contains a capacitor and capacitors may 'explode' under certain circumstances.
Google for 'capacitor explodes' if you want to know more.   
5  Discussions / General Discussions / Re: Still hardly any games, why entity systems suck, and why 4k is good on: 2011-11-17 11:34:02
Not finishing a game because of fiddling around is one  thing, I personally have problems to stay motivated to work on my game because I'm afraid that I will be unable to find people to play it.
There are sooo incredible huge number of games available on the internet, how in the world could I reach and interest people for my particular game ?

Sure, I could create a website for it or submit it to dedicated game-sites but it will still be 'unfindable' among the thousands of other games available.
One could argue that the game should stand out so much that it will draw enough attention to itself, but that is, of course, incredible hard, especially if this is just your second or third game.

I guess this just the problem with internet, with the whole world as competitor, it is just impossible to impress anyone anymore, because whether you're making software, games, music, graphics or whatever, one search at Google will make you realise that your idea/implementation/... is far from original and at least ten people have already created something very similair en perhaps even better than you will ever be able to.

So why would one bother anymore ?.. This whole thing discourages me a lot... I like the process of creating a game but I don't like to spend months on something that will have no chance to be noticed.
6  Discussions / Business and Project Management Discussions / Re: AllBinary Platform Diagram Preview on: 2011-10-26 11:53:46
Quote
Please don't post my code without the header.
Are you sure that this is your code ?
7  Java Game APIs & Engines / Java Sound & OpenAL / Re: How to play a OGG-file ? on: 2011-08-31 19:59:27
  Below is my attempt to load and play an OGG-file using the 'OggInputStream'-class.
  This code obviously won't work as it is now, because I don't know how to create
  an AudioFormat-object based on the data available.
  And my second problem is that I don't understand how to use the 'read'-method,
  it needs an byte-array as argument, but since I don't know the length of the
  decoded OGG-file yet, I don't know how large this array should be (?).
 
  What should be done to get this code-sample working ?
 
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  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
  private void loadAndPlayOgg()
  {
    InputStream input = getClass().getResourceAsStream("explosion.ogg");    
    OggInputStream ogg = new OggInputStream(input);
   
    int format = ogg.getFormat();
    int rate   = ogg.getRate();    
    AudioFormat audioFormat = // How to create an AudioFormat with only these two parameters ??
   
   
    // I think that the size of 'inputBuffer' should be equal to the size of the decoded OGG-file,
    // but I don't know this size, so what now ?
   
    byte[] inputBuffer = new byte[1024];
    try
    {      
      int readSize = 0;      
      while((readSize = input.read(inputBuffer, 0, 1024)) > -1)
      {
        ogg.read(inputBuffer, 0, readSize);
      }
    }
    catch (IOException e)
    {
      e.printStackTrace();
    }
   
    Clip clip = loadClip(inputBuffer, audioFormat);    
    if (clip != null)
    {
      clip.start();
    }  
   
  }
 
  private Clip loadClip(byte[] data, AudioFormat format)
  {
    DataLine.Info info = new DataLine.Info(Clip.class, format);
    if (!AudioSystem.isLineSupported(info))
    {
      System.out.println("Unsupported Clip File");
      return null;
    }

    Clip clip = null;
    try
    {
      clip = (Clip) AudioSystem.getLine(info);
      clip.open(format, data, 0, data.length);
    }
    catch (LineUnavailableException e)
    {
      e.printStackTrace();
    }    
    return clip;
  }
8  Java Game APIs & Engines / Java Sound & OpenAL / Re: How to play a OGG-file ? on: 2011-08-31 12:24:09
Quote
The issues that haven't been address are with Java Sound, not the OGG code.

I use EasyOGG quite a bit - specifically in legends of yore and in my recent LD48 entry. No complaints other than Java Sound doesn't always work on Linux.

Oh, ok. I was under the impression that you actually did not use it
yourself, because somewhere in the aforementioned thread, you said  ;
'Doh, shows how much I don't use EasyOGG for my stuff doesn't it ?'

But this eased my mind and I'll give it a try now.   Smiley

Quote
Paul Lamb Sound Library works better than my own code (which was enough in the past). His library is quite simple and you can use it with OpenAL or JavaSound, what is wrong with it?

There's nothing wrong with it, but it just overwhelms me a bit,
with its 3 soundsystems and 8 plugins to choose from.  :-)
9  Java Game APIs & Engines / Java Sound & OpenAL / Re: How to play a OGG-file ? on: 2011-08-31 10:40:41
EasyOgg looks very promising indeed, but I'm a kinda discouraged by thread
'Improving EasyOgg' (http://www.java-gaming.org/index.php?topic=18766).

People seem to have all kind of issues with it and I see several
attempts, (that is, code), to get around those issues.

Looks like after all these years, there's still no general,
simple and robust way for using OGG-files in games...
10  Java Game APIs & Engines / Java Sound & OpenAL / How to play a OGG-file ? on: 2011-08-31 06:34:22
Can someone please provide me some sample
code on how to load and play a short OGG-file ?

I know there are lots of OGG-decoders available,
but I find it all kind of overwhelming,
especially because I cannot find any
(simple) examples on the subject.

Thanks.
11  Discussions / General Discussions / JGO domain-name changed ?! on: 2011-07-27 06:21:27
For two days, I was wondering why the JGO-site wasn't working,
but now I found out that the domain-name has changed,
(from javagaming.org to java-gaming.org), wtf ?!    

Huh

Did I miss something, when/where was this announced ?

I'm wondering how much more people are now
still waiting for the JGO-site 'to be up again' ...
12  Game Development / Game Play & Game Design / Re: Player sprite just doesnt move smooth? on: 2011-05-05 14:51:50
Never mind, the bug is back in the bug database.

I'm attempting to vote, but the site is, again,
real sloooow, so I guess it will not succeed this
time either ... (already waiting more than 10 minutes
after clicking 'vote' ...)  Sad

I always wondered why those bugs get so few votes,
the bugs in the top 25 only have around 250 votes or so,
but I think now I know why that is ...   Angry
13  Game Development / Game Play & Game Design / Re: Player sprite just doesnt move smooth? on: 2011-05-05 08:05:26
Quote
There's a discussion and a bug for it here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6378181
This bug should be in the top 25 now (it hast 43 votes, minimum is 42),
let's vote it up to the top
   
OMG, it looks like this bug has disappeared from the bug database ...

Last week I tried to vote for this bug, but the voting-process
looked broken then, the site was real sloooow and nothing happend
when voting.
Now I was attempting to try again, but the bug is no longer there ...
(The site says 'This bug is not available').

Does anyone remember the title or the keywords for this bug,
so we can search the bug database for it ?
14  Game Development / Newbie & Debugging Questions / Re: How to get folder paths inside a jar file? on: 2010-11-11 07:54:38
For resources in a JAR, you must use 'URL' instead of 'File'.

This snippet works with the IDE (Eclipse) and with a JAR :

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
URL urlClasses = getClass().getResource("");
String urlText = urlClasses.toString();  

String pathImages = null;
if (urlText.startsWith("jar"))
{  
  pathImages= urlText.replaceAll("abc", "images");
}
else if (urlText.startsWith("file"))
{
  int i = urlText.indexOf("classes");
  pathImages = urlText.substring(0, i) + "images/";
}
       
final String IMAGE = "myImage.png";

URL urlImages = null;
try { urlImages = new URL(pathImages + IMAGE); }
catch (MalformedURLException e) { e.printStackTrace(); }

// 'abc' is the name of the root-package,
// 'images' is the name of the resource-directory and is
// placed in the same directory as 'src' and 'classes'.
15  Java Game APIs & Engines / JInput / How to interpret rumblers ? on: 2010-02-02 07:19:12
I'm experimenting with the rumblers on my gamepad and when I 'read' the gamepad
with JInput, it finds 5 rumblers.

So I expected the gamepad to have two rumblers on each side and one in the middle.
However, that seems not to be true, because :

The rumbling always comes from one side,

If I let 3 or 5 rumblers rumble simultaneously, then the rumble is only a little bit
stronger than just one rumbler rumbling, not the expected 3 or 5 times stronger.

So I don't know what to think of this.  Huh
Can someone explain how to interpret the five rumblers ?
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.

toopeicgaming1999 (65 views)
2014-11-26 15:22:04

toopeicgaming1999 (58 views)
2014-11-26 15:20:36

toopeicgaming1999 (10 views)
2014-11-26 15:20:08

SHC (24 views)
2014-11-25 12:00:59

SHC (24 views)
2014-11-25 11:53:45

Norakomi (28 views)
2014-11-25 11:26:43

Gibbo3771 (24 views)
2014-11-24 19:59:16

trollwarrior1 (37 views)
2014-11-22 12:13:56

xFryIx (76 views)
2014-11-13 12:34:49

digdugdiggy (52 views)
2014-11-12 21:11:50
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!