Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (526)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (593)
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  Game Development / Shared Code / Re: 2D Map editor on: 2009-12-03 15:26:41
Sorry didn't see your response till now and I also noticed i typo'd my e-mail.. it's gmail Smiley

The 4th layer for collision isn't a bad idea actually. But i would still need a way to do the "walk behinds" for larger tiles such as trees. This would work well for my large cliff tiles tho!
2  Java Game APIs & Engines / Java Sound & OpenAL / Re: Looping MP3 File on: 2009-11-28 19:13:43
Your source wasn't exactly complete. I found this online... It maybe be for school's site where they posted your project

http://www.cs.princeton.edu/introcs/faq/mp3/mp3.html

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  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
/*************************************************************************
 *  Compilation:  javac -classpath .:jl1.0.jar MP3.java         (OS X)
 *                javac -classpath .;jl1.0.jar MP3.java         (Windows)
 *  Execution:    java -classpath .:jl1.0.jar MP3 filename.mp3  (OS X / Linux)
 *                java -classpath .;jl1.0.jar MP3 filename.mp3  (Windows)
 *  
 *  Plays an MP3 file using the JLayer MP3 library.
 *
 *  Reference:  http://www.javazoom.net/javalayer/sources.html
 *
 *
 *  To execute, get the file jl1.0.jar from the website above or from
 *
 *      http://www.cs.princeton.edu/introcs/24inout/jl1.0.jar
 *
 *  and put it in your working directory with this file MP3.java.
 *
 *************************************************************************/


import java.io.BufferedInputStream;
import java.io.FileInputStream;

import javazoom.jl.player.Player;


public class MP3 {
    private String filename;
    private Player player;

    // constructor that takes the name of an MP3 file
    public MP3(String filename) {
        this.filename = filename;
    }

    public void close() { if (player != null) player.close(); }

    // play the MP3 file to the sound card
    public void play() {
        try {
            FileInputStream fis     = new FileInputStream(filename);
            BufferedInputStream bis = new BufferedInputStream(fis);
            player = new Player(bis);
        }
        catch (Exception e) {
            System.out.println("Problem playing file " + filename);
            System.out.println(e);
        }

        // run in new thread to play in background
        new Thread() {
            public void run() {
                try { player.play(); }
                catch (Exception e) { System.out.println(e); }
            }
        }.start();




    }


    // test client
    public static void main(String[] args) {
        String filename = args[0];
        MP3 mp3 = new MP3(filename);
        mp3.play();

        // do whatever computation you like, while music plays
        int N = 4000;
        double sum = 0.0;
        for (int i = 0; i < N; i++) {
            for (int j = 0; j < N; j++) {
                sum += Math.sin(i + j);
            }
        }
        System.out.println(sum);

        // when the computation is done, stop playing it
        mp3.close();

        // play from the beginning
        mp3 = new MP3(filename);
        mp3.play();

    }

}


3  Game Development / Shared Code / Re: Multiplayer Game on: 2009-11-28 18:05:11
FYI - Link is dead
4  Game Development / Shared Code / Re: 2D Map editor on: 2009-11-28 17:20:04
Hey Juddman,

First off thank you for the tool. I ended up using it as a starting point for a small RPG im working on and it gave me the motivation to actually start something and stick with it Smiley

I have a change to the application that I need make for my own purposes but I didn't know if you wanted to be involved in it as an additional feature to your application? I have a tile set that I'm using that has some tiles that are larger that the tile width and height( but still even multiples such as 64x64, 96x96), a tree for an example. Currently if I place that tree on layer two it will anchor to whatever tile i select and render accordingly. The problem come when you want the char to walk behind it. Obviously if hes below the the trunk of the tree you want him to rend on top of the tree but if he's above the the truck he needs to be behind the foliage. Obviously the truck should be the only tile that performs any collision detection as well. This problem worsen if your truck is bigger than that tile you selected then make collision detection even worse.

I don't have the code design yet but here's my solution (That may have some kinks that still need to be worked out). I was thinking of making some type of advanced tile pallet for your editor. Basically I could define a reusable "stamp" that would place the trunk on a defined layer in the selected tile have a defined type that tells the game it's not a traversable terrain (for collision detection) and then place the foliage on level 2 in their own tiles with their own defined types. So as a result when using these tiles from the "advanced Pallet" the tool would place multiple tiles that all have their own attributes.

The tree is the simple example. I have some elaborate cliffs that may be 3x3 in tiles and only one tile is a traversable terrain type but i would go nuts if i have to break out the cliff into 9 tiles! Smiley Buildings are another good example too

I would love to hear from you and your thoughts.  My email is Jeremy.R.Corson@gamil.com.
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 (72 views)
2014-11-26 15:22:04

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

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

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

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

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

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

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

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

digdugdiggy (56 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!