« first day (1888 days earlier)      last day (3139 days later) » 

9:00 PM
@MickLH Lol when I said i was going to disappear, I meant I was going to start learning C without any distractions :P
 
user4704
@TheMuffinCoder I mean you'll need to start with some basic concepts, yes.
 
@TheMuffinCoder If you want, I have an assignment that has really "shined" with the people who have asked me to tutor them.
 
user4704
But it's better to, for example, attempt to write a guess-the-number game than to "learn about rand()"
 
I have them write a program that can input 2 arbitrary length numbers and add them together.
 
user4704
If you do the latter it's easy to fall into the trap of reading a few pages on what rand() does and think that means you "know" it, but you've never actually used it or had any experience with it, so you don't really and you're like to easily forget it
 
9:02 PM
They grind their brain on loops and pointers for a while and eventually something clicks, I let them enjoy that for a while and then I say: "Now do it with multiplication."
Then I move them on to C++ forever after
 
user4704
Concrete tasks like writing a program to do a particular thing help give you applied practice, help you focus around a clear goal and success conditions, and can feel more rewarding and engaging than writing a dumb program that calls all the various push_back or insert methods on a vector to "learn" it.
 
and btw, Josh and I are still saying the same thing in different ways :P
 
if you don't know a particular thing because of a gap in your task-oriented learning, this is what happens:
"Hey, lead programmer, how do I store these things?" "Use a vector." "3 floats?" "No a vector." "What's that?" "Here's some sample code." "Oh, cool, thanks."
^ is a true story.
don't worry about knowing everything. worry about building software that works.
 
Lol I was going to initially write this game with JavaScript
 
Arrays had always suited my purposes, so I never had any reason to learn vectors.
 
9:06 PM
But i want to make it really shine and add a lot of particles :D
 
final note from me until more questions come in... That assignment I described above is actually tested and fine tuned over time with a good number of students.
It probably sounds silly, but it has hidden challenges and I would highly recommend it as a benchmark for when you "know enough C" and should be focused on C++
 
; - ; I can't start yet since I'm waiting for codeblocks to install
 
36 mins ago, by Ali.S
@Almo who needs tools? when you have cmd?
I'm partly joking, an IDE is wonderful.
But I just didn't like Code::Blocks and rather use a command prompt if those are my options :P
 
I just want to follow the tutorial first, once I have a grasp on how things work I'll move to VS :P
 
I actually love clang++ for its error messages.
If you can use that, I'd recommend it. It actually DESCRIBES the error (holy shit) and shows you the line with a nice little ASCII art showing the exact character it choked on
 
9:19 PM
My wolf sprite spontaneously turned into 2 sheep and 3 chickens
I suspect something might be off with the sprite management
 
Or maybe you pissed off a wizard
... (in game, that you forgot you coded)
 
It's weird because it didn't happen with the previous sprite
Oh well
Plenty to debug now I suppose
 
yeah those damn wizards
 
Maybe I should just rewrite that class
 
eh, just send them to hogwarts
homeschooling doesn't give a young wizard a chance to grow social skills
 
9:21 PM
Really I could understand turning into another sprite
But 5 sprites?
I am impressed
I guess something fucked up with the width of the selection
 
Off by one error overwriting a buffer?
 
Jon
have you ever heard the tale of the duck?
This started as a piece of Interplay corporate lore. It was well known that producers (a game industry position, roughly equivalent to PMs) had to make a change to everything that was done. The assumption was that subconsciously they felt that if they didn’t, they weren’t adding value.

The artist working on the queen animations for Battle Chess was aware of this tendency, and came up with an innovative solution. He did the animations for the queen the way that he felt would be best, with one addition: he gave the queen a pet duck. He animated this duck through all of the queen’s animations
Eventually, it came time for the producer to review the animation set for the queen. The producer sat down and watched all of the animations. When they were done, he turned to the artist and said, “That looks great. Just one thing—get rid of the duck.”
 
Is this a real example? Or a re-skin of the proverb with the guy with the chisel?
 
yup, I heard that. My understanding is that it is in fact true.
 
Lol, that guy took the proverb with the chisel to heart, and to good effect
Damn I can't remember where it comes from at all, but it's a story about a guy who does the sculpture self portrait for the rich man. He purposely leaves the nose messed up, so that when the rich man complains about it, he gets to finish his true work of art.
Instead of finishing it, and then the rich man defecates on some part of the perfection.
 
Jon
9:28 PM
it is a real story
but its on the internet so who the hell knows
 
Battle Chess is the very definition of style over substance.
it's just chess, and not with a very good AI. But they sold tons of copies because of the graphics.
 
Jon
The idea that some team leader probably felt the need to have some form of control, and that a mastermind designer planned it all out, is a pretty fun story
any programmer would eat up that story
 
It's real good advice...
 
Pip
Programming time!
 
I learned it the hard way, even after hearing that proverb
My first coding job, I did everything perfect. Flawless fully tested and exactly to spec.
 
Jon
9:30 PM
LOL, didn't we all
 
Jon
although, I revised some of the code I produced at my first gig (I brought it home)
And it is really bad
 
Pip
So.... MonoDevelop with all of the stuff I love about Linux or VS with all of the stuff that I hate about Windows?
 
Jon
LIke, back then, I thoguht I knew what I was doing
 
Pip
(Working on a thing that I'll be blogging about)
 
Jon
9:31 PM
LOL, @Pip
 
@Pip I vote MonoDevelop because I don't have to open up VirtualBox for it
 
Jon
well, you can technically NOT use direct X
 
Pip
lol
 
Jon
The point of monogame was to make XNA more portable
And I think they succeeded at doing that
 
Pip
uh huh
 
Jon
9:32 PM
Even though their mobile support is grasped by the balls
 
Oh yeah ditch MonoGame just use SDL
oops
@Jon That was my mistake... now I still do it exactly to my vision, but then I go back and misinterpret some detail and deliver the "broken" version instead
 
Pip
But I like MonoGame and the reason I'm doing this is to demo a library that I've been contributing to :P
 
Jon
I love monogame
Just wish Xamarin would be more cool
Xamarin is the anchor
 
Pip
Agreed. Then again, I'm a student so I have a free Business class license :P
 
Jon
Monogame needs to release open source mobile libs
 
Pip
9:33 PM
They can't really
 
Jon
weighing them down man.
 
Pip
everything is built on top of Xamarin
 
Jon
Unity, UE
 
Pip
But I agree, it is
 
If MonoGame didn't feel like an esoteric language, I'd not hate it so much
It's actually exactly the level of "engine" I want.
 
Jon
9:35 PM
Same here
fuck its so nice to work with
 
Pip
@MickLH check out Monogame.Extended!
 
I'm sorry @Pip, I can't deal with their rendering philosophy
 
Pip
we're working on making extensions for MG to mkae it.... better :P
Howso? What's wrong with it?
 
It takes more than 5 minutes to learn how to write a deferred shading renderer
 
Pip
I have no idea how to do that in any language
 
9:37 PM
Pseudocode is the only language that should take longer than 5 minutes, the first time lol
Then once you see how simple the concept is, you'll hate EVERY half assed piece of shit everyone tried to put together and call a "graphics library"
Including OpenGL and DirectX, but those will rise to the top for their simplicity and performance
(neither of them are simple, or really even all that performant given the raw power they use)
@Pip I remember now, it's the content pipeline
Nothing else was a huge problem IIRC
 
Pip
Content pipeline has been.... sorted!
pretty much
 
@MickLH can you help me with piece of C++ code?
for (unsigned k = 0; k < coded.size(); k++)
{
	unsigned x = coded[k];
	lockedLevel.put(x % 256); x /= 256;
	lockedLevel.put(x % 256); x /= 256;
	lockedLevel.put(x % 256); x /= 256;
	lockedLevel.put(x % 256); x /= 256;
	int length = lockedLevel.tellp();
	assert(length % 4 == 0 && "Somethings wrong");
}
why am I getting an assert?
any one?
 
user4704
@Ali.S tellp() tells you the position of the put pointer.
 
user4704
Are you sure it was on an appropriate boundary to start with?
 
@JoshPetrie so why is it not always divisible by 4?
 
user4704
1 + 4 is not divisble by 4
 
user4704
What's the thing's actual value?
 
9:56 PM
@JoshPetrie this line happens just before that loop:
ofstream lockedLevel(text);
at the end of each iteration it should be tellp should return something divisible by 4 right?
 
user4704
What's the type of text?
 
user4704
I see why you think that but just because put takes a char doesn't mean you write a char to the stream
 
yeah that could be it
 
user4704
put() does formatted output
 
thanks
 
user4704
9:58 PM
ofstream's two constructors for char * and std::string do slightly different things (the std::string one does more than the char * one)
 
yup that was the problem
thanks
 
user4704
Oh, actually, I guess I'm wrong, there are no material differences between the two ctors. I was thinking of the difference between default and non-default.
 
this one did the trick: ofstream lockedLevel(text, std::ios::binary);
I just expected that put doesn't format the string...
 
user4704
That suggests that you really should not be using put()
 
user4704
One of your characters probably ends up being something subject to transformation, maybe a newline.
 
10:01 PM
@JoshPetrie that's the whole writing function...
@JoshPetrie is there any other character that could be transformed?
 
user4704
Yes.
 
that's something new I'm hearing... like what?
 
user4704
Depends on your locale and various other crazy things.
 
user4704
Although apparently put is considered unformatted output.
 
user4704
So perhaps what is happening is that hte underlying buffer is doing formatted/unformatted output based on std::ios::binary.
 
user4704
10:05 PM
(that is, the result of rdbuf())
 
user4704
yeeees that must be it
 
user4704
that ctor calls rdbuf()->open() and passes the ios flags
 
user4704
iostreams are dumb
 
this animation function is driving me crazy
just will not work
 
Pip
That sucks :/
 
10:11 PM
two of us been trying to solve it but it won't behave properly.
 
hey guys
 
HAY
WHAT UP
 
WHY ARE WE SHOUTING?
 
IT"S FUN
 
Jon
I FARTED
DID I SAY THAT OUT LOUD?
 
10:18 PM
Don't suppose any of you would like to try tackle this problem: jsfiddle.net/aumyfbhr for some reason when you click to move the camera, it moves in the opposite direction
and i did try simply applying 0-x and 0-y to the values and it breaks it :P
 
I drag up, the things move up
you want it the other way?
@Dave
 
yeah the camera is meant to move to where you click
so the objects would move opposite direction
 
ok
I got a lol game goin, so I can't look at this moment
if you don't have it in 45 min, i can look
 
well i been at it for 4 hours :P so next 45 min is unlikely rofl
 
Pip
@Wardy sup Wardy?
 
10:23 PM
this n that
 
@Pip nice hat bro ;)
 
Pip
to you as well. tips hat
I'm getting some really freaking odd behavior
wtf
Sorry, I don't JS. probably an == vs === for all I know
 
what is the behaviour you are getting
 
Pip
I locked the y to 2
check out what the x does
 
Not sure what you mean locked y to 2
i see targetY = 0
but camera.y starts at 250 so its going to move to 0. if you want the camera to not move on y you need to set targetY = camera.y
@Pip were you trying to do this: jsfiddle.net/aumyfbhr/3
thats with a locked y to 0
 
Pip
10:37 PM
not what I meant
in my example, there's odd x behavior (ik about the y starting at 250, not 0)
 
it was because you changed the targetX calculation
 
Pip
oh I see
I thought I changed that back, sorry
 
the calculation currently converts position on element to position in world space
 
Pip
but it or the easing is not working
seems to be the two places math is done
 
i feel like function fraction() is the issue
with how i update the camera
 
Pip
10:43 PM
possibly
Anyone doing the October challenge btw?
@Chris @Almo @IcyDefiance @Jon ?
 
Jon
@Pip
 
Jon
i should
that damn block game
 
Pip
mhm
 
Jon
Punch Out: The Story of Doc
Punch Out: Vodka Drunkenski's Later Years
missed opportunities? Probably.
 
10:59 PM
@Pip I don't do game jams. I have enough projects I want to do already.
I don't need to spend any dev time I have on anything else
 
did you win almo?
 
no, LB fed ekko early and blamed our first pick for not banning darius
you got your camera thing figured?
 
Pip
@Almo not really a game jam, check it out!
 
Jon
fuck man
you can get fallout 4
25% off
greenmangaming
 
no i ain't got it working yet. do you still have the link @Almo?
 
11:01 PM
yeah
refreshing and will take a look
I don't understand how the control works. where's the mouse event?
 
its declared up top
can you link me again so im on same version as you
 
line 12
when you click will call function animate
thats where all the maths is going on. all the rest of the code outside of that is just to display it in the canvas
which you can largely ignore
 
can I filter out the fucking SHA warnings?
stupid shit
 
the what? i get no warning
you on firefox?
 
Pip
11:08 PM
I saw them, on FF
 
yeah FF
This site makes use of a SHA-1 Certificate; it's recommended you use certificates with signature algorithms that use hash functions stronger than SHA-1.[Learn More]
spams that over and over in the console
 
hm =/
i use chrome for developing with JS
 
:)
I don't quite understand how your code works still. Looking through it.
 
just let me know which line you want explained
 
I don't undertand ctx.translate, and how that relates to the camera and the objects getting drawn
this looks like just a coordinate flip in there somewhere
 
11:14 PM
say your at 0,0
camera needs to focus at 0,0
 
if I just click without dragging, the thing moves
 
to you translate based on it's current position (it starts of at -el.width/2 and el.height/2)
oh yeah don't click and drag
just click :P
 
I don't understand your program at all then
what's a click supposed to do
 
make the camera move and focus on where you clicked
for example, click a blue square the camera (red dot is the focus point) should move to that blue square you clicked
 
so if I click on a blue block, it should move to the center
 
11:16 PM
yeah the red dot displays the camera's focus point
you should notice it goes to the polar opposite to where you click
 
function draw()
{
    ctx.clearRect(0,0,element.width,element.height);
    ctx.fillStyle = 'red';
    ctx.fillRect(element.width/2-2,element.height/2-2, 4,4);

    ctx.translate(camera.x,camera.y);
    ctx.fillStyle = 'blue';
    for(var i = 0; i < obj.length; i++)
    {
		ctx.fillRect(obj[i].x-10,obj[i].y-10, 20, 20);
    }
}
I don't get why changing draw() to that stops drawing the blue blocks
why translate to camera.xy then translate back
why not draw the red first
but when I do that, it breaks
something screwy in here
 
what is the value of camera.x and y currently?
 
250, 250
 
so essentially it is drawing as obj.x + 250 (same for y)
 
ok then I don't understand what translate means
function draw()
{
    ctx.clearRect(0,0,element.width,element.height);

    ctx.translate(camera.x,camera.y);
    ctx.fillStyle = 'blue';
    for(var i = 0; i < obj.length; i++)
    {
		ctx.fillRect(obj[i].x-10,obj[i].y-10, 20, 20);
    }
    ctx.translate(-camera.x,-camera.y);
    ctx.fillStyle = 'red';
    ctx.fillRect(element.width/2-2,element.height/2-2, 4,4);
}
that translates the camera to x,y, then back again
that's what it looks like to me
 
11:22 PM
you could remove the second translate and put the first one as -camera.x and -camera.y i believe
but then your camera values all have to be negative
 
waht does translate do?
I don't understand
 
it moves everything
so top left is no longer 0,0
 
what's "everything"
you have to be clear
 
say you translate by 10,10
and draw an object at 0,0
 
I don't know this graphic thing you're working with
 
11:23 PM
that is now 10,10 on the output screen
so you would see the object no longer right up in the top left corner it would be 10 pixels left and 10 down
 
so why does translate (x, y) draw translate(-x, -y) draw behave differnetly than draw translate(x,y) draw
i see it shifted by 0 at the first draw then x, y at the second
in the second case
 
if you wanted something not drawn related to camera (say a fixed user interface)
 
I see it shifted by x y to draw then 0 second in the first case
 
you need to set the translate back afterwards
otherwise the ui would also move with the camera which is not good :P
 
so why does draw red translate draw blue not behave like I expect?
you have translate draw blue translate back draw red
why translate back? why not draw red before translate, then draw blue
but when I try that it doesn't work, which means I don't understand translate
 
11:26 PM
the red dot represents the camera's focus
 
but what you're telling me sounds like what I think it shoulkd be doing
 
that should always be middle of the screen right?
 
so draw it first
before any translation
 
well ok i could also draw it first yes.
 
but you can't it breaks
 
11:27 PM
let me try
 
function draw()
{
    ctx.clearRect(0,0,element.width,element.height);
    ctx.fillStyle = 'red';
    ctx.fillRect(element.width/2-2,element.height/2-2, 4,4);

    ctx.translate(camera.x,camera.y);
    ctx.fillStyle = 'blue';
    for(var i = 0; i < obj.length; i++)
    {
		ctx.fillRect(obj[i].x-10,obj[i].y-10, 20, 20);
    }
}
it doesn't even draw the whole red square. there's a pixel missing
 
for some reason jsfiddle is down for me
 
:(
 
okay i see what you mean
do you get that output
@almo
i know whyi
because every draw call
is translating
if you don't undo it
 
ok
 
11:34 PM
itll just translate more and more every time
 
that i get :)
thanks
 
so it isn't broke they are just miles off screen
 
:D
I figured there was a good reason
 
you worked it out yourself didn't ya :P
 
now I understand that, i'll look more
no I didn't
pizza here soon
i'll try to find it by then
gotta go
look at where you set targetX and targetY
I think that's backward
 
11:40 PM
hmm
 

« first day (1888 days earlier)      last day (3139 days later) »