« first day (996 days earlier)      last day (3953 days later) » 

12:00 AM
@Magtheridon96 well, I didn't change ANYTHING, so I am very scared.
 
Cue "All your base are belong to us"
 
I don't even know what code to show you...
 
@R.MartinhoFernandes All your codebase are belong to us.
 
@chris I'd also like to add on the subject by mentioning that this guy registered on SO today and has managed to get his 3 questions on hold (with i believe at least 5 downvotes each)
 
that guy clearly just can't speak English.
 
12:01 AM
I hope that's not what I sound like when I try making Japanese sentences from what I know.
 
Well.
 
Though I've only been at it for a few days, so it probably is.
 
@Pawnguy7 Is the bug reproducible?
 
It doesn't run without producing it, so... yes.
 
Run in Debug Mode -> Push "Retry" -> Observe call stack.
 
12:02 AM
@Pawnguy7 Start taking out lines until it goes away if you're planning on asking about it with code. Chances are you'll eventually get it while you do.
 
What libraries are you using, and what compiler do you have?
 
I am just confused, because this worked an hour ago...
 
@chris "all of you do not understand"
 
@not-kbok I'm not exactly sure what connotation they were referring to, either.
 
my guess is OP doesnt know what connotation means
 
12:05 AM
"connotation" = "meaning" (source: I have a crystal ball)
 
More like a second meaning, though.
A hidden meaning.
Almost as if it was just meant to troll us.
 
Ahah.
I think I found it.
 
I think the new close reasons are sucky
 
What are they?
 
@not-kbok I like them for the most part, but I still think one or two of the off topic ones are a bit of a stretch.
 
12:08 AM
@Pawnguy7 Sucky Close Reason #1, Sucky Close Reason #2, Sucky Close Reason #3, Sucky Close Reason #4, and Sucky Close Reason #5.
 
How nice.
Anyway.
Apparently two of my source lines magically deleted themselves.
 
> put on hold as unclear what you're asking
 
And gave a different error than the last time it had am empty list, for some reason.
 
¯(°_o)/¯
 
I guess that is why it is called undefined behavior.
 
12:09 AM
@not-kbok I love that one
 
I like how it's more organized to put things on hold rather than close them for good.
 
There are so many questions where... well there isn't actually a question
 
This is exactly the same thing
 
And instead of commenting and nothing being done, then closing after a while, you can move on quickly.
And if they actually do edit their post, which happens oh so rarely, it can get reopened.
 
@not-kbok ¯\(°_o)/¯?
 
12:13 AM
Is trying to use a null pointer not grounds for an exception?
 
You need to escape the \.
 
@Rapptz Yep
 
@Rapptz It's more UB.
 
@Pawnguy7 Undefined Behaviour.
UnDEFined BeHAViour.
 
spORAdIC behavIOR
 
12:22 AM
UDEFBHAV
is there a logic
 
@DeadMG well, is that not an exceptional circumstance?
 
@Pawnguy7 No. It's an undefined circumstance.
 
What standard library things DO throw exceptions?
 
not many of them
 
I wanted to say IO, but I think that uses flags, so I am not sure what I was thinking of.
 
12:24 AM
flags and return codes, yup.
that shit is really "Barely better than C"
 
Is me getting lots of UB errors due to pointers due to lack of experience, or is it better to just not touch the stuff yourself?
 
er
definitely don't, ever, allocate and free your own resources.
and do not ever use C-style arrays and do not ever confuse arrays and pointers.
 
seems wise advice
 
Streams can throw.
 
always use RAII classes to manage all resources.
 
12:27 AM
They just don't throw by default for some retarded reason.
 
and always use C++ wrappers for arrays of static or runtime bound.
 
@DeadMG does this not encompass making your own things that use this principle?
 
@Pawnguy7 Frankly, there's a vanishingly small number of cases for which shared_ptr, unique_ptr, or boost::intrusive_ptr cannot work.
 
@Pawnguy7 You'd have to check every pointer and OH GOD COMPARISON OPERATION KILLS MY PERFORMANCE. C++ is not a very good thing.
 
The other day I was talking with a C# guy and he was so surprised that we have a using-like feature too
 
12:28 AM
C# and Java seem to use using a lot more.
 
that's because C++'s using is horrifically broken.
 
@ScottW ;_;
 
@DeadMG No, I mean RAII
 
oh.
using is a far cry from actual RAII.
 
the kick is being able to implicitely call some method at the end of a scope
 
12:41 AM
What does using do in C++?
 
for someone who always deal with Java-like GC it's a breeze
@Pawnguy7 Something unrelated
 
ah
As I understand it, Java's using is basically a workaround for not having destructors at the end of scope
It doesn't?
 
No, but C# has it.
 
oh
It was like try with resources or something
Perhaps I got them mixed up.
Are they both used about the same way?
 
Hm.
I don't know how to properly pass these arguments here...
 
I wonder if things like file streams and memory streams should be copiable...
 
yup, that was it
 
 
@ScottW Lol, that's cheating. xD
 
@ThePhD No.
 
12:51 AM
Well, then.
I got nothing.
I can't figure out the right parameters for my Reader API then.
One Sexy Bastard <3
 
the real question is
stay up until 6am to torrent TV in the morning, or try to sleep?
 
I think shared_ptr can save me.
Hm.
 
!!/choose stay-up, try-to-sleep
:( chatbot y u no work
 
I sleep 4-7. I'd do it at 7.
 
!!/choose "stay up" "try to sleep"
 
@ScottW want to help me find a bug?
Um.
 
I don't like watermarks, they taste bad
 
Haha.
Anyway, unlike some of my other bugs.
I have a good explanation of it.
Od did I already show you? The blending jerk one?
And yes, old laptops and recording don't go well together.
 
@Pawnguy7 what is that a video of?
 
The screensaver.
Sort of.
 
1:08 AM
what is the blue supposed to be?
 
Really bad attempt at lakes :D
Going to come back and fix them later.
 
ok :P so what is the problem?
 
Ok. Well, the idea was.
It would scroll till the end.
Then have that blending transition, and start the next one.
Problem is, it like... goes back ~5 blocks before it starts blending.
Causing a noticable jerk.
Also, more recent video:
 
oh okay then
ooh that's really nice :D
 
It would be nicer if I could record it at more than 15 FPS :D
 
1:10 AM
Those yellow nodes are light sources? Cool.
 
Yes. I call them torches, but could be anything I suppose.
 
@Pawnguy7 Is that like... dinamically generated?
 
@Jeffrey yes
 
Very nice. Lakes can be improved, but the rest is awesome :)
 
I want to implement lighting. Not sure if SFML supports it.
 
1:12 AM
@Jeffrey Yes, they are ugly. As per a suggestion here, I think I will try a method of.. pulling down ground, sort of, to get the shape, then recursive water fill
Relevant code.
@Magtheridon96 what sort of lighting?
 
@Pawnguy7 I'd be more comfortable if that was a multiple choice question ;p
 
@Pawnguy7 start blending 5-10 blocks before then end = problem solved
@Magtheridon96 lol
 
Then I would miss part of the generation though :D
Anyway, I feel it is simple... not sure where it is though.
 
@Pawnguy7 if you try and try you'll be able to guess how many blocks before the end you should start blending without having that jerk
 
Hmm.
I think multiplying the R,G,B components of a pixel by a factor can simulate an object being lit up, right?
 
1:16 AM
Well, the idea was to have some blend panes - each the size of the blocks in view. One would be of the start of the next world - that is good - and one is the end of the current one - not so good.
 
I guess I'll have to use Shaders for this
 
@Magtheridon96 Works ok, when I tried it. In the case of these torches, I just overlayed it with some translucent white blocks, which is much easier :D
 
@Magtheridon96 From what I remember about OpenGL the rule of thumb is: always use shaders when you can
 
So, any ideas?
 
@Jeffrey another one is to avoid the fixed pipeline :D
@Pawnguy7 yeah, that works
 
1:19 AM
@Magtheridon96 IIRC if you use shaders you are not using a fixed pipeline
 
@Jeffrey I know, I wasn't disagreeing ;.;
 
oh it was "in conjunction with", sorry...
 
@Pawnguy7 How many blocks per second does the camera move?
 
@Pawnguy7 I guess I may have to use a Shader here
I want the lighting to be smooth
 
1:22 AM
@Jeffrey 10 pixels per update, 30 updates per second. Not sure what the block size is, second.
 
Rendering translucent white surfaces on top of the tiles depending on light could work fine, but it's not as good :/
 
My dad made a strawberry shortcut, so goooooood
 
@Magtheridon96 in the picture above, it uses the method you highlighted (multiplying by rgb values)
 
@Pawnguy7 whatever it used, it's doing it for each tile :p
I want to do it per-pixel
 
@Pawnguy7 in addition to the size of the blocks I need how many seconds does it take to blend completely
 
1:24 AM
@Pawnguy7 Looks like multiplying the RGB components by a factor could actually work well =o.
 
@Jeffrey currently 30 updates I think. Block size 45.
@Magtheridon96 Well, I think it was similar to this. I know it tinkered with the values directly anyway. Let me dig out the source.
Hm. 6.6 blocks... You might be onto something.
 
@Pawnguy7 Then it's easy: start to blend at 7 blocks (actually 6.66666) from the end and everything will be smooth.
 
@Pawnguy7 I think it's all those pointers that are causing memory problems for you
 
@Jeffrey any idea why it is offset?
@Magtheridon96 they have caused me problems, but I don't think it is the problem here :D
 
@Pawnguy7 because the blend takes aproximately a second to be completed. In that second you still have your first "world" moving by, which means you have to start blending one second before the end of the first "world" = 6.67 blocks before.
 
1:29 AM
@Magtheridon96 pastebin.com/d66U2z9Z
Source of that picture.
@Jeffrey I don't think the world is moving while it is blending though.
 
@Pawnguy7 in your current version it does not. It should, in order to look smooth.
 
pastebin.com/bATLM9i1 full file, for reference
I am confused with your explanation though.
You say in the current version it doesn't (true), but that it is the reason for the bug?
 
@Pawnguy7 D'you want it to seems like the horizontal scroll is continuous?
 
@Jeffrey That might look neat, but not sure how. Anyway, the origional idea was, scroll to the end, stop,blend, start scrolling
 
oh, I thought you were pissed because the scroll wasn't continuous...
lol
 
1:36 AM
Haha, no.
 
Now I get it, you are wondering why it goes into another position after stopping (before blending)
right?
 
Yes. Like, if you look at the trees, they go back... perhaps it is 6 blocks.
Which, seeing as how that coincides with how much the view moves, you might be onto something.
Any ideas?
 
What is the line in the source code where you define the stop?
 
Um... well, drawWorld is called as long as blending isn't true. When it is done, it sets it to true.
When the blending starts (right after), reset() is called, which moves the view back to the start of the... world, I guess. Or coordinate wise.
 
@Pawnguy7 and that is the problem, right there. Isn't it?
 
1:43 AM
Calling reset()?
 
yup
 
How so?
 
Try calling it at the beginning of each world (right after the blend is complete) instead and tell me if it works
If it works I'll explain
@Pawnguy7 which view? The one of the fading away world or the one that is fading in?
 
Doesn't work.
And, there is only one view.
Anyway, it doesn't draw there, because it draws near the start, and the view is at the end
I will try to get the corodinates though
 
You should use two different views for those two different worlds (the one fading in and the one fading out)
If you set the view to the start and they both share the same view, the one that is fading out will be moved at the beginning as well (but still being stopped) which causes that bug, imho...
 
1:49 AM
Do you know what views are?
 
IIRC in SFML a view is just a coordinate-offset from an origin point in the world space
or at least that's how I would implement them
 
Ok.
 
A view is a subset of the world space, isn't it?
 
I would say so.
Anyway, what happens is.
As the view is moving.
The world that is drawn there is shown
At the end, when it goes back to the start.
During the blending, everything is drawn at the start as well
Quite literally using screen coordinats
 
That's my point.
> everything
everything (including the first world) is drawn at the start
 
1:52 AM
rectangle.setPosition(x*blockSize, window.getSize().y - (y*blockSize + blockSize));
Hm?
In this context, everything means the blend panes.
 
you want the first world's view to be kept still
 
Ok, now it works when it starts blending, but jerks when it is done :D
I do? Why so?
 
@Pawnguy7 after calling reset at the end of the blen instead?
 
@Jeffrey yes, and shifting the coordinates of the line above so they are drawn in the view
 
That proves that I'm right....
 
1:55 AM
About?
 
My diagnosis is that the problem relies there (in using a single view for 2 different worlds instead of 2). It explains all the symptoms.
 
@Jeffrey you sound like a doctor :P
 
This is how I see it:
We start with an entire world layed out.
The view rectangle travels along, showing it to us.
Then, imagine, we cut off the last piece of the world.
And get rid of the rest.
Then, we generate a new world, and cut off the first part.
We put both parts at the origin, and move the view there.
Then, we get rid of the first part, reattach the second part to its world, and scroll.
Does this make sense given what it did?
 
The problem is that the view is relative to the world.
 
It is relative, but I am not certain why that is a problem.
 

« first day (996 days earlier)      last day (3953 days later) »