You mean the result of the.

 
Stuchlik: Tcsc: nooooo ha, so many comments :’

Branson: After you said that i thought

Zoquier: Should i even tell you?

Stuchlik: Oh I like the background, yeah always tell, wax off wax on etc etc

Colman: The main changes are in the update and collision resolution code

Rea: Sadly resolving the stability issues requires a good deal more code.

Batzer: It’s because i’m not really handing contact in a sane manner and contact is basically the whole reason that doing physics engines is hard.

Stuchlik: Yeah you’ve bumped the line count up. I was actually struggling to fit the original in my head so to speak whilst going through it.

Scallorn: It would be probably another 500 lines to fix the jitter

Stuchlik: Ha. it’s not you, it’s me 😛

Rumburd: Feel free to ignore this version if the other makes sense

Vanleeuwen: Take a look at the entity update code. thats the most important change.

Stuchlik: Yeah I’ll finish going through the other version then I’ve got this to look at after, win win

Kelcourse: Monomon, thank you so much. I don’t know how I missed that semicolon so many times, and can’t believe that’s what had been causing it.

Stuchlik: I like the little Const literal at the top, not sure if that’s some common thing or whatever, makes sense though

Charney: Baxx: sounds like a good plan.

Birdinground: Its not really common. i do it for small demos like this

Elleman: Noob321: rly? : great

Quach: It’s not really constant after i added the dat.gui controls though :p

Reidenbach: I also recommend running an editor that has static ****ysis, this could help catch things like that whilst still editing

Eastmond: Any plugin for jshint or jslint

Falso: Noob321: what editor do you use anyway?

Falson: Although i guess i could argue they’re still const since they’re the phyical constants that define how the simulation universe works

Stuchlik: This physics stuff *kills* my computer, not sure if that’s the same for all comps or what

Schwertfeger: Its not really optimized at all

Beraun: But i can do upto 300 entities at 60fps no problem

Celi: Monomon: I’ve been using Notepad and an about:blank console, lol.

Woudenberg: I have a newer laptop but it’s not that much of a beast

Stuchlik: Maybe I’ve just got some **** graphics drivers set up or something idk

Rudloff: Baxx: is the 2nd version faster?

Vanderboom: I optimized the rendering much more

Meyerhofer: Yep, working as intended now.

Gloyd: Thats the one that can do 300 entities.

Stuchlik: The mouse push is a satisfying surprise

Tharrington: Noob321: my solution is now complete, check it out. Especially look at how you create functions for things that you *want*, e.g. get a random item from these possibilities

Sour: I considered like, actually optimizing the update code, but then we’re getting into the territory of ‘is this code i care about’ and if it was i’d want to fix the simulation issues

Seard: I’m glad that it worked

Manring: Baxx: yeah it just felt like something that needed adding. it’s super hacky though

Stuchlik: Tcsc: I don’t think I’d be able to follow an optimised version

Lowder: No it would definitely be harder to follow

Stuchlik: Open controls ha, this ones super swish

Steines: Yeah, i used dat.gui for the controls

Garvie: Another thing that’s happening though, when I run the script in an about:blank console I get the intended string returned, but in JSBin there’s no output.

Colbaugh: Which meant those controls only took 10 lines

Mahi: You mean the result of the game?