Skip to content

u/ImmaZoni

In this archive from Feb 2020 to Sep 2026

2
posts
21
comments
0
media
718
score

Top posts

Top comments

Gravitational lensing by a galaxy bends quasar light into different paths that reach Earth at different times. Since light's speed is constant, paths of varying lengths result in us seeing the quasar's images as they were at different times. It's like four broadcasts of the same event with varying delays but reaching your TV at the same time.

(This is my understanding at least)

19 points

Honestly, this is one of the biggest hurdles when starting out (at least it was for me). It can feel like you're just adding extra lines of code for no reason if you're not repeating anything.

But methods aren't just for avoiding repeated code. They're mostly about organization.

If you throw everything into Update(), it gets messy fast. Compare:

void Update()
{
    HandleMovement();
    HandleJumping();
    UpdateHealth();
}

Vs.

void Update()
{
    // 75 Lines of movement 
    // 85 Lines of Physics 
    // Etc
}

Even if HandleMovement() is only called once, you can look at Update() six months later and immediately understand what the code is doing without digging through all the math.

They're also useful because game engines (and other general programming frameworks) rely on methods as entry points. Unity can call OnCollisionEnter(), button events can call StartGame(), etc. You don't always call these methods yourself, the engine or other programs do.

And when something breaks, having logic separated makes debugging WAY easier. If jumping is broken, you know where to look. You can even temporarily comment out HandleJumping() to see if it's causing the problem.

So I wouldn't think of methods as a way to reduce the number of lines you write. Think of them more like labeled folders for your logic. You're giving a chunk of code a name so you don't have to mentally parse all the implementation every time you look at it.

14 points

I feel like this is a winning formula for game-movoe adaptations.

When they try and make it shot for shot, it will never work because we all think "no, that's not how you do it, you grab the x from y..." because we were literally in the directors shoes when we played the game... if they just capture the universe but never do the exact same thing there's no chance for "hey that scene is wrong" type moments which is what gets everyone with those types of movies

Idk if any of that made sense lmao

6 points

Subreddits

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.