I made this "2D Orbiter" at a game jam (also, it's open-source)

Bibi Uncle

50% Orbinaut, 50% Developer
Addon Developer
Joined
Aug 12, 2010
Messages
192
Reaction score
0
Points
0
Location
Québec, QC
The pink-red star is in fact the "big star". Much underwhelming and not deserving of its title? :lol:

Pixi.js was mostly a personal choice, I'm sure other libs would be just as appropriate. Pixi.js sells itself as the fastest rendering engine (and I bought into that, haha), and the API is similar to Flash (which I'm familiar with). I haven't thought of compatibility issues though, Pixi claims to support IE9+?

Pixi does support IE9 and higher, but in emulation mode (press F12, then Emulation on the left), IE9 and IE10 are giving errors. However, they doesn't seem to be related to Pixi. The error is with stats that is not initialized on line 1000 of app.js. I'll check your code when I'll have some time.

Edit:
I quickly checked your code. In your callback document.onreadystatechange (line 823), you first check the readyState. In the case of IE9 and IE10, your callback is registered too late (or maybe it's only in emulation mode, I don't have any machine running IE9 or 10), and the "interactive" state never happens.

Personally, I would use jQuery and write your initialization in $(document).ready(), in order to be completely compatible.

Second edit:
I forked your project on GitHub, fixed the issue and created a pull request. I added a dependency to jQuery. Your application now works with Internet Explorer 9 and higher.
 
Last edited:

RonDVouz

New member
Joined
Jul 28, 2014
Messages
164
Reaction score
0
Points
0
Pretty neat!

However, have you tried the Interstellar app? The game is very similar.
 

BruceJohnJennerLawso

Dread Lord of the Idiots
Addon Developer
Joined
Apr 14, 2012
Messages
2,585
Reaction score
0
Points
36
Thanks! Try doing a 48-hour sprint and force yourself to finish some part of it ;)

Aha, yeah, I recently had my first hackathon. Ill never forget thinking in the middle of it how much I missed the concept of sleep. Maybe over the Christmas break I could work with you on this via Github. I'll still need to learn more javascript before Im ready to tackle something like this.

Out of curiosity, you have your city listed as Waterloo, are you a student at Laurier or UW? If you're nearby, maybe we could get together to work on this sometime.

The path prediction works by just brute-forcing the physics engine 600 steps forward (I think?) and drawing the path of the rocket. It does that every frame, so if you fire thrusters the prediction updates instantly. Physics is just sum of forces (gravity + friction + collision), then Euler. Collisions with the surface is reflection of velocity vector times a restitution constant, so some energy is lost.

Ahh, so not conic sections, still that runs very smoothly for such a rough approach.

On the topic of planet motion, I think I may have a vector function for that in cartesian coordinates somewhere in my notes (or maybe a semi-complete C++ class, I'll have to look). I can try to look that up sometime this weekend, If you like.
 

Xyon

Puts the Fun in Dysfunctional
Administrator
Moderator
Orbiter Contributor
Addon Developer
Webmaster
GFX Staff
Beta Tester
Joined
Aug 9, 2009
Messages
6,920
Reaction score
787
Points
203
Location
10.0.0.1
Website
www.orbiter-radio.co.uk
Preferred Pronouns
she/her
Have box, can host, if you don't mind me putting a copy up?
 

cr1

Promoting vegetables in space
Joined
Apr 20, 2008
Messages
152
Reaction score
1
Points
18
Location
Zurich
Wow, never had a CPU run out on me before, as if it were fruit juice or something. Such free host. Thank you Xyon!

Meanwhile, I'm getting another host asap.
EDIT: http://zhaop.me/grav/ is working again! Moved to OVH.

@John Lawson, I am in fact in UWaterloo, came here for two exchange terms. Are you in UW as well? Did you go to Hack the North?
 
Last edited:

BruceJohnJennerLawso

Dread Lord of the Idiots
Addon Developer
Joined
Apr 14, 2012
Messages
2,585
Reaction score
0
Points
36
@John Lawson, I am in fact in UWaterloo, came here for two exchange terms. Are you in UW as well? Did you go to Hack the North?

Yep, Im a Geophysics student at UWaterloo. I went to MHacks this past September, but I completely missed Hack the North, probably the best for my sleep cycle & sanity anyways :lol:
 
Top