Java-Gaming.org Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (777)
Games in Android Showcase (231)
games submitted by our members
Games in WIP (856)
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: Where can I find a simple, clean open-source PacMan? on: 2009-07-30 17:37:26
sry for the newby question, I am curious what exactly does you framework do?

It's not a newbie question, I purposefully withheld it when I wrote my posts Smiley I don't want to get scooped http://www.phdcomics.com/comics/archive.php?comicid=789, you see.

I won't tell you what it does, but I will tell you that it does it via reflection and accessing object methods, so a good architecture is important for it to work correctly. Some PacMac clones are written like they've been done in C, which makes it almost impossible for the framework to work.

I think I'm going to edit that JavaFX version back to POJO (Plain Old Java Objects) for the characters, and leave JavaFX on the GUI end and work with that.
2  Discussions / General Discussions / Re: Where can I find a simple, clean open-source PacMan? on: 2009-07-30 00:35:20
well ok, not sure i know of any good java pacman games that are open source, however there is one tutorial written for javafx, I know its rather different but should be pretty easy to convert to pure java, it can be found at http://www.javafxgame.com/how-to-write-pac-man-game-javafx/

Yeah, I found that one, and then considered killing a man when I found out JavaFX doesn't make Java readable objects easily, so my framework won't bolt on. You're right though, converting the code to Java might be the way to go. It's a good, simple implementation.
3  Discussions / General Discussions / Re: Where can I find a simple, clean open-source PacMan? on: 2009-07-29 23:55:10
Well you could just write one, if you can't find a clean open source version?

btw why do you need PacMan? is it for learning?

if you just need source code for learning the basics of how you would write a game in Java, I'd say have a look at the excellent Space Invaders tutorial over at http://www.cokeandcode.com/spaceinvaderstutorial its very good for learning.

There are good reasons I haven't stepped up and written one myself Smiley

I'm developing a new game framework for my research, and part of the story of my paper is to say "this works on games people have actually written, I haven't just written ones myself that happen to work with this thing." This ideally requires me to use others' code for it.

It's funny you should mention that Space Invaders game, as that is the first game I adapted to the framework, and it worked! I now need to take a step up in complexity, which is where PacMan came in. This has AI opponents, as well as movement constraints and such, that make it interesting. By complexity, I am specifically looking at the rules of the game. While say, Asteroids, can be quite complicated, much of it is a geometry problem, not a game design problem.

PacMan isn't a requirement, just something along that sort of complexity, with a recognizable game to someone who will never play it (they'll just read the paper). I've been trying to get PacDasher to work, but it's reliance on an old XML parser library that doesn't exist (JDOM instead of W3C DOM) means the entire XML parser would have to be rewritten to build, which is a pain, given that the code is already pretty complicated  Undecided
4  Discussions / General Discussions / Re: Where can I find a simple, clean open-source PacMan? on: 2009-07-29 23:21:39
Oops! Double post...
5  Discussions / General Discussions / Where can I find a simple, clean open-source PacMan? on: 2009-07-29 23:05:19
Hi guys,
I'm looking for a simple, good open-source object-orientated implementation of PacMan to modify for my PhD research (which will in turn be open-source). I've seen a couple of PacMac clones, which are either:

  • not open source
  • not OOP at all
  • overly complex (PacDasher, while a great implementation, has about 50 Classes files at a rough guess!)
  • incomplete

I've looked through the forums here, and while Millenium PacMan is great, it's not open-source, and a bunch of other ones I found were dead links.

I'm sure the people of the Java Gaming boards know of plenty of awesome PacMan games, but I'm having difficulty finding them!

Any and all help is very much appreciated!
6  Java Game APIs & Engines / Java 3D / Re: Cutting a hole out of bounds? on: 2004-03-17 10:19:20
Nothing weird, I'm using a SimpleUniverse construct. Thanks for the help. It's part of a group project which has to be in soon, so it'll have to go on the backburner. We'll use asteroids as obstacles for checkpoints instead, and if there's time at the end I'll go back and look if I can fix it.

Thanks for all your help,
Chris
7  Java Game APIs & Engines / Java 3D / Re: Cutting a hole out of bounds? on: 2004-03-16 20:07:23
Hey, cool! Thanks!

One slight...issue with this is that I now have a boot-up time of over three minutes, when just spawning one low-poly hoop  Shocked

Is this normal?!

Cheers
Chris
8  Java Game APIs & Engines / Java 3D / Cutting a hole out of bounds? on: 2004-03-16 18:40:40
Hello!
I'm trying to create an asteroid which the user has to fly the camera through. I'm able to correctly pick up collisions between the camera and the asteroid's bounds, but I don't see anyway of cutting a hole of of the bounds, to allow the user to fly through.

Is it possible to create a bounding with a section cut out of it? Is the only way to set-up a series of bounding boxes around the shape?

Thanks
Chris
9  Java Game APIs & Engines / Java 3D / Re: Collidable camera on: 2004-02-21 15:31:57
Thanks for the hint, Zingbat, but I'm still at square one. I think I've tried everything, attaching groups below the various viewers, setting platform geometry, using the setViewPlatformBehavior method (by extending ViewPlatformBehavior), manually pulling out the view platform transform group and attaching the collision detector to that... And still nothing  Embarrassed

From what I can tell, the way the J3D guys do it is by actually having a separate transform group to the view platform, and sending movement commands to that. Then a method is called every frame updating the view platform's position to that of the separate transform group.

Can anyone confirm that that is the quickest/only way to do this? Or, for that matter, I'm interpreting it correctly? I don't want to start coding all that stuff and find out that it's yet another avenue that I can't get to work. Surely there must be a better way than that. I'm loathe to use their code as this is an assessed university project, but if there's no other way there's no other way Sad

Any help would be seriously appreciated. I just broke my hand after punching the wall in frustration!

Ouch.

Chris
10  Java Game APIs & Engines / Java 3D / Collidable camera on: 2004-02-18 21:43:59
Hey there,
My 3D space game project has been going pretty well Cheesy
I've got a collision detector going on, and the TransformGroups in the game are bashing together quite happily. As the user is flying the ViewingPlatform, I need to stop them smashing into enemy ships with gleeful abandon. Unfortunately, the collision class doesn't seem to affect the ViewingPlatform, and I can't fathom it Huh

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
            /**
                  A straight simple universe isn't enough for our needs,
                  because we can't mess with the ViewingPlatform once
                  it's been made, so we need to make our own stuff
            */

            ViewingPlatform thePlatform = new ViewingPlatform();
           
            // Make the view platform collidable
        BoundingSphere viewBounds = new BoundingSphere();
        viewBounds.setRadius(20.0);
            thePlatform.setCapability(ViewingPlatform.ALLOW_COLLIDABLE_WRITE);
            thePlatform.setCollisionBounds(viewBounds);
            thePlatform.setCollidable(true);
            thePlatform.setCapability(ViewPlatform.ALLOW_BOUNDS_WRITE);
            thePlatform.setBounds(viewBounds);
            Collider viewWatcher = new Collider(thePlatform, viewBounds, this);
            thePlatform.setUserData("the player");
           
            Viewer theViewer = new Viewer(canvas);
           
            universe = new SimpleUniverse(thePlatform, theViewer);
       
        scene.addChild(viewWatcher);


I don't think the Collision class code will help, but I'll appened the post with it anyway.

Thanks guys, I know it's just a silly mistake I'm making Sad
Chris

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  
public class Collider extends Behavior
{
    private Node theNode;
    private Engine theEngine;
    private WakeupCriterion[] cases;
    private WakeupOr allCases;
   
    public Collider(Node inputNode, Bounds inputBounds, Engine inputEngine)
    {
        theNode = inputNode;
        theEngine = inputEngine;
        setSchedulingBounds(inputBounds);
    }
   
   
    public void initialize()
    {
        cases = new WakeupCriterion[3];
        cases[0] = new WakeupOnCollisionEntry(theNode);
        cases[1] = new WakeupOnCollisionExit(theNode);
        cases[2] = new WakeupOnCollisionMovement(theNode);
        allCases = new WakeupOr(cases);
        wakeupOn(allCases);
    }
   
    /**
     * Where the work is done in this class.  A message is printed out
     * using the userData of the object collided with.  The wake up
     * condition is then set to the OR'ed criterion again.
     */

    public void processStimulus(Enumeration criteria)
    {
        WakeupCriterion theCriterion = null;
       
        try
        {
            theCriterion = (WakeupCriterion)criteria.nextElement();
        }
        catch (NoSuchElementException e)
        {
        }
   
        if (theCriterion != null)
        {
            if (theCriterion instanceof WakeupOnCollisionEntry)
            {
                Node theLeaf = ((WakeupOnCollisionEntry) theCriterion).getTriggeringPath().getObject();
                System.out.println("Collided with " + theLeaf.getUserData());
            }
            else if (theCriterion instanceof WakeupOnCollisionExit)
            {
                Node theLeaf = ((WakeupOnCollisionExit) theCriterion).getTriggeringPath().getObject();
                System.out.println("Stopped colliding with " + theLeaf.getUserData());
            }
            else
            {
                Node theLeaf = ((WakeupOnCollisionMovement) theCriterion).getTriggeringPath().getObject();
                System.out.println("Moved whilst colliding with " + theLeaf.getUserData());
            }
        }
       
        wakeupOn(allCases);
    }
}
11  Java Game APIs & Engines / Java 3D / Re: Finding pitch, bank, heading from Matrix on: 2004-01-09 12:55:42
Thank you ever so much for your answer, Dom. I thought I was never going to recieve a reply Smiley

Isn't it amazing how problems look completely different given time and a little nudging? Cheesy Your reply was very well though-out, if only I could understand most of it! I'm afraid we haven't been taught anything about 3D in my Uni course yet. However, your mentioning of simply adding keyframes seems to be the trick.

Having spent 20-30 minutes just fiddling, this does seem to be the best way of achieving what I want. I hacked out the guts of my tweening function and replaced it with a basic array copy of the keyframes, shifting all of their knot values down by a half and then ramming in the new position the ship should be at at the end of the animation. Obviously, this currently looks rough as hell because the alpha values no longer align (setting the tweening anim to loop twice is a proof of concept) but I should be able to rig together a new alpha and then choose an appropriate time to force the alpha to start at, which should make the interpolator splice together the animations for me!

Thank you once again Dom, you're a star Cool
12  Java Game APIs & Engines / Java 3D / Finding pitch, bank, heading from Matrix on: 2003-12-31 14:31:07
Hi again Wink

I went ahead with Spline Interpolators and it's going quite well! I'm trying to find the heading, pitch and bank from the current Transform3D so I can pass them into the first key frame of my "tweening" interpolation. All the notes I've read show you how to set these values in the matrix, but I can't work out/haven't found anything to tell me how to get them out again. I find understanding the matrix pretty difficult!

Is it possible to get these values out? How can it be done with the least amount of Maths? (However, I will put in the hard yards if necessary!)

Thanks in advance Smiley
13  Java Game APIs & Engines / Java 3D / Re: Just starting... on: 2003-12-31 12:28:13
Hey. I'm the same as you, although I have only been working on Java for 10 months, I've been working on it as part of my University Comp Sci course. I never knew that boring XML node traversal would actually work out being useful!

I've used the Java 3D Jump-Start book to get me up to speed, and it's very good indeed. I feel very confident about the theory of J3D. Unforunately, it does kind of leave you high and dry just when things start to get interesting. It hand-holds you through making a scene and such, but just when it seemed like the perfect book, it gives up when you'd like to be able to make the scene start doing things!

I've managed to pull myself through to a point where I've got an object following a spline path (the J3D examples package is quite invaluable, you'll need to download that yourself if you're on Mac OS X), but there are a lot of gotchas on the way that you really aren't told about, (like the universe seems to be limited to the size of your bounding spheres, and I had a nightmare with alpha objects last night) and a lot of things where you try and guess what the best thing is to do (like dynamic movement, I'm doing it with tweening interpolators in a Flash type way. Might not be the best way).

If anyone could recommend a book which explains this stuff well if would be invaluable to you (and me!), the Interweb doesn't pull up much unfortunately...
14  Java Game APIs & Engines / Java 3D / What's the best way to move stuff around? on: 2003-12-29 11:31:32
Hello there, sorry to be back again with another (stupid?) question.

Now I have my wonderfully large void (thank you Endolf!) to play in, I've been whizzing my ships around the universe.

Are interpolators the best way of doing dynamic movement, ie changing animations half-way through and such (coming from an external AI class)?

Thanks in advance for any help you can give me, it is appreciated very much.
Chris
15  Java Game APIs & Engines / Java 3D / Re: Newbie Universe Size Question on: 2003-12-26 19:28:16
Thanks a lot for your help, you've been really great.

After spending another couple of hours bashing through all the permutations of the universe, I finally found a solution!

With your advice, I set the back clip distance to 2000m, which is a fair way. I'll do more through testing in the bounds of the recommended <= 1000m. No luck. I pulled the viewer back to 1999m and turned the background into wireframe mode. I could see the objects! I began to sob ever so slightly as it occured to me that the universe must be less than 2000m radius. I tried for another hour experimenting and was almost about ti give up. I then noticed something in the Key Navigation class I'd set up; it was using the branch group bounds, which I remembered was optimised so it bounded over only what was necessary (which explains why I could fly outside of the limits of control and have zero response!) I set the bounds to Double.MAX_VALUE and hey presto! It works! I can fly around all merrily and see the objects from miles off!

I suppose Java3D itself reduces the boundaries of the universe inkeeping to how big it feels it should be. Because my Key Navigator was set as the too small branch group, I think Java3D used the too small branch group as the bounds.

Hope you feel better soon! I know I certainly do!

Chris
16  Java Game APIs & Engines / Java 3D / Re: Newbie Universe Size Question on: 2003-12-22 22:40:02
Thank you for your reply!
Yes, I am currently using a sphere as my background geometry:

1  
2  
3  
4  
5  
6  
7  
8  
9  
        Background bg = new Background();
        bg.setApplicationBounds(infiniteBounds);
      BranchGroup backGeoBranch = new BranchGroup();
        Sphere sphereObj = new Sphere(1.0f, Sphere.GENERATE_NORMALS |
                            Sphere.GENERATE_NORMALS_INWARD |
                          Sphere.GENERATE_TEXTURE_COORDS, 45);
        Appearance backgroundApp = sphereObj.getAppearance();
        backGeoBranch.addChild(sphereObj);
        bg.setGeometry(backGeoBranch);


ripped from the Java3D examples themselves Cheesy
Thank you for the link, it was helpful in explaining the problems.
Could you point me to how exactly I could look into simulating a larger environment? I'm currently being restricted by the way I'm trying to solve the problem. The universe is a unit sphere, I can only resize models to a specific point, but other games have demonstrated that the percievable universe can be larger than what I am currently achieving.

Please flame me if I'm being stupid Wink
17  Java Game APIs & Engines / Java 3D / Newbie Universe Size Question on: 2003-12-22 12:50:19
Hello,
I wasn't sure whether to put this in Newless Cluebies or not, please accept my apologies if I'm wrong Smiley

I'm currently taking my first steps with Java3D in the creation of a basic 3D space game. I've been quite successful in getting everything loaded up and twiddling around with the materials from Maya .obj exports etc.

I'm currently working with the translation classes, and realised that my ship quite happily travelled out of the spherical universe textured with a space picture. "Alright then, I'll make the universe bigger!" I replaced the 1.0f radius with Float.MAX_VALUE (I have no respect for my computer) and it happened again. I've hunted through Google to affirm my suspision that the sphere's maximum radius is 1.0f, but I've not found anything to confirm or deny it. Am I correct in this?

If so, how does one create a large expanse to work with? I tried working the other way, and scaling down my models. Which works up to a point, and then Java3D seems to kind of give up and go "That's as small as it's getting!" Slapping a couple more zeros in the decimal place of my scaling Transform3D stopped having an effect after a while Smiley Unfortunately, my universe still isn't big enough Sad

Is it impossible to have a sphere bigger than radius 1? Is there a better way of texturing the background that will allow me to have my massive void? Should I give up and simply fly around a big black place? "Well, yeah, it's a game set in a black hole. They're damn black you know. How do you know you can't see light off objects when you're in one? Have you ever been in one?!" Might work Cheesy

Thanks for any help you might be able to give me,
Oh, and Merry Christmas/Hanukkah,
Chris
Pages: [1]
 
hadezbladez (292 views)
2018-11-16 13:46:03

hadezbladez (162 views)
2018-11-16 13:41:33

hadezbladez (293 views)
2018-11-16 13:35:35

hadezbladez (73 views)
2018-11-16 13:32:03

EgonOlsen (2154 views)
2018-06-10 19:43:48

EgonOlsen (2181 views)
2018-06-10 19:43:44

EgonOlsen (1368 views)
2018-06-10 19:43:20

DesertCoockie (1985 views)
2018-05-13 18:23:11

nelsongames (1628 views)
2018-04-24 18:15:36

nelsongames (2275 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46
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!