« first day (1465 days earlier)      last day (3371 days later) » 
00:00 - 21:0021:00 - 00:00

9:00 PM
is the acceleration constant?
 
what about ramming?
shooting bullets with other bullets!
 
@MartinBüttner Yes. The hovercraft fans are at a certain constant strength that changes upon command.
 
Can I shoot the bullets in a curve? :)
 
I'm in favor of a physics-based challenge
 
@PhiNotPi Δx = (1/2 a Δt + v_0) Δt
 
9:02 PM
Can I name my hovercraft Neo?
 
The problem is that there is angular acceleration and "linear" acceleration happening at the same time.
@Rainbolt sure
 
these should be independent of each other, provided the angular acceleration is applied about its centre of mass and the linear acceleration through its centre of mass
 
can you make someone go into a spin by shooting them?
 
That would be sweet. Hit them off center and apply a rotation force.
 
that can also be decomposed exactly into torque and linear force
shouldn't be too hard with circles
I can look up the formulae in my lecture notes if you need them
 
9:05 PM
If there is a force of 4 on the right side and 1 on the left, the hovercraft will travel in a curve. How do I solve that?
I would appreciate the help.
 
oh, I see
well you can decompose both forces into torque and linear force, add up the linear forces and cancel the torques
 
If there is a force of 4 on the right, and a force of 1 on the left, then there is a net force of 3 on the right.
 
@Rainbolt they're both in the same direction
 
This reminds me of my way-too-involved boids sandbox I made years ago.
 
(think tangential forces)
 
9:07 PM
@Martin He said one was on the left and one was on the right. They can't both be in the same direction...
 
@Rainbolt it's on the left... not to the left
imagine jet engines on both sides pointing in the same direction, the right one blasting more strongly than the left
 
Or tank treads
 
(or fans, because that's what they are)
 
It would be funny if the turret cannot move and they only way to aim is to spin yourself (:
 
I think that's the plan, no?
 
9:08 PM
Yeah, the plan is that you have to spin yourself.
 
great
 
I clarified the fan thing, I think. There's one on the left and one on the right, but they both face forward.
 
is there any 3-dimensional aspect or are the physics strictly 2D?
 
I assume you want dual fans so it's easier to rotate quickly? Otherwise a single fan would be much simpler.
 
Strictly 2D as of right now.
 
9:11 PM
@Geobits How would you rotate with a single fan? (winning)
 
Make it aimable....
 
You still can't rotate...
 
@Rainbolt if it's off-centre you can.
 
You wouldn't be able to rotate in place, yes. It would give a loopy effect.
 
Well yes, I was assuming the single fan would be placed at the center
 
9:12 PM
Or off-center (at the back probably)
Think like a motor in a boat.
 
I think that would require too much physics of the participants though. it would be nice if they could just use the simple intuition of "blow stronger on the left to turn right"
 
I like the simplicity of two non-aimable fans, only on or off
 
the hardest thing is going to be detecting and resolving collisions.
with the acceleration I don't think it's easily possible to have exact collision detection
(you can only take small steps, and fix things once objects overlap)
 
I don't think exact collision detection is going to happen.
 
maybe we should find an established physics engine?
 
9:14 PM
BTW, I'm going to steal whatever formula you end up using to play with my Ollie.
 
I've done it for this game prototype, but there was no acceleration
@Geobits oh, that's new
looks nice :)
@feersum box2d?
the equations involved should be simple enough though, especially since everything is circles
 
is it any good? does it handle circles?
 
And there's only one force that actually moves the object. You can only go forward.
The other force just spins it in place
 
@feersum it's the one used by boxcar2d
@PhiNotPi you'll also need to decide if hovercrafts are sticky or slippery (on the edges), which is important when resolving angular momentum in collisions. of course, slippery is much simpler, because it means momentum can't be transferred.
sticky is more fun though :D
 
I can already imagine the clown bot that spins as fast as possible and then transfers all of that spin to a poor opponent.
2
 
9:19 PM
Here's a simple scenario.... the hovercraft is accelerating "forward" but is already rotating. Acceleration in X is a*cos(θ), so velocity in X is the integral of that...
Sticky sounds fun.
 
The hovercraft is always accelerating forward. You literally can't accelerate in any other direction
 
@PhiNotPi just make the time steps short enough so you don't have to worry about it
@Rainbolt yeah, but if your timestep is too long the meaning of forward changes significantly over the timestep
 
@Rainbolt I assumed a -3 on left and +3 on right would rotate in place.
 
How many fps? should players be called every frame or skip some?
 
@Geobits Oh, the thrusters can go backwards now?
 
9:21 PM
I was planning on backwards thrust.
 
I inferred that from "Each fan has 8 power settings, from -3 to +4." May be wrong.
 
Not that it really matters.
 
Oh, well that blows my theory
 
I'm not set on the -3 to +4, at all.
 
Makes for a better clown car, though, just start a bit forward, then max spin :D
 
9:23 PM
I was thinking that, without a negative setting, it would be hard to stop turning.
 
turning is fun..why would you want to stop turning :D
 
Okay, when both fans are accelerating at the same rate, but the hovercraft is spinning, the resulting position formula isn't that bad.
I fed "integrate integrate acos(bt) dt dt" into Wollfram alpha, where "a" is the forward acceleration, and "b" is angular velocity, and "t" is time.
integral integral a cos(b t) dt dt = -(a cos(b t))/b^2+c_1 t+c_2 gives you the x-position as a function of time.
 
there's no need to integrate anything in a numerical mechanics simulation
 
I wanted to see if things can be solved exactly.
 
you simply update the velocity/acceleration each time step
with some formula such as RK4
 
9:34 PM
that's probably way more than you need
 
it's super easy to code though
 
RK2 will probably suffice, if not even a simple difference method, provided you make sufficiently small time steps.
 
That is what I may end up doing...
 
that could be better, if controllers are not activated every frame
I would if there should be any friction/drag, to prevent clownbots from having unbounded angular momentum
 
If you move players in time steps, spinning ridiculously fast doesn't provide any advantage anyway.
 
9:39 PM
There will be time steps, but the game won't be turn-based.
 
@PhiNotPi What do you mean?
 
If I can make a full rotation every time step, that's exactly the same as making two full rotations every time step, or a hundred rotations every time step.
Regardless of whether you are spinning ungodly fast or just one rotation per step, it's all the same right?
 
0
A: Sandbox for Proposed Challenges

flawrFind the direction of the Bicycle (code challenge) There is a trace of a bicycle in the snow, but you can only see the two lines of the two wheels. Your goal is to find out which direction the bycicle did go. Task Write a program that takes an black and white image as input and calculates whic...

 
not in a collision
 
Turn-based would mean that, before doing a time step, you wait for each player to give a response. I was planning on making it so that, if the player hasn't given any output, that the time step goes on anyways.
 
9:43 PM
He hasn't said anything about sticky collisions yet
 
That seems like a nightmare scenario for coding the controller
pretty sure asynchronous communication is not something you want to go for
 
I think I will have some "minimal" friction to prevent bots from getting up to speeds where it makes an entire revolution per time step.
Why do you think asynchronous communication will be bad?
 
among many other things, bots can hog CPU from each other
 
@PhiNotPi Why do you want to prevent bots from reaching angular velocities above a certain level? I was just trying to explain why it wouldn't make a difference.
Oh, I see. I just read that part of the challenge.
I didn't realize shots fired were instantaneous
 
The shots might not be instantaneous.
 
9:47 PM
Seems like the obvious solution is to make shots fired an actual projectile
 
I haven't decided.
 
I guess it would make the engine move slower if it had to render projectiles too
 
How fast should the projectile go?
Any ideas?
 
Is there a board size?
 
Nothing that isn't completely arbitrary.
I picked a radius 400 circle.
 
9:50 PM
Starting to think that maybe limiting velocity is the right way to go. I don't know how you would possibly hit anything that is moving at insane speeds.
 
with a limited board size, you can't reach an insane linear speed without hitting the edges
 
0
A: Sandbox for Proposed Challenges

randomraEvery number is interesting We know that every number is interesting but how? You should write a program or function which: takes a list of N positive integers (>0 and <2^31) outputs N lines each of them showing how the corresponding input number is interesting is not longer than 1024 bytes u...

 
I hate that NetBeans recommends turning this
        for (ArrayList<Tile> row : tiles) {
            for (Tile tile : row) {
                sb.append(tile.hasPlayer() ? tile.getPlayer().getTeamId() : " ");
            }
            sb.deleteCharAt(sb.lastIndexOf(";"));
        }
into this
        StringBuilder sb = new StringBuilder();
        tiles.stream().map((row) -> {
            row.stream().forEach((tile) -> {
                sb.append(tile.hasPlayer() ? tile.getPlayer().getTeamId() : " ");
 
What does it mean that Java recommends something?
 
Sorry, I meant my Java IDE. Edited inline
 
9:56 PM
now with automated code bloating?
 
Since I was having trouble determining what size a game tick should be... After accelerating a distance of 800 (one edge to another), the bot can have a maximum speed of 40*sqrt(a).
So, I would want it so that a maximum speed bot won't experience a choppy motion.
 
@feersum It looks like the benefit is that the operation I am applying to each item in the list could be executed in parallel, so using a functional stream allows that to happen. But I didn't understand it too well so I may be full of it.
 
That would be really surprising if it actually executes in parallel
does it really work?
 
With the hovercraft challenge, I guess I'm at the point where I need to write a lot of code and test out what works.
 
(Oh that's awkward - some languages have builtins for KS-test! Is it too late to add a no builtins rule?)
 
10:06 PM
@feersum From the Javadoc: "All streams operations can execute either in serial or in parallel. The stream implementations in the JDK create serial streams unless parallelism is explicitly requested."
 
lol, that's what I thought
 
You would think that if the only benefit is parallelism, that NetBeans would bloat my code to something that uses it.
 
better use stream..just in case someone runs it with a magic Java implementation that executes eveyrthing in parallel
 
I'm still using NetBeans 7.4. Maybe NetBeans 8.X will behave a little better.
 
10:18 PM
@MartinBüttner Why not? Isn't it just solving a quadratic?
 
@PeterTaylor hm, possibly? it's basically finding the intersection of two parabolic tubes in 3D
yeah, sounds all quadratic to me
 
@feersum Quadrature is integration. Just done badly ;)
The thing which can get quite nasty with the hovercraft simulation is simultaneous collisions involving more than 2 objects.
 
yeah, this is why a preexisting physics engine should be considered, to make collisions someone else's problem;)
 
For Torquing! I solved it with the approach described in this paper
 
@PeterTaylor btw, I edited my list of ideas for randomness-based challenges to the Shuffle an Array sandbox post if you're interested (there are a couple more in there than I mentioned yesterday)
 
10:38 PM
@MartinBüttner It looks to me like the close votes on this question are because the question is unclear, but the only objection I see in the comments is that the Enigma spec isn't in the challenge itself. Since when did "unclear" and "not self-contained" become synonymous?
Maybe you didn't vote, so I could be asking the wrong guy.
 
@Rainbolt I have no way of figuring out what I'm supposed to do without following the link. I'd call that unclear.
 
Are the algorithms used by Enigma vague or ambiguous?
 
no, but I don't know what they are, and the question doesn't tell me
(actually I do, but that's beside the point)
that being said, I'm not sure they're completely unambiguous
I'm sure there must have been several models
the exact implementation he wants is "obviously" the one used by the simulator he linked, but I can't really reverse engineer that either
 
You aren't sure the spec is unambiguous so you close voted as unclear?
 
I'm sure the spec isn't the challenge post, so I close voted as unclear
 
10:42 PM
non-sequiter: The spec isn't in the challenge post. Therefore, the spec is unclear.
 
feel free to use your reopen vote if it gets closed
 
I intend to
 
@Rainbolt How can a spec possibly be clear if it doesn't exist?
 
@Doorknob Oh, the enigma spec doesn't exist?
I wasn't aware of that.
 
I don't see how a non-self-contained challenge is any different from an unclear one
 
10:43 PM
Not in the question, nope.
 
That's not what I asked.
 
All Stack Exchange posts are expected to be self-contained.
If it's not directly in the post, as far as we're aware it doesn't exist.
 
There's no close option for "you were too lazy to write the question specification", so you gotta pick something.
 
Well I don't see any votes to close because the post is not self contained.
I only see votes for unclear.
 
One of the main goals of Stack Exchange was to get rid of the torture of clicking through links and links and searching over and over again.
@Rainbolt There is no spec. Therefore, it's unclear.
 
10:45 PM
I understand that. I'm just trying to understand the choice of vote here.
@Doorknob I literally just explained that that is a non-sequiter.
 
Why?
 
@Rainbolt I'm sorry, I must have overlooked the "Your post is not self-contained" close reason
 
Custom reason...
Is it too hard to type a custom reason instead of using one that makes zero sense?
 
Why use a custom reason when unclear works just fine?
Direct quote: "Please clarify... add additional details... hard to tell exactly what you're asking."
 
@Rainbolt aren't there only custom reasons for off topic?
 
10:48 PM
If he copies and pastes a well known algorithm, then all of you will suddenly find the question to be clearer, despite the fact that he has added zero information that didn't already exist?
 
btw, I found a link to end this discussion: en.wikipedia.org/wiki/Enigma_machine#History ... there have been different models
@Rainbolt as far as I'm concerned it didn't exist
if he hadn't included a link, would you then close as unclear?
 
Have you ever written a challenge that communicated via TCP?
If so, did you define TCP?
Did you rigorously spec it out?
 
I don't think I have, and if I did, you were allowed to use built-ins that hide the details
 
I would close it as unclear based solely on the fact that there have been different models. But you didn't bring that up until just now.
 
I doubt you can solve this challenge with CryptographyEngimaEncode["input"]`
 
10:50 PM
If there's a challenge requiring data from the Internet, it doesn't matter what protocol is used to get it
 
@Rainbolt I mentioned that it's probably the case, and the fact that I have to go to another website to find out if a challenge is a unclear makes it unclear already
you ignored my question though
would you close as unclear if there was no link at all?
 
Whether or not there is a link is totally irrelevant.
 
@Rainbolt so you wouldn't? o.O
 
I didn't say that
I now know that there are two enigma specs (according to you), so I would still close in either case.
 
well you wouldn't close it with a link. you say that the link is irrelevant. so if the link wasn't there, that means you wouldn't close it either.
 
10:52 PM
..... What?
 
@Rainbolt ignore the fact that there are multiple models
 
Ok. There is a single, well specced model out there on the Internet.
No, I would not vote to close.
No, I would not vote to close with a link.
No, I would not vote to close without a link.
 
okay
I think that's the point where we agree to disagree and cast our respective votes
 
Why did you lead me down this stupid link question just to tell me that we should agree to disagree?
You make me answer stuff for no reason. And you remind me that I need to answer it too.
 
well because I thought you might actually close a question that doesn't contain any reference to the spec at all
in which case I might have had another argument
but this way I don't
 
10:54 PM
I thought it was already understood that the link was not a reference to the spec.
Is the link a reference to the spec?
 
I don't know? I thought you considered the link a spec
it doesn't really matter to me
 
Would you close it in a box? Would you close it with a fox?
 
if there's no spec in the question I'll voite to close as unclear
 
No. I considered "the enigma machine" a spec.
 
oh okay, fair enough
 
10:58 PM
Assuming there is only one enigma machine, the spec is well known information that need not be repeated in the question. I originally assumed this stance because i had heard about some yearly Enigma machine competition for programming students.
Besides, the folks who cracked the original Enigma machine probably didn't vote to close Nazi Germany as "Unclear what you are asking".
 
does anyone here know javascript fairly well
 
@EricTressler Optimizer
 
Pardon me?
 
although I'm sure others can help you too
what's the question?
 
oh, him
okay, I've been putting some stuff in canvases on my site, but I want to avoid namespace conflicts
 
11:02 PM
oh, k... I'm not really familiar with canvases
 
var frac = new Object();
this is incidental to that
 
(I just use them as a tool to render WebGL in)
 
I do that, and then all of my "globals" are now frac.bla
 
oh okay
 
but i've also seen people wrap entire scripts in a
function () {
}
Is there anything particularly bad about the way I've been dealing with scoping?
 
11:03 PM
I guess it's just less convenient?
wrapping everything in a function is idiomatic afaik
 
I don't know how to initialize my program if all of the functions are inside of a function wrapper
if i have a function () {
 
@Rainbolt The folks who cracked the original Enigma machine did so before Nazi Germany existed.
 
containing, say, a function init() {
 
@EricTressler you return init
(from the wrapper)
 
so then in the script, I would let X = wrapper();
and then X();
 
11:05 PM
yep
although I don't see why calling the wrapper couldn't act as initialisation
 
I haven't really tried this other method yet, I just saw it while source diving a little
 
or do you want to run the wrapper before init for some reason?
 
no, no. I only want the wrapper to get function scoping
 
then just call init at the end of the wrapper
then you don't even need to expose that
 
I have some cases where I have 4 minor variants of the same program that I want embedded separately on a single page
and dealing with the scoping my way is pretty stupid
 
11:07 PM
if the minor variants can be parameterised easily, you could actually make that a single program, give the wrapper the parameter, and call the wrapper four times
 
I have like... Xv1.everything, then I do a search and replace by Xv2, etc.
nah, it can't
they're fundamentally different
 
plus they need their own animation stop/start controls
so they really need to be separate scripts
 
@EricTressler well they'd get their own controls
(if the wrapper instantiates new, local ones)
if you call it four times, you get 4 separate closures
 
ah. right. well, in this case it still wouldn't work
but that's good to know. i'll write my next program with a wrapper around it and get that working
 
11:09 PM
even if you have multiple wrappers, it would probably more convenient to be able to use the exact same names
(without prefixes)
 
yes
So I just got a job offer that conflicts with an active interview process with Google :|
 
No idea how I'm going to deal with it yet. I just found out today
if they had just waited another 2 weeks, this would have been fine
 
11:24 PM
yeah, that worked
 
11:36 PM
@MartinBüttner Random chessboard sounds fun but also pretty insane. Are you counting only reachable positions in game? Also, are there pawn promotions?
 
00:00 - 21:0021:00 - 00:00

« first day (1465 days earlier)      last day (3371 days later) »