Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (109)
games submitted by our members
Games in WIP (536)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Kinetix - 2D physics engine  (Read 8321 times)
0 Members and 1 Guest are viewing this topic.
Offline ryanm

Senior Member


Projects: 1
Exp: 15 years


Used to be bleb


« Posted 2003-01-27 12:47:19 »

can be found here

http://www.homepages.inf.ed.ac.uk/s9902505/

I haven't tested the link from outside uni though, so there may be some permissions fiddling needed.

Please have a play with it and tell me what you think.

It works best on linux, thanks to millisecond accuracy on the timing.  It will still work on windows, just not as smoothly.
Offline Herkules

Senior Member




Friendly fire isn't friendly!


« Reply #1 - Posted 2003-01-27 13:51:17 »

?? What to do? I have just a dialog with a disabled 'Simulator' menu.
If I enlarge the dialog and click into it, thats what I get:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
java.lang.NullPointerException
        at ryanm.kinetix.editor.MouseAdjudicator.mouseReleased(MouseAdjudicator.java:74)
        at java.awt.Component.processMouseEvent(Component.java:5093)
        at java.awt.Component.processEvent(Component.java:4890)
        at java.awt.Container.processEvent(Container.java:1566)
        at java.awt.Component.dispatchEventImpl(Component.java:3598)
        at java.awt.Container.dispatchEventImpl(Container.java:1623)
        at java.awt.Component.dispatchEvent(Component.java:3439)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3165)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
        at java.awt.Container.dispatchEventImpl(Container.java:1609)
        at java.awt.Window.dispatchEventImpl(Window.java:1585)
        at java.awt.Component.dispatchEvent(Component.java:3439)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Offline Herkules

Senior Member




Friendly fire isn't friendly!


« Reply #2 - Posted 2003-01-27 13:54:57 »

Ah, better after using the 'New...' menuitem.

But still nothing I can do. Can select tools or modify body options, but what are they for??

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ryanm

Senior Member


Projects: 1
Exp: 15 years


Used to be bleb


« Reply #3 - Posted 2003-01-27 14:15:07 »

there are some instructions on the download page, but anyhoo...

get a new simulation by selecting "file" -> "new".  Set the desired size and click "ok".  The editor window should resize to accomodate a white panel.  This is the simulation.

To add a new body into the simulation, select the "Armour" tool and left click on the white panel where you want the vertices of your body to be.  A green outline will show your progress so far.  When you've added all the vertices you want, finish the body with a right-click.  The green outline should become black.  NB: you must have at least 3 vertices.  and you should avoid self-intersecting shapes.

If you are not happy with the position of your body or it's vertices, you can drag them around with the "grabber" tool.

You now have an unstructured body that will flop around uselessly.  To make it more interesting, add some structure to it using the "stick", "bumper", "rope" and "spring" tools by dragging between two vertices of the same body.  A black line should appear showing the constraint.  The shortcut to a rigid body is simply to right-click on it and select "rigidify".  You can view any constraints of a particular type by selecting the appropriate tool.  They will appear as black lines.

You should now have a rigid body.  Make the simulation more interesting by increasing the gravity and perhaps raising the water level from the environment control panel, accessible from the "Simulator" menu

The body options panel on the main editor window allows you to set the attributes of any new bodies you create.  You can alter the attributes of existing bodies by right-clicking on them and selcting "Options".

When you are done editing your simulation, you can run it with "Simulator" -> "Run Simulation" and save it with "File" -> "save".
Offline Herkules

Senior Member




Friendly fire isn't friendly!


« Reply #4 - Posted 2003-01-27 15:45:56 »

Quote
there are some instructions on the download page, but anyhoo...


Yes, I know. I can read (actually I even have a academic degree).

Quote

To add a new body into the simulation, select the "Armour" tool and left click on the white panel where you want the vertices of your body to be.  A green outline will show your progress so far.


No, this doesn't happen. The panel is white and remains white.


HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Offline ryanm

Senior Member


Projects: 1
Exp: 15 years


Used to be bleb


« Reply #5 - Posted 2003-01-27 16:10:11 »

Quote

Yes, I know. I can read (actually I even have a academic degree).


Sorry about that, but I've also sent this to my brother, who apparently has a phd, and he needed spoonfeeding every step of the way.  Roll Eyes

Quote
No, this doesn't happen. The panel is white and remains white.


Well shit.  Once again I am forced to say "Write once, run anywhere, my hairy ass". Angry
It sounds like the MouseAdapter is broken in some way.

Is anyone else having this problem?  The jar works for me on my laptop and on the uni computers, both running linux with Java 1.4.0 and 1.4.1 respectively

What is your platform / JVM ?

There are some sample xml files available at the same URL as above, you could try to load those and see if there's any joy.  
Offline Herkules

Senior Member




Friendly fire isn't friendly!


« Reply #6 - Posted 2003-01-27 16:21:30 »

Hm, the more often and the harder I try, the more successful I am! Meanwhile I managed to set green points (sometimes with a fast doubleclick, sometime with singleclick) that even appear near to the mouse position, estimated 30pixels to the upper left Smiley

And I could create an exception with the right mouse button:

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  
java.lang.ArrayIndexOutOfBoundsException: 13
        at ryanm.kinetix.Armour.getDirection(Armour.java:118)
        at ryanm.kinetix.Armour.<init>(Armour.java:85)
        at ryanm.kinetix.Body.<init>(Body.java:86)
        at ryanm.kinetix.editor.MouseAdjudicator.mouseClicked(MouseAdjudicator.j
ava:175)
        at java.awt.Component.processMouseEvent(Component.java:5096)
        at java.awt.Component.processEvent(Component.java:4890)
        at java.awt.Container.processEvent(Container.java:1566)
        at java.awt.Component.dispatchEventImpl(Component.java:3598)
        at java.awt.Container.dispatchEventImpl(Container.java:1623)
        at java.awt.Component.dispatchEvent(Component.java:3439)
        at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3450)
        at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3174)
        at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3095)
        at java.awt.Container.dispatchEventImpl(Container.java:1609)
        at java.awt.Window.dispatchEventImpl(Window.java:1585)
        at java.awt.Component.dispatchEvent(Component.java:3439)
        at java.awt.EventQueue.dispatchEvent(EventQueue.java:450)
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:197)
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:150)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
        at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
        at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)


So it works - somehow.

I have w2k, jdk1.4.1_01.

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Offline ryanm

Senior Member


Projects: 1
Exp: 15 years


Used to be bleb


« Reply #7 - Posted 2003-01-27 17:38:51 »

Right, there's a new version up now that shouldn't have that ArrayOutOfBounds exception.  It would only have appeared if you had all of your points in a line, but it shouldn't have slipped through the testing net.

Thinking about it a bit more, it might be the VolatileImage code that is exhibiting platform dependent behaviour, since there's all that "possible loss of image contents" kafuffle on Windows.  I thought that copying the code from the VolatileImage API docs would cover me on both platforms, but apparently not.  So in reality (possibly) you are creating points, you just can't see them.  Which is unhelpful.  Thus, next on the bug-fix list is moving back to nice, dependable BufferedImages.

Quote
30pixels to the upper left

There's a "Snap to grid" option in the File menu that's on by default

thanks for your time Herkules, I promise that there's somthing fairly cool at the other end of this compatability hell.

I'll download JDK 1.4 for win98 when I get home.  If anything can break my code, it'll be good old 98. Wink

I don't know what to be more disappointed with, Windows or Java... :-/
Offline ryanm

Senior Member


Projects: 1
Exp: 15 years


Used to be bleb


« Reply #8 - Posted 2003-01-28 10:36:30 »

Ok, there's a new jar up at the above address that might be more successful on windows platforms.  The drawing was about 60% slower :-/ when i tested it, but nevermind.  It will also print out information on stdout about mouse events, so i you are clicking on the simulation panel and nothing comes up on stdout, let me know.  If you do see the mouseClicked events appearing and still no green points, I'm not sure i want to know Sad, but tell me anyway.

As far as i can see, that covers the only two bits that could be in any way platorm specific.

Here's hoping...
Offline Herkules

Senior Member




Friendly fire isn't friendly!


« Reply #9 - Posted 2003-01-28 10:55:28 »

Maybe I've catched the problem. It seems that NO point is set when mousePressed and mouseReleased occur not exactly on the same mouseposition? This is a hard restriction bc. pressing or releasing the button often moves the mouse as well (esp. with high-res optical mice we have today).

Taking this as an hypothesis, WinKinetix.jar and Kinetix.jar behave identical.


HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline ryanm

Senior Member


Projects: 1
Exp: 15 years


Used to be bleb


« Reply #10 - Posted 2003-01-28 11:02:26 »

That could easily be it.  I've been testing it with a touchpad and a fairly crap, sticky-as-hell mouse.

Unfortunately, this is just the way that MouseEvents work  Sad

Ok, next up is a version where all the mouseClicked code is triggered on a mouseReleased event.

I'll have to do it later on though, watch this space...

btw, was the volatileImage displaying correctly? can i go back to the speedy rendering code?

Cheers
Offline Herkules

Senior Member




Friendly fire isn't friendly!


« Reply #11 - Posted 2003-01-28 11:04:54 »

No difference in display.

Why not use mouseClicked? Or ONLY mouseReleased or ONLY mousePressed? Never have seen problems like that....

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Offline ryanm

Senior Member


Projects: 1
Exp: 15 years


Used to be bleb


« Reply #12 - Posted 2003-01-28 11:16:58 »

Quote
Why not use mouseClicked?


I am, mouseClicked is used to add new points to an armour or to bring up the context menus.

mousePressed and mouseReleased are used for adding constraints or dragging objects and vertices around.

Unfortunately, it seems that a mouseClicked event is not generated if the corresponding mousePressed and mouseReleased events do not occur in the same place.  Developing with a touchpad never exposed this limitation.

Good to know about the display though.  VolatileImages, all is forgiven.  BufferedImages, don't show your slow-as-hell face around here ever again, or at least until i want direct pixel access. Roll Eyes
Offline ryanm

Senior Member


Projects: 1
Exp: 15 years


Used to be bleb


« Reply #13 - Posted 2003-01-28 15:40:33 »

There we are, the new version only uses mousePressed and mouseReleased, so those of us with nice hi-res mice and monitors can now have full functionality without entering a zen-like trance of absolute muscle control.

By the way, it seems that mouseClicked events are only generated when the mouse is pressed and released on the exact same pixel. Which seems a bit harsh to me.  Ah well, it's all a learning experience...
Offline swpalmer

JGO Coder




Where's the Kaboom?


« Reply #14 - Posted 2003-05-26 16:43:25 »

Could you please refrain from posting porn on this message board?

Your posts would also be less offensive in general if you simply stopped changing the the font and double spacing everything.

Is that too much to ask?

Offline ryanm

Senior Member


Projects: 1
Exp: 15 years


Used to be bleb


« Reply #15 - Posted 2003-05-26 16:46:08 »

In answer to your questions:

1) probably, but it'll take time that currently i require to write my final year dissertation.  Besides, all you need to do is download the jar and run it.

2) Not at the moment, I really just made the physics engine for a 2-d game i am making.

3) Nope, just unnecessary in a 2D game.

4) very nice

Quote
I want my VRML H-Anim Avatars to obey the  Laws of Physics !


The Kinetix system is based on a technique used for animating bodies, so you may find this paper useful.

Quote
I like playing ping-pong with beautiful nude blond girls and want to make java game of that too.


... indeed ...

I would have to say that much of the appeal of the aforementioned activity would be lost in the transition to a computerised form, but hey, however you get your jollies...  

For ping-pong, you would only need to simulate a large particle (the ball) bouncing off flat surfaces (the table, the bats). A full rigid-body simulator might be a bit of overkill.

Quote
I like your penguin.


Why thank you.
Offline Vrml_Java_Animator

Senior Newbie




Web Animation with VRML, &nbsp;Java3d &amp; pure Java


« Reply #16 - Posted 2003-05-26 18:56:51 »

Thank you.

 Your answsers beg for clarification & more wisdom ...  ( 2 questions ) ...

1)

  Most applications can run as applets with trivial modifications.

  Mostly I write mine to run as both.

   If you're not writing anything to disk, I wounld't think any re-write would be required,
and if something has to be written to disk ... external Java Servlets can do that for you.

  I'm trying to understand and help.

  Part of the magic of Open Source is ... having other people do your work for you ...  ;^)

  Maybe someone here has the web services it would require !

   Is there any resource you need that the security sand box locks out ?


   Part of Java Gaming is getting people to play the games.

   Part of making Java Gaming successful is removing the unnecessary
 obsticales to the game play: including unnecessary download & installs.

  I have a 3d, multi-player, netwoked tank battle first - person - shoot game ...

      it runs as either an applet or application.
   
                                                                                                    [   This space intensionally left blank   ]  


2)  Can your 2d Physics Engine handle the 2d Physics Problem of the ping-pong ball ?

   You answered your engine was  " 2d only " ... I understand.

   I can isolate a planar slice of my 3d world ...
   I can protect my girl & the ping-ball from cross winds ...
   I can reduce the 3d problem space of the ping-pong ball to a 2d problem space.
   I can do all that ...

so can your software handle the 2d Physics of the ping-pong ball traveling through the 2d planar suface of it's trajectory ?

  Hitting the table is still a 2-d problem ( or is by definition of the implementor  )

  It's only when the ball is struck by a player's paddle that the 3d has to re-emerge,
and I could compute the translation between the old 2d plane & the new one.

 The ping-pong game was chosen for a good reasons,

  It should be easy, and Sun already provides a simple demo.

  The game can be contrained so the players can't hit the ball until
it passes through a plane parallel to the end of table end ( one for each player )

 So once a ball is hit, it is out of action, until a known interval of time has passed,
and you know where its terminal position will be, and when,
so you can go away and do other things until that time arrives.

Make games hard for the player, make life simple for yourself.

  - - - - - -
 
  I haven't tried your program yet, but it definately on my " to do " list.
   
  What distro are you using ?   (*)

  Thank you,

          Sincerely,

  -- Paul, Java Developer & Web Animator
 -------------------------------------------------
Imaging the Imagined: Modeling with Math & a Keyboard

 (*) Inside Linux Speak for:  You upgraded from Microsoft Ce-Me-NT  to which Linux distribution ?


Imaging the Imagined: Modeling with VRML, Java & Math
-------------------------------------------------------------------
Offline ryanm

Senior Member


Projects: 1
Exp: 15 years


Used to be bleb


« Reply #17 - Posted 2003-05-26 19:15:59 »

Yeah, it wouldn't be hard to write an applet that will bring up the editor window, but this would preclude the possibility of loading and saving simulations.
The editor is not really an end in itself, but simply a framework to demonstrate the simulation technology. As such i can't really be arsed messing around with servlets and such to let people use it seamlessly over the web.   The jar file is all self contained, so installation involves nothing more than saving the jar and running "java -jar Kinetix.jar".

Back to ping-pong...

I don't really feel that this engine is the best fit for your problem.  Ping-pong is just interactions between spheres and planes, which is quite simple to model

Off the top of my head:

whenever the center of the ball gets to within the ball's radius of a plane, invert the component of the ball's motion that is perpendicular to the plane.

This will model interactions between the ball and table, you'll need too add something more to simulate moving planes (bats).

You can model this quite easily in 3D, with no messy slicing into 2D necessary.

I use Mandrake, for no other reason than my flatmate had the installation disks, although i am jealous of debian's "apt-get" loveliness.
Offline Vrml_Java_Animator

Senior Newbie




Web Animation with VRML, &nbsp;Java3d &amp; pure Java


« Reply #18 - Posted 2003-05-26 20:20:51 »

Quote
[size=4]|
|   Could you please refrain from posting  porn  ...  ?
| [/size]

 http:// http://www.JavaGaming.org/JGOForumImages/avatars/linux.gif
 
 [size=2]

Are you complaining about ...

 the legs spread full frontal shot of JavaGaming's Penguin ?

 If you had a body & got some action,

                  ... you woundn't be so uptight.


                                                              ... or ...  [/size]  


  [size=4]
 
   Her forehand is foreplay for you ?  [/size] [size=2]

   There's more, it gets better ...

   Just wait for puberty !

   Think contact sports !
 
   Touchdown !

   Ooooh !

   Ah !            [/size]  
 


Imaging the Imagined: Modeling with VRML, Java & Math
-------------------------------------------------------------------
Offline Backmask

Junior Member




586: The average IQ needed to understand a PC


« Reply #19 - Posted 2003-05-27 06:57:26 »

ahhh... I can't hold it inside of me anymore.... But I will try to be civil...

Vrml_Java_Animator
First of all, no nude womens on these forums. Even if women's are the most beutiful things on this universe (and I am not taking about a j3d univerise with vrml loaders). These forums are about Java Gaming (no nude women forum yet, but if such is added feel free to post your porn collection there).

Also you must start to learn to respect people other than yourself. Most people learn this in an early age, but it seams like you missed that part.

Have you noticed that I am NOT using any large fonts, no extra spaces and still you can read this? amazing isn't it! So please, cut down your post by not repeating what you already said and try to use the same font in your posts (that is use the standard font).

This is my third complete rewrite of this post, the first started with to many hard words so I couldn't bare myself to post it. The second was abit better but still had references to mental institutions. The third, the one you are reading now, is how post should look like. A polite try to get you to understand that personal attacks, ugly post and other inmaturity isn't appreciated here. So please stop with this and try to act as a normal mature man. Please!

*Edit*
Typos

Offline erikd

JGO Ninja


Medals: 16
Projects: 4
Exp: 14 years


Maximumisness


« Reply #20 - Posted 2003-05-27 07:45:25 »

Quote
I like playing ping-pong with beautiful nude blond girls and want to make java game of that too.
...

Quote
the legs spread full frontal shot of JavaGaming's Penguin ?
...


oh... my.... *GOD*!  Shocked
Please stop, you're giving me nightmares  Roll Eyes

Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #21 - Posted 2003-09-30 12:32:05 »

Deftly trying to resurrect this after its been tainted by our resident internet kook, I'm interested in using this in my own project..

How would I go about actually adding it to my own work? You've described it as an 'engine' so i'm assuming you've designed it with reuse and flexibility in mind (and the demo does seem pretty powerful Smiley ).

What about only applying the physics to a subset of my game objects? I'm thinking about mixing custom behaviour and the Kinetix physics, so things like bullets, players etc. can be controlled by simple rules but interact with the rest of the objects in a realistic way..

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline ryanm

Senior Member


Projects: 1
Exp: 15 years


Used to be bleb


« Reply #22 - Posted 2003-09-30 13:30:16 »

howdy,

I think that the crazy-radiation levels that impregnated this thread have decayed to background norms, so...

Before i start, i should say that the version i left on the web is now somewhat out of date, having languished due to the lack of apparent interest ( mumblemumblebastardsmumble ). The latest version has some useful improvements:
- automatic rigidification is now vastly more intelligent, uses less constraints and generates more stable bodies
- an architectural tweak that allows clouds of unconstrained particles, ideal for use as bullets
- you can now query constraints in order to assess how much strain they are under, useful for calculating damage to objects

These were all prompted when i stopped living in clean-design-world, and attempted to actually use the bloody thing. I'll upload the newest version and the "game" i made later on tonight.

Quote
How would I go about actually adding it to my own work?


The two approaches that i can think of are...

1) subclassing the Kinetix entities so that your game objects are Bodies and your bullets are Particles etc.

This is good because their physical behaviour will just happen naturally, and any additional behaviour can be added in the subclassing.

This is bad because you game objects will have to live and move entirely in the Kinetix environment, so you would have to be careful about how you make your game entities move about. Simply setting their positions would introduce arbitrarily large forces into the simulation.  
For example, in the game i made, instead of simply setting the ship's angle every frame, i had to simulate the action of the ship's engines by giving the ship a rotational acceleration.  This made controlling the ship extremely difficult, so i then had to add the steering arrow and let the game decide which way to accelerate.

2) Run the simulation seperately from your game, and have some kind of linkage layer between the two that reflects events in one side onto the other.  For example, if the game component decides that a rock has been hit by a bullet, the linking layer would then apply an appropriate force to the body representing the rock in the Kinetix simualtion. Conversely, the Kinetix component would then update the game component with the position of the rock in every frame.

This is good because it allows for applying the simulation to a subset of game objects. You could also swap out the Kinetix component for another physics engine (as if you'd want to! Wink) without too much hassle.

This is bad because of the added overhead of the linking layer, and it's not a particularly tidy solution.  You also have to be careful about synchronizing the states of the two components, making sure each entity is properly matched with it's peer, etc.

Perhaps that's enough to be going on with for now, what kind of game were you thinking about doing?

Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #23 - Posted 2003-09-30 13:55:43 »

I'd be interested in seeing the game you've made with it Smiley

Basically I'm working on a 2d game engine, with the emphasis on some heavy customisation via scripting. Ideally I don't want to spend ages on the collision detection and reaction for solid object, and focus on the reactions when non-solid objects interact (like players hitting door triggers, bullets shattering glass etc.).

Bear in mind i'm after something game-independant (as far as possible). Something like pong could be done totally with the rigid body interactions, but for something like a platform game you need a much more arcade-y feel to the player controls.

Is there some way I can 'drive' the simulation from my own app? Like create a mirror of the game level in Kinetix, and tell it to update its positions every game frame? Then i could pull out the data again and use it for actual rendering and any other game events that would be affected by it.The subclassing idea sounds possible but could introduce all sorts of headaches. Can objects not be set via code in an absolute way (as in, ignore physics and just set the position/angle/etc. straight off?)

Cheers Smiley

[ TriangularPixels.com - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline ryanm

Senior Member


Projects: 1
Exp: 15 years


Used to be bleb


« Reply #24 - Posted 2003-09-30 14:55:13 »

Quote
Is there some way I can 'drive' the simulation from my own app?


Absolutely.  Once the simulation has been set up all you need to do is call simulation.runTime( millis ), and kinetix will go off and run the appropriate number of iterations internally to update the the simulation with respect to time.

Quote
create a mirror of the game level in Kinetix, and tell it to update its positions every game frame? Then i could pull out the data again and use it for actual rendering and any other game events that would be affected by it.


Yeah, that's what i was trying to convey with aproach number 2 above, and it seems the best way forward for your purposes.

The subclassing approach is kind of a masochistic way to make a game, but appropriate for the idea i had.

Quote
Can objects not be set via code in an absolute way


There's no real problem with this, you just have to be a bit careful about collisions occuring when you do it.  Setting the position of bodies explicitly is somewhat analogous to, in the real world, the Hand Of God(tm) reaching down and playing catch with a mountain.  Sure, the mountain is going to be moved, but innocent bystanders are hoping that the almighty isn't careless as millions of tonnes of rock and a few startled goats flick past overhead.  Smiley

I'll put the game up when i get home and net access is cheap.

Kinetix was developed as part of my final year project, so i'll also put up the report i wrote on it, which should gives some more background.  It'll take a few minutes as i regnerate all the image postscripts.

Edit : actually, scrap that.  The university has just updated the system and so inevitably what was once easy has become nigh-on impossible.  Useful latex compilers and dvi viewers have disappeared for now it seems :-/ So for now, no report.
Offline ryanm

Senior Member


Projects: 1
Exp: 15 years


Used to be bleb


« Reply #25 - Posted 2003-09-30 19:08:28 »

There you go, the kinetix editor is now up to the latest version and the game is also available from

http://www.homepages.inf.ed.ac.uk/s9902505/
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

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

The first screenshot will be displayed as a thumbnail.

CogWheelz (18 views)
2014-07-30 21:08:39

Riven (25 views)
2014-07-29 18:09:19

Riven (15 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (33 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (43 views)
2014-07-24 01:59:36

Riven (43 views)
2014-07-23 21:16:32

Riven (30 views)
2014-07-23 21:07:15

Riven (31 views)
2014-07-23 20:56:16
List of Learning Resources
by SilverTiger
2014-07-31 18:29:50

List of Learning Resources
by SilverTiger
2014-07-31 18:26:06

List of Learning Resources
by SilverTiger
2014-07-31 13:54:12

HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54
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!