« first day (1856 days earlier)      last day (3168 days later) » 
00:00 - 14:0014:00 - 00:00

12:04 AM
And finally, to close with solid proof of the complete irrelevance of any exponential friction:
> I'm using Hooke's Law here as the definition of a spring.
But it should be noted that the notion of improved accuracy in the original proposition is also false, because the proposed modification produced an oscillating system where the envelope does not decay, thus rendering the behavior completely unusable for the asker's task.
 
@TheMuffinCoder you sure it's not actually a doge JS miner?
 
@Almo lol nope, chrome is using 0.5% cpu rn and i have the bitcoin and litcoin faucets open as well
they earn money by me having the ads open so I get free dogecoins for leaving the tab open
Lol apparently js miners aren't plausible rn anymore
 
 
1 hour later…
1:27 AM
quick question: gimp or krita?
 
Stackoverflow: Where egos run wild for those easily butt-hurt. (Stool softener not included.)
 
1:49 AM
@SpicyWeenie Downvotes cut through the soul lol
 
Apparently he got kicked out of MIT.
But nice lines.
 
2:44 AM
:D
 
 
1 hour later…
4:00 AM
Aw... embarrassing to ask, @Ali.S, but could you help with a simple question?
Hint: No. lol no you can't.
 
 
2 hours later…
5:54 AM
@tereško GIMP
@Chris Was wondering if you've used Unity Remote
 
@TheMuffinCoder How many dogecoins do you get per hour :D? And can one open them in multiple tabs?
 
user92578
I'd guess that the ad registering is an per-IP thing
 
6:48 AM
The Roanoke colony mystery really annoys me.
 
7:02 AM
How the ...... do you even do dotted lines like that
mind blown...
 
7:16 AM
@Dev2rights I think he holds it in such a way that the chalk bounces across the board.
 
Wizardry
 
7:33 AM
@tereško For casual editing, Gimp (or Inkscape).
 
@MickLH but I can... feel happy with yourself...
 
Is it better to call native openGL code wrapped in C++/CLI in WPF/SharpGL? Or create an OpenGL control to host the window in WPF? Hmmmm...
 
@Hjorthenify Yeah I use Unity Remote 4 on both Android and iOS. Android one sometimes just doesn't wanna connect up though some days
 
reads transcript on mobile I feel mick is just devolving in to a troll more and more
 
@Chris Do I need to install the android SDK first?
 
7:47 AM
@MickLH and by the way... I couldn't improve accuracy, because I was completely trying to solve the problem from a different perspective. One that you couldn't even comprehend, and I've never seen anyone else to use it. So stop this non-sense argument already.
 
@Hjorthenify Yes, I believe you do
 
That might be why I couldn't get it to work then :/
 
has to be able to communicate with the device
 
yeah
Im bored out of my mind in introductory programming
 
@Hjorthenify which language?
 
7:51 AM
Java
Any really. We're just going through basic variable types
 
Over half your class isn't going to make it to the end lol
 
make an interactive program that eventually results in, "Teacher, may I please be excused from this class?"
or just ask to do the final test hahaha
 
@Chris I could choose not to show up to the classes, but I'm worried I'll miss something such as how they expect variables to be named and such
 
yeah..
 
My final project for my introductory Java class was an English to Morse Code and vice versa translator
 
7:53 AM
Also I did ask for the final test, but without luck -.-
 
dang lol
 
@SpicyWeenie Sounds simple enough :P
 
I know quite a few people who did that as a Uni project
my first year project was to create a Hunt the Wumpus Game
text based artwork
 
@Chris What I've learned so far: Constants(final) have to be written in uppercase(which I already knew was good practice)
 
In my advanced class, I made a desktop overlay to replace Windows 7's desktop
 
7:57 AM
@Hjorthenify A+
 
I hated the coin toss example with strings
@Hjorthenify are there any girls in your class?
 
I'm pretty sure one will try to cling to the smartest kid all semester riding his coattail
all my classes had one
 
man, I remember this one student, he was super slack
constant excuses for why homework wasn't done, always trying to ask us other fellow students after class all this stuff... think he just didn't get computers
 
8:22 AM
I had one girl that suckered a male student to do all her homework and take-home projects for her. The professor failed her at the end, because the quality contrasted from in-class work
 
user92578
I'm not proud of this, but on 7th grade, when I was just a stupid nerd, I let all the pretty girls on my class copy most of my homework...
 
:P
 
user92578
Anyways, I've got another two hour break now between classes
 
user92578
And because of it's friday, I came home to eat some pasta from a bag and do some programming
 
user92578
I've got this piece of code that is pretty much duplicated again...
 
user92578
8:32 AM
But one piece does things in a loop with the Y value and the other one does stuff with the X value
 
user92578
It's inside two nested loops...
 
user92578
Ends up with like 5 braces at the end
 
user92578
	// Loops over the tiles in it.
	for (unsigned int y = 0; y < levelHeight; y++)
	{
		for (unsigned int x = 0; x < levelWidth; x++)
		{
			// If there is a tile at the position, set the value in the mask map.
			if (auto collisionItem = collisionData.GetGridItemAt(x, y))
			{
				for (unsigned int insideX = x + 1; insideX < levelWidth; insideX++)
				{
					if (collisionData.GetGridItemAt(insideX, y).H == collisionItem.H)
					{
						collisionData.SetGridItemAt(TLevelEditorCollisionRect(), insideX, y);
 
user92578
And then I have another piece where insideX is replaced with insideY, and then used of course as the Y value
 
user92578
Any ideas?
 
user92578
8:35 AM
The code differs actually on other parts
 
user92578
So maybe I'll just leave it out
 
Sometimes nested loops is just what you have to live with.
Sadly very few languages support something like for( unsigned int (x, y) in (0..levelWidth, 0..levelHeight) ) ... (at least not easily)
 
I don't know of any languages that support that (in a method that does not devolve into calling a function every iteration))
 
Tuple unpacking?
Python supports it.
 
Yes, but generating that tuple still devolves into a function call
 
8:42 AM
you mean the underscore underscore type of function?
 
Note that we're talking about for( unsigned int (x, y) in (0..levelWidth, 0..levelHeight) ) syntax
 
yeah
 
In python the tuples would be generated by [ (x,y) for x in range(width) for y in range(height) ]
Which is several function calls
 
oh
 
>>> for a, b in [(x,y) for x in range(4) for y in range(4)]:
...     print( a, b )
 
8:44 AM
coffeescript has the x..y notation
 
Is perfectly valid and does what you expect but is still a bunch of function calls
 
@KevinvanderVelden Oh, I can actually do that in Java. It's a bit of trickery and magic and fun with implementing your own Range class which implements Iterable in a way which only need the minimum of state data, and only really hides the nested loops, but it's possible. Just not easily.
 
user92578
~20 lines for getting a filename from a dialog in windows seems reasonable
 
user92578
Someday I gotta go trough my codebase and translate all this stuff so that it works on Linux and Mac too
 
@MartinSojka iterable is still a bunch of function calls =p
@Jovito only for generating a list, and you can't do 2 loops in it as far as I can tell
 
8:48 AM
You can zip both lists and traverse that instead.
 
@Jovito that's just doing the function calls sooner =p
(Admittedly, useful if you're going to do the same loop a bunch of times)
 
user92578
Okay now I'm going to make the pasta from the bag
 
user92578
I'll be back in an half and hour or so
 
What do you mean its just a function call? Aren't most procedures reduced to a function call at some level?
 
@Jovito yes, but a loop of for ( int i = 0; i < 10; i++ ) is no function calls
 
8:53 AM
So basically, Java's version would look like for( Pair<Integer> point : new IntegerRange(0, levelWidth, 0, levelHeight) ) with a simple constant Pair<T> class for same-type values and an IntegerRange implementing Iterator<Pair<Integer>> to create an Iterator<Pair<Integer>> on request.
 
So, a new reference type construction and deconstruction and at least one function call per iteration? =p
 
.. and that's the point where you start asking yourself if starting a new life as a hermit in Siberia isn't the better alternative.
 
Does not meet my simple requirements of "No extra function calls"
 
The good news is that you can mark every single class and method in that chain as final, which lets the compiler and runtime strip the function calls and inline the whole thing.
Also, class constructor in Java is heapPointer += class.dataSize followed by executing whatever is in the constructor.
It's the garbage collection which eats processor time like crazy.
Note to Java programmers: Be nice to your garbage collector, reuse your instances.
 
Yeah, so in my js13k the map size is 256*256, that's 65536 extra references to collect for no good reason
While a for ( int x = 0; x < levelWidth; x++ ) for ( int y = 0; y < levelHeight; y++ ) has way less code, is unlikely to have bugs, causes 2 primitives to be allocated on the stack, does not require you to access a value on the heap for every iteration, etc
I'd say that does not actually support multiple for loops in one statement
(Where support means: Can do it in a roughly as efficient fashion as regular ones)
 
9:02 AM
@KevinvanderVelden In the example above, it's one reference for IntegerRange, one for Pair<Integer> (you're not supposed to hold onto them ... and if you want to, clone them first) and one for Iterator<Pair<Integer>>.
As I wrote: Reuse your instances. In this case, the Pair<Integer> instance.
 
@MartinSojka that is going to cause so many bugs =p
Because that is not the expected behaviour =p
I mean, yes it is way more performant but still
 
@KevinvanderVelden Programmers not reading the documentation cause bugs? No, really?
 
@MartinSojka I mean, you could just go the PHP route and make everything behave in a subtly different way. But otherwise people are going to expect a roughly standard behaviour of things
 
Can anybody please explain to me how a vector is actually helping me shooting a bullet to the position of my mouse? I don't get it :c I got the vector distance and even a unit vector but how do these variables serve me? How can I actually use them for my bullet movement?
 
"Don't store instances of this object" is roughly standard behaviour of many, many Java libraries already. In particular when you're dealing with the UI and various renderers, or database connection pooling, or various other classes which optimise away costly operations by first gathering what you're trying to do, then doing them only when you're finished.
 
9:16 AM
@MartinSojka meh, I don't know enough java to go this deep =p
@Don'tclickonmyprofile what would you propose using other then a vector?
(If you say 2 variables, x and y then congratulations! That's a vector without all the helpful bits of having a single class dedicated to it =p)
 
It's just a useful technique to keep in mind when you're dealing with performance issues stemming from creating lots of objects, or costly object creation (like in the case of the database connections).
 
@KevinvanderVelden I really don't know. I am probably too stupid :D
 
@MartinSojka or alternatively use C++ =p
 
@KevinvanderVelden Establishing a database connection is as costly in C++. :)
@Don'tclickonmyprofile The position of your mouse on screen is a vector. The view direction is a vector. The bullet position is a vector. I'm not sure what the question here is ...
 
@Don'tclickonmyprofile I'm serious, try writing a bullet class without using a vector. You'll realize that all you are creating a bunch of code over and over again (adding posX = posX + velX; posY = posY + velY). Then you realize you can just store posX,posY in a single instance and voila, you have a vector class
 
9:19 AM
@Don'tclickonmyprofile The vector from the gun to the mouse pos gives the angle with which the bullet will be shot.
 
Basically, any list of same-type values which are independent from each other is a vector. The amount of values is its dimension.
 
Yeah, so the question "What use is a vector in writing a bullet class?" is basically "What use are the position and velocity in writing a bullet class?"
Which should be fairly obvious I hope =p
 
@KevinvanderVelden yeh you are right
 
So the real benefit of a vector class over 2 separate variables is that you can say pos = pos + vel; (in a language that supports operator overloading)
Which you can read and just understand what is happening
 
9:24 AM
Or you can say position.add(velocity) in one that doesn't.
 
Aah okay, that makes sense
 
@Jovito though .add is kinda ambiguous. Does it modify position or return a new instance?
 
Thank you for the advice :D
 
@Jovito ... which hopefully would greet you with an "Incompatible type: Velocity, expected Position" or similar compile-time error.
 
9:26 AM
@KevinvanderVelden True. Pygame names methods name_ip to signify that they change the object in place.
 
@Jovito it's also why I like operator overloading + is unambiguous, as is +=
 
Python has operator overloading tho.
 
JS unfortunately doesn't.
 
I'm aware, I've used python=p
 
9:27 AM
I know, that's why I brought it up.
 
Vectors are cool, typed vectors save you from bugs like adding velocity to a position without first multiplying it by time, or confusing force with acceleration.
 
user92578
Added bridge collision box generation:
 
user92578
 
cool
 
9:33 AM
That looks really cool :D
 
user92578
Thanks
 
@MartinSojka I don't like to think about types in a dynamic language like python or js.
 
You'd expect the bridge collision box to be a different one from the general terrain collision box (you can generally jump up from below the bridge). Would be nice to have it displayed somehow, maybe using a different outline colour for the collision box.
Well, unless your game treats bridges and terrain the same, in which case disregard that.
 
user92578
Bridges are not jumpable from below
 
user92578
I have different platform visuals for that
 
user92578
9:36 AM
Bridges are just a pure graphical element
 
user92578
And I believe that my debug renderer already renders "passable" boxes with a different color
 
user92578
I think I gotta make a decision on the level data format soon
 
This is a comparison of data serialization formats, various ways to convert complex objects to sequences of bits. It does not include markup languages used exclusively as document file formats. == Overview == a. ^ The current default format is binary. b. ^ The "classic" format is plain text, and an XML format is also supported. c. ^ Theoretically possible due to abstraction, but no implementation is included. d. ^ The primary format is binary, but a text format is available. e. ^ Means that generic tools/libraries know how to encode, decode, and dereference a reference to another piece of data...
 
user92578
It's probably either TMX, or a custom XML format
 
JSON ftw
 
user92578
9:42 AM
I'm not getting into this conversation again
 
though if im sending it over the internet i tend to crunch levels out on a byte level to make them super tiny
 
I typically prefer OpenDDL, with a few custom data types where needed.
 
Intersting, im going to read up on that now
thanks
Yeah similar to the binary parser i wrote for Unity, only uses precise number of bits and keeps things nice and small
 
user92578
For me the decision is a bit tricky, because I can already load TMX files... but then there's really no reason to use a format created for Tiled in the game anymore
 
ITs all binary, it can all be serialised and stuck in a blob in any other format too
depends how big the data is oc
having been used to writing games with a stamp size of 52kb i tend to make everything as physically small as possible.
 
9:50 AM
Heh
I have no idea what that feels like (cough JS13k)
Also I suppose some nintendo ds development
 
yeah right, J2ME was crap. I did a bit of DS development for fun in Uni. So little memory
but taught me a lot of good lessons
pixel perfect collision with bit masks was fun.
The best one was when mobile devices didn't have floating point processors. And calculating physics in fixed point using a single Int. That was fun
 
Always fun, the company I interned at had a fixed point number library for it so =p
 
Yeah i had to role my own........ If i had £1 for each time i swore at rounding errors .....
 
(a template with the base type and an int for where the decimal point is)
 
yeah i had to move the decimal in certain calculations to get the most amount of accuracy depending on the calculation to
like ranges from [0-1] or [1 - 100]
 
9:57 AM
Eep, no fun
 
i wonder what happened to that lib ... ? will have to go through my old Java projects see if ive still got it
might be worth giving away on github
or not...
 
Also using java for that kind of stuff is no fun
 
Yeah JVM's also handle memory differently
another nightmare with J2ME
 
With C++ at least you write one template, add a few typedefs and you're done for all variations possible, with the efficiency of hand writing the variations of each
 
Yeah and it is also running on the CPU not thorugh some random home brew JVM
 
9:58 AM
Yeah
 
So WYSIWYG
 
user92578
Ladder Trigger Generation is working:
 
user92578
 
anywho i could rant about this for hours, need to finish of the last Archetype for this level editor
 
Why does firefox not have requestAnimationFrame, but it does have window.requestAnimationFrame?
 
10:02 AM
Because W3C is a farce ?
 
Well, isn't everything in window supposed to be the global scope?
 
user92578
When coding my player class, I assumed that he will always have a gun (the game's called GunHero). However, now in the edit mode, he has no gun, and I'm getting annoying errors...
 
@Dev2rights or I'm using firefox 12
That would help
 
if ( gun != null ) ?
 
user92578
YEah
 
user92578
10:08 AM
But I need to go around and that to places
 
and not sure, would be a question for my business partner he is more clued up on web tech than me tbh
he is out of the office atm
awaiting the arrival of a new graphics tablet
 
user92578
nice
 
yeah it has a screen embeded in it
cant wait to see the resoloution and colour
 
user92578
sounds awesome
 
user92578
I've been thinking about getting a "dull" wacom thing
 
10:10 AM
yeah, im wondering if you can change the colur profiles to match the screen your designing for though
as otherwise it will never look right
 
user92578
My two monitors don't have the same colours
 
yeah same series iphones dont either
 
user92578
So on somedays I draw on the other, and sometimes on the other
 
ive been reading about applying LUT transformations to the artwork either as post process to the artwork or on the fly
but still screens are so diparitive its somewhat pointless
 
user92578
I'm not sure if a tablet will however improve my pixel art workflow at all
 
10:11 AM
as long as the artwork is all using the same color warmth and tone to match it will look the same uniformly on specific screens
 
user92578
Oh clock is already that much
 
user92578
I gotta start getting back to school, one last english class and then it's weekend time!
 
user92578
see you guys in a couple of hours
 
user92578
11:27 AM
aaaand Im home
 
11:47 AM
He's home! Quick - hide the vodka!
 
user92578
lol
 
user92578
no worries, im not old enough to drink
 
That just means you're not legally allowed to drink, not that you physically can't
 
user92578
Well it kinda means that physically it will destroy me
 
user92578
But anyways, very true
 
user92578
11:52 AM
hide the vodka!
 
I'm not sure if there are legal limits to how old you have to be to be allowed to drink alcohol here in Germany ... Maybe something like the "adolescence" limit, 14? There are however limits to "drinking in public" and "buying".
 
user92578
Oh
 
@Tyyppi_77 welll, that's just a case of your body weight being less
 
"Drinking in public" is 16 if with legal guardians and allowed by them, 18 otherwise I think.
 
user92578
In Finland you're allowed drink "normal" alcohol at the age of 18, and heavy stuff at 21
 
user92578
11:53 AM
or maybe that's just for buying
 
I know the commercials are "Under 16 not a drop" but I don't know if that's the actual law or just what the commercials have to say
 
Should be 18 now
 
Ooh that changed last year apparently
 
user92578
Hmm, I don't feel safe returning a HWND* from a function
 
user92578
But that's what I might have to do
 
user92578
11:58 AM
Oh this is annoying
 
user92578
I want an utility function for easily getting the HWND from an SDL window
 
Wrap it in an opaque type
 
user92578
But I don't want to include Windows.h in a header
 
Hence the opaque type
 
user92578
What's an opaque type?
 
user92578
12:01 PM
I create a struct that contains a HWND?
 
class WindowHandle;
WindowHandle* GetWindowHandle( SDLWindow* );
 
user92578
Ah, right
 
Nope, you don't say what is in it at all. At least, not to the users of the API. The things that can then take a WindowHandle include another header for the definition of WindowHandle
 
user92578
Why didn't I think of this
 
user92578
Thanks
 
12:07 PM
Because I've got a few more years of doing this stuff on me? :p
 
user92578
:D
 
user92578
Translating these things to other platforms is going to be a bit annoying I think...
 
user92578
But I don't have to worry about that now
 
@MartinSojka I live in germany and one can buy beer and several wines and drink them too with 16 years and stronger and high percentage stuff like vodka is okay when you are 18 years old
 
@Tyyppi_77 one of the reasons for the opaque types! You would just have to implement the few API functions, not everything that uses it
 
user92578
12:11 PM
Right, true I guess
 
user92578
Oh for real
 
user92578
They suggest that instead of a "simple" 20 line solution people use this (msdn.microsoft.com/en-us/library/windows/desktop/…) for opening filenames
 
user92578
That if (SUCCEEDED(...)) pattern seems really pleasant
 
user92578
Also the code box is way too narrow for nesting like that
 
user92578
Well
 
user92578
12:18 PM
I suppose that if I do that once properly I won't have to touch WinAPI in a while again
 
user92578
I suppose I could use something like this: github.com/mlabbe/nativefiledialog
 
user92578
But then I can't complain about WinAPI
 
user92578
WTF
 
user92578
I don't get any of the WinAPI methods even tough I included <Windows.h>
 
user92578
Okay
 
user92578
12:25 PM
SDL_syswm can't be included before Windows.h it seems
 
Including windows.h breaks so much
 
user92578
#include <shobjidl.h>
 
user92578
WTF
 
user92578
WHO THE FUCK NAMED THAT FILE
 
user92578
Also, does someone fucking memorize this stuff: HRESULT res = CoCreateInstance(CLSID_FileOpenDialog, nullptr, CLSCTX_INPROC_SERVER, IID_PPV_ARGS(&fileDialog));
 
user92578
12:31 PM
Oh and don't forget to disable OLE1DDE
 
user92578
HRESULT res = CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
 
user92578
are you fucking kidding me
 
user92578
I gotta reinterpret_cast an object to a void**
 
Joe
good morning gdse
 
user92578
hey joe
 
Joe
12:42 PM
hows it going in here
 
user92578
enjoying some quality time with WinAPI
 
Joe
fun fun fun
 
user92578
Okay that seems to work
 
12:59 PM
can you guys tell me why this doesn't work as expected? codeshare.io/Z8nqL
 
user92578
What happens?
 
user92578
And most importantly, what is supposed to happen
 
What tyyppi said
 
My player is supposed to go to the mouse position
 
user92578
I appreciate the editing effort Almo :D
 
1:02 PM
:D
@Don'tclickonmyprofile what I saw in that code before you edited it was if the player was further from the mouse than 1, it would add its speed to its position.
what you need is to set the speed in such a way that the player moves closer to the mouse.
 
Thank you for that life session solution. Who ever that spooky ghost coder that was :P
 
user92578
No problem man, glad I could help :D
 
user92578
How familiar are you with vector math?
 
I learned that stuff like 3 years ago lmao
when I was in 11th or 12th grade
 
user92578
Ah, yeah
 
1:08 PM
Forgot about all that stuff :D
 
user92578
So you can understand what I did?
 
To be honest not yet. I try to figure it out now. #MySlowBrain
 
user92578
I can explain it to you
 
user92578
Come to the code :D
 
user92578
 
They already got some of that stuff :D
they even got normalize
 
user92578
Yeah
 
user92578
Vector is probably the most used type atleast in my game
 
Is your game already playable :D?
 
user92578
Yeah it is, I play it to test all the new things, but it's not in public testing yet
 
user92578
1:18 PM
Currently I'm working on an in-game level editor
 
user92578
I dumped Tiled and started making my own
 
kewl
will it be cross platform?
 
user92578
That's the goal
 
user92578
However currently some features might now work on some platforms
 
user92578
But I think I've written those that the game doesn't crash on other platforms that Windows
 
1:19 PM
Where do you mainly develop on?
 
user92578
Windows
 
user92578
I use SDL for everything, and that's crossplatform
 
user92578
But there's somethings that SDL can't do for me, so then I gotta use the awful winapi
 
I always found it too exhausting to download modules on windows. Ob ubuntu everything is so easy
kek :P
 
user92578
Hmm I wonder what would be a good way to design the spawn point placing
 
user92578
1:23 PM
I could do that automatically, as the player(s) always spawn with the parachutes
 
user92578
Or I could make it a brush tool
 
user92578
Or I could add trigger tools and make it one
 
1:41 PM
holy shit I think I have my layout stuff figured out
wow that was a hassle
 
user92578
nice
 
though I THINK I have the rules figured out, so I shouldn't have to worry about it again
I can hope anyway
looks like doing the gradient won't be easy though. In SpriteBuilder, there's a built-in gadget for it. Took me like 5 minutes to implement it.
Stand back! I'm about to open GIMP! (I am not responsible for any profanity you may see in this chat until I close it)
 
user92578
lol
 
"This is a sophisticated tool that may take a bit of effort to understand."
always encouraging.
with regard to the gradient editor.
ok, I'm stumped
I have a gradient, and I want to set the opacity to 0.2 on one side, and 0.85 on the other side
What I don't see is how to set the opacities of the endpoints directly
it seems to want all or nothing
"There is no 'undo' available within the Gradient Editor, so be careful!" Gotta love GIMP.
 
00:00 - 14:0014:00 - 00:00

« first day (1856 days earlier)      last day (3168 days later) »