Sign in to follow this  

Interesting animation issue

Recommended Posts

Stainless    1875

I've been writing a tool for testing mods for a flight simulator, it's gone well and I can handle all the basic functions.


The problem is animation.


In the game they use a java class for each plane. This has methods like moveGear, moveBays, etc. 


moveGear animates the landing gear, moveBays animates the bomb bay doors, you get the idea.


I have written the app in C# using XNA as a renderer in a winforms application.


My initial idea to handle animation was to parse the java source code into C#, replacing calls into the game engine with my own functions and compiling the generated C# class on the fly.


This worked for the plane I was using as a test case, but doesn't work as a general solution. Every java coder writes code in a slightly different way, there's issues with inheritance, oh man so many problems.


I'm thinking about embedding a JVM into the app and running the java class without editing. With this in mind I have hacked out all the java classes from the actual game. So it would be feasible to run the java.


I haven't got any clue how I would extract the animation data from the java and into my code, but that's a problem for the pub.


Anybody got any better ideas?


It would be a pity to only do half the job, and just looking at a static mesh isn't as much fun as animating it.




Share this post

Link to post
Share on other sites
Stainless    1875

yes, that's what I was thinking.


complicated to get the data back from java to my code though.


need beer to think about it.... should that be 'time' ?

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this