« first day (541 days earlier)      last day (4390 days later) » 

10:00 PM
@MooingDuck so if *fun is the function what's **fun ?
 
3 mins ago, by DeadMG
however, more directly, de-referencing a function pointer has no effect- that is, *fun == fun
 
0
Q: The position of 'const' qualifier of a parameter which is passed by reference in template context

HarooganConsider the two following prototypes: template<class T> void whatever1(const T& something); template<class T> void whatever2(T const& something); They are both identical. Yet what if T is not a usual type, but a pointer type? For instance, let T be Somewhere* then whateve...

strange question
 
not really
he's right that const T* != T* const and that if you were to textually substitute the parameter, you would get a difference
 
right, but can't type traits and TMP solve this?
 
imitation is the most sincere form of flattery
@TonyTheLion More accurately, non-textual substitution solves this.
const T and T const where T == U* are identical.
 
10:08 PM
@DeadMG so I guess I should think about it as fun is a function and a function pointer at the same time bcz it's not a variable that take memory like arrays. (array and &array are the same ) is this correct ?
 
if you were using a macro, you'd have to use TMP
@AlexDan What's generally best is just to never, ever think about function pointers. Or native arrays, for that matter.
their semantics are shitty at best
 
ok thanks
 
@AlexDan array and &array are never ever the same. However what can happen is that array decays to &array[0].
Although that hangs on a particular meaning of 'the same'.
 
@AlexDan I just pretend that there are function pointers, and I can't dereference them.
 
hmmm
if I'm ticking over a physical simulation
do I do pos += vel; vel += acc; or vel += acc; pos += vel;?
or am I supposed to integrate between the two....
 
10:13 PM
@DeadMG integration seems most accurate, but the other two are more or less equivalent.
First is (what happened since last tick), and the other is (what happens until the next tick)
 
@DeadMG You can choose to do either with the assumption that the one being updated last 'lags' behind but that's very possibly needlessly complex. I'd update the two in tandem from the previous values.
 
@LucDanton that's a better idea (though integration is still more accurate)
@LucDanton technically the first one does update them in tandem
 
0
Q: Efficiently storing data in memory for fast searching

sehecommented: Ok, please check the box: [.] "I'm reinventing MOD files" or [.] "I'm reinventing MIDI files". Note that MOD players already exist for smart phones

 
aah
I knew I did this in Physics, and found the ref page on Wikipedia I was looking for that tells you the equations
 
2
Q: Is there a better way to split this string using LINQ?

sehecommented: @EdS. Ok, then, for you in translation: "Facts vary". Whatever :) double.Parse might be able to account for things, but nobody did

Oh my. I'm on a roll. What is with them anti regex nazis
 
10:23 PM
since I explicitly have only constant acceleration in a tick, then I can compute the final position and velocity relatively easily
 
Funny. I edited the comment, but onebox won't show the updated comment even after re-editing.
 
@LucDanton what do you mean by array decays to &array[0] ?
 
In some contexts, array name will decay to a pointer, losing size information.
 
@AlexDan The name of the array behaves as if it were a pointer to its first element. Like in the following: int array[2]; int* p = array;.
 
ok thanks
@LucDanton isn't type casting ?
 
10:38 PM
hmmm
 
It's an implicit conversion.
 
10:49 PM
it's irritating that even when I handle a flag I still have the blue number over my duckface.
 
'considered harmful'. Actually, don't do that.
 
@ScottW I think one of us doesn't understand what a stopword is
@ScottW so it was me
wikipedia suggests "the, is, at, which and on"
@ScottW wikipedia mentions "who, want, help, take, and that" as well
mostly in mentioning that for a long time one couldn't google for "The Who"
for books "want" and "help" are probably fine
 
any of you lot knowledgable about pathfinding/AI?
 
A*
>.>
 
Yes, A*.
 
11:04 PM
A* doesn't apply to my situation, I believe
 
A* is pretty general.. what doesn't apply?
 
A* covers graphs
 
Can anyone help me with my booting issue?
 
but my game space is mostly empty- there's no nodes for it to navigate between
because practically everywhere is navigable
and it needs to be in 3D as well, not e.g. a 2D terrain
 
Navmesh?
 
11:06 PM
for a giant 3D space?
 
I can't boot into Windows
 
@DeadMG that can be converted to a grid with traversable and non-traversable cells, which can then be A*'d, but you're right, there's probably better methods
 
@JohnSmith Should we boot you?
 
ATM I'm thinking potential fields
 
No?
 
11:07 PM
@JohnSmith Problem solved :)
 
@JohnSmith What kind of booting issue? (Maybe)
 
I try to boot into Windows on my Win7 64-bit Acer laptop and it just hangs on "Starting Windows"
 
Drivers, unplug unnecessary usb devices, unplug unnecessary internal devices
 
@JohnSmith SSD?
 
boot off a live cd, make sure stuff comes up
 
11:08 PM
I try to go into Safe Mode, it crashes. I go to repair, it hangs on the green loading bar. I try to use a Windows 7, it hangs too.
 
@DeadMG ai-blog.net/archives/000152.html I saw this years ago, applies to open spaces. I dunno if it's practical/useful or not.
 
*Windows 7 CD
 
Try a linux live CD?
 
Not a solid state, no
I dual-boot Ubuntu
But I barely use it
And I can't access my stuff from there anyway
 
just a sec
 
11:08 PM
I can boot into Ubuntu fine
I think something's borked in my file system for Windows or something and wanted to run a repair tool or something similar
 
@JohnSmith Accessing stuff should be childsplay. Ntfs is well supported in Ubuntu
 
More specifically I want to repair windows so I can use it again -- not merely access stuff
It's on a completely separate partition anyway
 
11:21 PM
@MooingDuck The problem isn't just that the space is open, it's that it's three-dimensional. I don't know if I can make that work in 3D space.
the approach presented is simply a more efficient A*, not something fundamentally different
 
A* quite straightforward
 
Gents, good night
 
just a matter of comparing points on your frontier versus the straightline heuristic cost of your goal
 
A***, would pathfind again.
 
@ScottW Because it would consume 999999GB of RAM?
well, the game takes place in space, so 99% of it or more is just empty
and the "ships" are all closed, bounded meshes
 
11:26 PM
@DeadMG I used to know some stuff about how they use A* in robotics, but I know they don't build graphs of the entire search space all at once, but like @JohnSmith was saying, you just look at stuff at your 'frontier', which could be generated on the fly
 
@ScottW Sure, but each bit of space needs it's own pathfinding "node"
and the interpolations between nodes are pretty ugly
 
You don't really need to find paths to every particle.
 
true
but another thing that concerns me about A* is accounting for dynamic obstacles
wouldn't I have to recompute every path, every frame?
 
@DeadMG Not necessarily, you could map out several nodes worth of path and just follow it
 
then I'd end up with suboptimal paths, since the algorithm can only see a few nodes ahead
 
11:32 PM
especially since you know the search space
 
although I guess that in empty space, it's not usually going to be that big of a deal
 
Yeah, but you can have darn good heuristics on A*
since you know the whole layout
 
I dunno, I played Supreme Commander and it had A*, but the pathfinding still cried like a little bitch when given more than a couple hundred units
and if you had a few units pushing against each other, the result was a total mess
 
@ScottW Missed a word :-P
 
@DeadMG a lot of games will, if units touch and are travelling to more or less the same position, will simply have them share one path until they get close.
 
11:38 PM
that doesn't work if you have multiple groups sharing the same paths
I mean, for example, let's say 100 units from player 1 and 100 units from player 2 move past each other
some of the units are gonna be through the opposing "swarm" and some aren't
 
@DeadMG if it's very empty, just draw a line, check for collisions. If they collide, split the path into several paths that go around the object that was collided with, and recurse. Lousy for mazes, but low memory and fast for wide open spaces.
 
@MooingDuck And maybe treat enemy 'swarms' as one big obstacle?
 
@DeadMG I only know of the technique, I don't know details. There's probably a workaround for that.
@Collin I guess so
 
@Collin Except the two swarms pass through each other, which is impossible for regular obstacles.
 
I meant not to let them do that
depends on the unit types I guess.. capital ships? probably can get away with it.. a bunch of fighters.. maybe not
 
11:42 PM
@DeadMG so then don't path around swarms, don't have them plot paths through swarms at all. Have them path to a swarm, "shuffle as they can" to the other side, then path to destination
 
that's pretty suxxor behaviour
 
@DeadMG or go with the Command and Conquer behavior of shooting anything in the way.
 
Ell
hey
 
@DeadMG have them "shuffle right" more than "shuffle left", and that probably avoids blocks too
@DeadMG I like it, even if you don't
 
@DeadMG You could probably make something simple to start, and see how it actually behaves
then iterate as you observe problems
 
11:44 PM
I'm pretty sure that if you were, say, having 100 fighters pass through each other, they would not kindly let each other pass
 
Ell
can't you treat a hundred units as one big unit and split if neccesary?
 
yeah, I could actually do that
@Ell I was going to use potential fields to "stitch" the units together
then if there's a repulsive field, they should simply flow around it
 
@DeadMG are the two swarms aggressive or not, I'm sort of fuzzy on that.
 
Ell
oh i see what you mean
 
does it matter? they're just moving through each other
whether or not they're also shooting at each other is kinda inconsequential :P
 
11:46 PM
@DeadMG I think the "shuffling" would work fine, especially if they spread out as they approach each other.
 
maybe I should just let a few of them collide :P
 
I should help people less. Now I have users coming to me when they have a question about what someone else said :(
@DeadMG spreading out as they approach lowers that risk
 
true
but I also don't mind if it happens on occasion
 
@DeadMG understandable :P
 
introduces some realism elements to the idea that they're being piloted by actual people
I mean
check out this:
 
11:51 PM
@DeadMG Used to play Combat Flight Simulator, most frustrating mission was when some of the higher up bombers dropped bombs on the lower bombers and the whole formation went up in a gigantic explosion
 
Ell
you should implement the urinal etiquette algorithm next
 
Ell
does anyone play spring? anyone been subject to the crawling bomb fail before?
@MooingDuck that's the one
 

« first day (541 days earlier)      last day (4390 days later) »