Show Posts
|
|
Pages: [1]
|
|
1
|
Discussions / General Discussions / Re: What is your favorite layout?
|
on: 2011-12-21 12: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.
|
|
|
|
|
3
|
Discussions / General Discussions / Re: Oh so true....
|
on: 2011-11-19 08: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 ... 
|
|
|
|
|
5
|
Discussions / General Discussions / Re: Still hardly any games, why entity systems suck, and why 4k is good
|
on: 2011-11-17 12: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.
|
|
|
|
|
7
|
Java Game APIs & Engines / Java Sound & OpenAL / Re: How to play a OGG-file ?
|
on: 2011-08-31 21: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 = 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 14:24:09
|
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.  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. :-)
|
|
|
|
|
10
|
Java Game APIs & Engines / Java Sound & OpenAL / How to play a OGG-file ?
|
on: 2011-08-31 08: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 08: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 ?!  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 16: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' ...)  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 ... 
|
|
|
|
|
13
|
Game Development / Game Play & Game Design / Re: Player sprite just doesnt move smooth?
|
on: 2011-05-05 10:05:26
|
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 08: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(); }
|
|
|
|
|
|
15
|
Java Game APIs & Engines / JInput / How to interpret rumblers ?
|
on: 2010-02-02 08: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.  Can someone explain how to interpret the five rumblers ?
|
|
|
|
|
|
Add your game by posting it in the WIP section,
or publish it in Showcase.
The first screenshot will be displayed as a thumbnail.
|
|