hopefragment: (haji010)
Hajime "panty king" Hinata ([personal profile] hopefragment) wrote in [community profile] reverielogs2018-05-17 06:28 pm

[open] network/action; pew pew pew

» WHO? Hajime Hinata and NERDS
» WHEN? anytime after 5/17
» WHERE? the observatory OR the bar, either place
» WHAT? come play copyright-infringement-free galaga with him
» WARNINGS? none??? please i hope we don't need them he just wants to play vidya

[A text goes out over the network from username hinatahajime, sometime midmorning of the 17th.]

hey, uh, i found my gamegirl just sitting in the cafeteria earlier. the only game in it was my copy of gala omega, but if anybody's as tired of staring at the walls as i am, you're welcome to come play it with me. i'll be in the observatory for a while, but i might head to the bar later

[When he gets tired of sitting on the floor, that is. Either way, he can be found in one of those places playing his totally-not-a-gameboy. He called it Gala Omega on the network, but it's clearly Galaga.]
bu773rfly: (14)

[personal profile] bu773rfly 2018-05-25 01:08 am (UTC)(link)
[1) There's something in his voice that Erika isn't sure what to do with. It fits neatly with other puzzle pieces laid out in her head, and she's loathe to look at the full picture for fear of wanting to do something about it and being unable.

2) There's something in his voice that makes sense. She's always had a bit of an edge, even before it became a massive, unnatural advantage, but hacking back then wasn't a personal hobby - it was something she did with Ryuji, to get his attention, to make him proud, to spend time together like siblings should.

3) holy SHIT stop having feelings in her vicinity it burns us precious.]


Don't get, [mushy, but she physically can't finish that sentence so he'll have to infer it from the way she just closes her eyes coolly to dodge a fluster.] It's no problem, though. You seem like you pick things up at a decent pace.
bu773rfly: (36)

[personal profile] bu773rfly 2018-05-25 03:50 am (UTC)(link)
[She opens her mouth, and then closes it, looking annoyed.]

...That's right, we don't have paper or pens around here. That would make it easier, but...basically, first you determine what parts the program will need and what each of those parts has to do, then you write the program according to your plan. For this, step one involves playing the game and taking notes on how it works. But they'll have to be mental notes, I guess. [shrug...]
bu773rfly: (4)

[personal profile] bu773rfly 2018-05-25 05:02 am (UTC)(link)
That could work. You might prefer graphical diagrams, though. [ehhhnnn it's not like they have a choice though.

Erika starts making small, contained gestures in the vague direction of the Gamegirl's screen as she talks.]
Anyways...you're familiar enough with the game to start from memory. The basic programming concept behind old games like this is that the game is...constantly flipping through "frames", like in an animated show. One frame is the shortest time that any change to the game can be made in, like the position of the player or enemies, or the points total. Each frame that passes is an opportunity to check inputs and conflicts and update what's happening on the screen. That can be things like "the player is pressing left, move the ship left", or "a bullet is touching an enemy, deal damage to that enemy".
bu773rfly: (26)

[personal profile] bu773rfly 2018-05-31 11:09 pm (UTC)(link)
Well.

[....

Oh god there's so much.

She fires up her communicator and does some NONSENSE WIZARDRY to back out of the network UI and get into a coding environment.]


You know Ponk, right? I'm going to use it to demonstrate the principles, since all the game elements are just basic shapes.

[And so she goes.

As promised, she's not the best teacher. She bangs out the code that makes up the shell of the game, promising to explain it later, then moves through the draw function, in order of declaration rather than building up from basic to complex elements. Questions are required to keep her completely on track. But she answers them thoroughly, and goads Hinata to ask them if he shows signs of folding on them out of embarrassment.]


...and all of that is what the game does every frame. Check object velocity, update the screen based on velocity, then update velocity based on interactions between objects. So, to make the paddles move based on button presses, what variable has to change when a button press is detected?
Edited 2018-05-31 23:12 (UTC)
bu773rfly: (8)

[personal profile] bu773rfly 2018-05-31 11:38 pm (UTC)(link)
Right. In this case, just velocity, though you could have it directly control paddle position.

[And the relevant code gets punched in.]

The reason I didn't here is because...hm. It's a principle. It's easier to read and follow if you have the draw function do all the direct modifications to position, then have everything else create inputs for the draw function. Like...imagine all the buttons on your TV remote worked normally, except to change the volume, you had to crack it open and manipulate the circuitry directly. It's kind of like that? Messy design works, but it's harder to keep track of. Programming is as much about the human element as the machine element.
bu773rfly: (20)

[personal profile] bu773rfly 2018-06-01 04:03 am (UTC)(link)
Sure. Right now...

[Save, compile, run. What comes out is Pong - sorry, Ponk - stripped down, with no scorekeeping and no movement from player two.]

...Maybe I should have you build this before we move on to Gala Omega.

[She looks thoughtful. Teaching really does not come naturally to her.]
bu773rfly: (13)

[personal profile] bu773rfly 2018-06-01 01:28 pm (UTC)(link)
You're going to. Not without guidance, but you can't learn without doing it.

[She gives him a sideways glance, checking to see how serious his protest was. Then she opens up a new window and rapidly does something in it, dunks the resultant file in a message, and fires it off to Hinata.]

That's a shortcut to the coding environment. Open it up and I'll walk you through each line...

[Here comes a crash course on syntax and god knows what else.]
bu773rfly: (38)

[personal profile] bu773rfly 2018-06-01 04:17 pm (UTC)(link)
[He's coming along, and Erika's getting a sense of what concepts build most naturally on others, a distinction lost when you're used to seeing the whole thing as one big interwoven world. Can she extend this to networking? Will he pick it up as easily without the visual aspect?

He thanks her, and for once, Erika doesn't brush it off, only nodding in acceptance. The impulse is there, but there's something real and solid about this moment that makes her take him seriously and weigh the sentiment; for an instant she finds herself on the other side of the dream, not Erika playing at living in space but a stranger in space remembering at being Erika.

It fades, but leaves echoes behind.]


I got into this because of my brother. [There's a human element, she said. It was a bit of an understatement; there are human elements, plural, and omitting them does no service to his education. Maybe the gloss will come off the idea of talent if he understands how much of it is up to fate.] He's older, and it was just one of those things...spending time together is better when you have an interest in common. He was a much better teacher than I am. Do you have any siblings?
bu773rfly: (14)

[personal profile] bu773rfly 2018-06-01 05:39 pm (UTC)(link)
[Ouch.

It's not his fault. Grief washes up and rattles her ribcage; she presses the pain down until it burns down to glass. She opens her mouth and the smoke comes out as frustration.]


No wonder... [She reaches over and kind of. grabs his upper sleeve with a few fingers and gives him a reprimanding yank.] I'm not telling you this to get platitudes back. He taught me, and I'm teaching you, so you need to learn your history.
bu773rfly: (39)

[personal profile] bu773rfly 2018-06-01 05:56 pm (UTC)(link)
[god fucking dammit, hinata.

She can't muster a smile to return to him, but that's not out of character for her, anyways. He gets a solemn nod.]



[hope fragment get, or something??]