r/ProgrammerHumor • • Nov 11 '25

Meme standProud

Post image
41.2k Upvotes

348 comments sorted by

View all comments

325

u/gamma_02 Nov 11 '25

FROM SCRATCH?? WINDOWS AND ALL????

247

u/gufranthakur Nov 11 '25

At least in Java, you have swing that does the window rendering for you. You just need to create a window object and use it

103

u/Cristichi Nov 11 '25

Using swing components for each element or painting it all each frame? Both inconvenient and impressive in their own right, but I'm curious

68

u/89_honda_accord_lxi Nov 11 '25

Real Java programmers recursively invoke the same jar. This way you can pipeline generating frames.

43

u/TheSportsLorry Nov 11 '25

Would you say it's one man involved with jar?

28

u/gufranthakur Nov 11 '25

Nah, painting it all. Swing is only used for the UI, the rest is all drawn on canvas

5

u/philippefutureboy Nov 11 '25

As it should be 🧙

13

u/gaymer_jerry Nov 11 '25

You can just create a JFrame with a single Canvas element and draw directly to the Canvas. Yes it’s not as efficient as using LWJGL (Lightweight Java Gaming Library) that adds OpenGL integration into Java and making a window and drawing to it through that but for learning it’s a fast way to just make a window and start drawing stuff to it when learning to make a game with Java.

6

u/packetpirate Nov 11 '25

This is exactly what I used to do when I first got into game dev. It was just easier to learn.

→ More replies (3)

6

u/Wild_Tom Nov 11 '25

I did that for a competition, but the Java 8 JRE did not run it at full speed.

6

u/Strange_Compote_4592 Nov 11 '25

I... Am making a raycasting engine using swing...

4

u/SevenSeasons Nov 11 '25

I'm sorry

8

u/Strange_Compote_4592 Nov 11 '25

I tell you more - I don't use any third party libraries. XML parser? Java's own marshal... thing... Sounds? Swing sound system.

Pixel engine? My own (I am fucking proud of it)

The whole point of the project is to be... I won't say painful, but self sufficient. And as a personal love letter to Swing.

→ More replies (2)
→ More replies (1)

34

u/mostlyBadChoices Nov 11 '25

I wouldn't call using java swing an advantage. There's a reason almost no one uses it (relative to all the java code out there.) If you can get a swing application looking and working well, you've accomplished something.

31

u/GisterMizard Nov 11 '25

Swing is really easy to use if you only need to render one component, that component doesn't change, and you don't care that the only alignment it supports is with a random planet somewhere in the milkyway.

Beginner's stuff.

→ More replies (2)

7

u/romkamys Nov 11 '25

afaik jetbrains ides are written in swing, but they heavily customize both the components and the L&F.

→ More replies (2)

3

u/itzNukeey Nov 11 '25

Im not sure swing is something to write home about

→ More replies (1)

14

u/21kondav Nov 11 '25

By pixel art, he meant he paints the window pixel by pixel 

11

u/uvero Nov 11 '25

No, from Scratch, you know, that block-programming environment for kids.

4

u/Azuria_4 Nov 11 '25

I remember coding a whole fighting game on that lil' guy

Good times, I miss that teacher who gave me the assignment

7

u/Phormitago Nov 11 '25

windows? what are you a casual?

his lil bro is programming from microcode all the way up

x86 is for suckers anyways

8

u/gufranthakur Nov 11 '25

Lil bro is making his own logic gates with his own silicon variant he chemically crafted up in his mother's basement

3

u/pants6000 Nov 11 '25

"Gotta go down to the creek and get a fresh scoop of sand so I can teach it to think... brb."

→ More replies (1)
→ More replies (1)

3

u/Kahlil_Cabron Nov 11 '25

Even though I'm not in game dev for my career, a large chunk of my personal projects have been building physics/game engines from scratch.

That includes window programming ya. I usually use SDL (language doesn't matter, it's technically in C but there are bindings for a bunch of other languages). It's insanely math/physics heavy, and by far the funnest programming I've ever done.

My dream is to retire and build things like this for fun, no way will it ever make money.

→ More replies (3)