this post was submitted on 17 Oct 2024
1066 points (99.0% liked)

RetroGaming

19338 readers
1507 users here now

Vintage gaming community.

Rules:

  1. Be kind.
  2. No spam or soliciting for money.
  3. No racism or other bigotry allowed.
  4. Obviously nothing illegal.

If you see these please report them.

founded 1 year ago
MODERATORS
 
top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 45 points 10 hours ago (1 children)

If you’ve written 500k lines of code you were surely pretty confident about your decision.

[–] [email protected] 25 points 9 hours ago (1 children)
[–] [email protected] 10 points 8 hours ago* (last edited 8 hours ago) (2 children)

I’m a developer, I don’t just continue doing things for years if it doesn’t make sense.

(If I’m the one making the decisions)

[–] [email protected] 3 points 40 minutes ago

Like the classic, inherit a broken code base, and not being allowed by the owner to rewrite it from scratch. So you have to spend more time making each part work without the others working. Also before you are finished the customer says they have something else for you to do

[–] [email protected] 13 points 6 hours ago (1 children)

I have seen Devs do things for many years that make no sense

[–] [email protected] 5 points 6 hours ago

programmers just not a uniform bunch. not all of them blockchain grifters. fancy that.

[–] [email protected] 113 points 17 hours ago (3 children)

Roller coaster Tycoon is one of a lifetime game.

Now everything is electron or react shit. Gone are the times of downloading fully featured software under 10mb.

[–] [email protected] 8 points 3 hours ago* (last edited 3 hours ago) (2 children)

I don't think old=good is a good mentality though, lot of people seem to have it

All the old software I know and use is exceptionally good, however I've heard about and chosen to use it because it's survived the test of time (also because it's still actively maintained and has had thousands of bug fixes over the years)

Vscode and obsidian are pretty good and they're electron, discord's alright, pretty sure steam uses some kind of web wrapper as well.

Real issue is electron is very accessible to inexperienced developers and easy to do badly, but I imagine people back in the old Unix days got an equal amount of shit bloated software

[–] [email protected] 1 points 4 minutes ago

A fucking calculator needs megabytes to run? And I'm not talking about a full fledged graphic scientific calculator. I'm talking about a basic one.

[–] [email protected] 5 points 2 hours ago (1 children)

Discord is garbage software lmao. Has been from the beginning. I can't stand using it.

[–] [email protected] 1 points 2 hours ago

Seconded. The only reason I have it installed is because my buddy refuses to answer his cell while we play games.

[–] [email protected] 31 points 6 hours ago (3 children)

Fun quote from an interview with Chris Sawyer:

Latterly the machine code came back to haunt us when the decision was made to re-launch the original game on mobile platforms as RollerCoaster Tycoon Classic a few years ago, and it took several years and a small team of programmers to re-write the entire game in C++. It actually took a lot longer to re-write the game in C++ than it took me to write the original machine code version 20 years earlier.

[–] [email protected] 1 points 35 minutes ago* (last edited 32 minutes ago)

Is there not a way to take assembly and automatically translate it to some higher level language?

Edit: Post-post thought: I guess that would basically be one step removed from decompilation which, as I understand it, is a tedious and still fairly manual process.

[–] [email protected] 5 points 4 hours ago (1 children)

Well worth it. The mobile version is amazing, that is to say, almost exactly the same as the original.

[–] [email protected] 3 points 2 hours ago

I guess i just found out there's a mobile version.

[–] [email protected] 12 points 6 hours ago (2 children)

Further proof C++ is a pita

[–] [email protected] 7 points 2 hours ago

It's probably not because it's sucks. It's because they're trying to perfectly replicate an existing target. They have to read the assembly, digest it, then create the identical solution in C++. If they were just creating a new game, it likely would be much faster.

[–] BigDanishGuy 4 points 3 hours ago* (last edited 3 hours ago)

#include <iostream> // because writing to the console is not included by default.
int main()
{
std::cout << "C++ is simple and fun ... you cretin";
return 0;
}

I had a machine language course in uni, parallel with a C++ course. Not a fun semester to be my wife, or a relative of any of my classmates. Best case our brains were in C++ mode, worst case you needed an assembler to understand us.

And yes I know my code format will piss people off, I don't care, it's the way I write when other less informed people don't force me to conform to their BS "Teh oPeNiNg bracket shouwd bwee on teh sam line ass teh declawation"

[–] [email protected] 24 points 16 hours ago (1 children)

But the modern OpenRCT, written in an actual language, is better in every way.

[–] otp 38 points 14 hours ago (1 children)

Probably not as optimized though.

RCT could run on a toaster from the 90's (ok, maybe early 2000's) and looked amazing for the time.

OpenRCT can run on a toaster from the 2010's and looks great because of the timeless art style of the original.

It's still an incredible feat, though!

[–] [email protected] 14 points 6 hours ago (1 children)

You are very unlikely to write assembly that is more optimized than what a modern compiler could produce for anything longer than a trivial program. I don't know if it made sense at the time of the original RCT, but OpenRCT would definitely not benefit from being written in assembly.

[–] [email protected] 5 points 3 hours ago* (last edited 3 hours ago) (1 children)

I feel like that's only true if I was asked to "write the assembly for this c++ program." If I'm actually implementing something big in assembly, I'm not going to do 90% of the craziness someone might be tempted to do in c++. Something that is super easy in c++ doesn't mean it's easy for the CPU. Writing assembly, I'm going to do what's easy for the CPU (and efficient) because, now, I'm in the same domain.

The bottom line is cranking up the optimization level can get you a 2-5x win. Using memory efficiently can give you a 10-100x win.

[–] [email protected] 1 points 51 minutes ago

Using memory efficiently can give you a 10-100x win.

Yes, it can. But why is this exclusive to assembly? What are you planning to do with your memory use in assembly that is not achievable in C++ or other languages? Memory optimizations are largely about data structures and access patterns. This is available to you in C++.

Also, if you don't want 90% of the craziness of C++ then why not just code in C++ without 90% of the craziness? As far as I know what's what a lot of performance-critical projects do. They operate with a feature whitelist/blacklist. Don't tell me you have the discipline to work entirely in assembly and the knowledge to beat the compiler at the low level stuff that is not available to you in C++ but you can't manage avoiding the costly abstractions.

I think it speaks volumes how rarely you hear about programs being programmed in assembly. It's always this one game and never any meaningful way to prove that it would gain performance by not being written in C++ when using a modern compiler.

[–] [email protected] 117 points 18 hours ago (1 children)
  • Programming was never meant to be abstract so far from the hardware.
  • 640k is enough ram for everybody.
  • The come with names like rust, typescript, go, and python. Names thought up by imbeciles.
  • Dev environments, environmental variables, build and make scripts, and macros, from the minds of the utter deranged.

They have played us for fools

[–] [email protected] 6 points 6 hours ago (1 children)

I dabbled with making a fairly complex program for a microcontroller the other day and quickly hit the stack limit for a simple object.

It wasn't so much that it was a large object, but to provide flexibility I was amazed how fast I filled the memory.

I've done heaps with memory managed languages in the past but shit as soon as I had to think about what I was doing under the hood everything got hard af.

So serious question - does anyone have any good resources for a competent programmer, but with no clue whatsoever how to manage memory in a microcontroller space and avoid fragmentation etc?

I got it to work but I'm sure I did shit job and want to be better at it.

[–] BigDanishGuy 2 points 2 hours ago

The best book I've ever bought on programming, and the second best book I bought for a class in uni, was https://dl.acm.org/doi/book/10.5555/1824214 it may be worth checking out on libgen and buy if it suits your needs.

Whenever I do low-level programming on the AVR architecture, I'll make a memory map. As in I'll map out where I'll put what. It may not be suitable for more complex programs, but it does the job for me. And it has enabled teamwork in assembly in the past.

If you want to work in a language that doesn't offer memory management, but manually mapping memory isn't feasible either, how about building your own memory management? Or perhaps use an RTOS? I've used freeRTOS before on various arm-based micros, and it does take a bit to get started, but after that it's easy sailing.

Sorry for the following tangent, all semi intelligent content in this comment is found above this line.
BTW I tried CoOS once, I wouldn't recommend it... OK it was 12 years ago, I can't remember exactly what was wrong other than the documentation was crap, but I don't need to remember why to hold a grudge.

[–] [email protected] 58 points 17 hours ago (4 children)

try writing it it in Assembly

Small error, game crashes and takes whole PC with it burning a hole in the ground.

[–] [email protected] 1 points 5 minutes ago

It was really easy to crash an Apple II game and get into the assembler. And my goodness am I glad I didn't destroy my computer as a kid randomly typing things in to see what would happen.

[–] [email protected] 48 points 17 hours ago

Just don't make any errors. Not one.

load more comments (2 replies)
[–] [email protected] 112 points 20 hours ago (1 children)

I love Roller Coaster Tycoon. It's absolutely crazy how he managed to write a game in a way many wouldn't even attempt even in those days, but it's not just a technical feat, it's a creative masterpiece that's still an absolute blast to play.

It still blows my mind how smoothly it gives the illusion of 3D and physics, yet it can run on almost anything.

OpenRCT brings a lot of quality of life and is often the recommended way to play today, but the original RCT will always deserve a spot on any "Best Games of All Time" list.

load more comments (1 replies)
[–] [email protected] 122 points 20 hours ago (8 children)

Your game will actually likely be more efficient if written in C. The gcc compiler has become ridiculously optimized and probably knows more tricks than you do.

load more comments (8 replies)
load more comments
view more: next ›