Simple Optimization Trick
-
This looks like a screenshot in the background of the C++ OpenRCT version because the resolution is too high and not supported by the original assembly release.
wrote on last edited by [email protected]The original goes to 1024 x 786 and has different zoom levels. I've played most of the original parks this year and that does not see to be too high res to me. Give me a sec I'll take a screenshot of mine in a minute.
Edit here it is. It's the GOG version, which launches fullscreen, so the 1024 x 768 are stretched onto the center of my 1920 x 1080 screen.
-
This post did not contain any content.
Hello everyone and welcome to another video.
-
I went to college for Microbiology and became a programmer on my own after, so nope, never written a single line in assembly and never thought of checking it out either. Just never really crossed my mind. I might start messing with it soon.
If you're curious, I recommend this channel. It often delves deep into the code to explain stuff, as well as how the hardware works. Really fascinating!
-
Because it's true. Here's an article from Tim Sweeney from 2001:
https://web.archive.org/web/20010105180900/http://www.gamespy.com/legacy/articles/devweek_c.shtm
Mainstream application programmers switched to C in the early 80's. Game developers were slower to switch, because their small teams and focus on performance kept assembly language viable till the following decade. When id Software released DOOM, they surprised much of the industry by having no reliance on assembly code--despite excellent game performance, and by successfully cross-developing the game (in NeXTstep and DOS), then successfully porting it to an astounding variety of platforms.
Focus on performance, wow, well the industry has certainly changed a bit.
-
I've never written a single line of code in assembly, and I'm now curious
I learned z80 assembly back when the cutting edge of technology was a ZX Spectrum, and 68k assembly when I upgraded to an Amiga. That knowledge served me quite well for my early career in industrial automation - it was hard real-time coding on eZ80's and 65c02 processors, but the knowledge transfers.
Back in the day, when input got mapped straight into a memory location and the display output was another memory location, then assembly seems like magic. Read the byte they corresponds to the right-hand middle row of the keyboard, check if a certain bit is set in that byte, therefore a key is held down. Call your subroutine that copies a sequence of bytes into a known location. Boom, pressing a key updates the screen. Awesome.
Modern assembly (x64 and the like) has masses of rules about pointer alignment for the stacks, which you do so often you might as well write a macro for it. Since the OS doesn't let you write system memory any more (a good thing) then you need to make system calls and call library functions to do the same thing. You do that so often that you might as well write a macro for that as well. Boom, now your assembly looks almost exactly like C. Might as well learn that instead.
In fact, that's almost the purpose of C - a more readable, somewhat portable assembly language. Experienced C developers will know which sequence of opcodes they'd expect from any language construction. It's quite a simple mapping in that regard.
It's handy to know a little assembly occasionally, but unless you're writing eg. crypto implementations, which must take the exact same time and power to execute regardless of the input, then it's impractical for almost any purpose nowadays.
-
Hello everyone and welcome to another video.
The YouTube algorithm works in mysterious ways.
Because I'm nice, to anyone who doesn't get the reference: https://www.youtube.com/@MarcelVos
-
Focus on performance, wow, well the industry has certainly changed a bit.
Performance is very much still a significant factor. At the end of the day, games are expected to run at certain FPS on certain machines. The machines have gotten better to the extent that unoptimized code can be used sometimes, but when competing for graphics, badly optimized games will have to sacrifice fidelity to hit performance targets, where well-optimized games can get squeeze out better graphics and hit those same targets.
There's plenty of tricks these days but optimized code will always have an edge.
-
This post did not contain any content.
Since it wasn't mentioned yet: https://openrct2.io/
-
Those games didn't have the splash that Doom did for this sort of thing.
https://web.archive.org/web/20010105180900/http://www.gamespy.com/legacy/articles/devweek_c.shtm
Mainstream application programmers switched to C in the early 80's. Game developers were slower to switch, because their small teams and focus on performance kept assembly language viable till the following decade. When id Software released DOOM, they surprised much of the industry by having no reliance on assembly code--despite excellent game performance, and by successfully cross-developing the game (in NeXTstep and DOS), then successfully porting it to an astounding variety of platforms.
Those games didn’t have the splash that Doom did for this sort of thing.
I would say that Wolf3d would certainly count as proof of concept.
-
I've never written a single line of code in assembly, and I'm now curious
A little late to this comment but there are some assembly videogames out! They are puzzles and gives you the gist of how assembly works.
I really enjoyed TIS-100. I just never got around to beating it.
-
Since it wasn't mentioned yet: https://openrct2.io/
Best way to play till this day
-
I learned z80 assembly back when the cutting edge of technology was a ZX Spectrum, and 68k assembly when I upgraded to an Amiga. That knowledge served me quite well for my early career in industrial automation - it was hard real-time coding on eZ80's and 65c02 processors, but the knowledge transfers.
Back in the day, when input got mapped straight into a memory location and the display output was another memory location, then assembly seems like magic. Read the byte they corresponds to the right-hand middle row of the keyboard, check if a certain bit is set in that byte, therefore a key is held down. Call your subroutine that copies a sequence of bytes into a known location. Boom, pressing a key updates the screen. Awesome.
Modern assembly (x64 and the like) has masses of rules about pointer alignment for the stacks, which you do so often you might as well write a macro for it. Since the OS doesn't let you write system memory any more (a good thing) then you need to make system calls and call library functions to do the same thing. You do that so often that you might as well write a macro for that as well. Boom, now your assembly looks almost exactly like C. Might as well learn that instead.
In fact, that's almost the purpose of C - a more readable, somewhat portable assembly language. Experienced C developers will know which sequence of opcodes they'd expect from any language construction. It's quite a simple mapping in that regard.
It's handy to know a little assembly occasionally, but unless you're writing eg. crypto implementations, which must take the exact same time and power to execute regardless of the input, then it's impractical for almost any purpose nowadays.
Very interesting. Thank you. I may start looking into C instead. I'll still watch a couple of videos on assembly, just for the hell of it.
-
Since it wasn't mentioned yet: https://openrct2.io/
Holy fucking shit this is the best motherfucking news this year
-
If you're curious, I recommend this channel. It often delves deep into the code to explain stuff, as well as how the hardware works. Really fascinating!
This is a very interesting channel. Thank you
-
This post did not contain any content.
Have you seen the insane complexity of modern CPUs? Ain't no one hand coding that like a 6502 in 1985.
-
A little late to this comment but there are some assembly videogames out! They are puzzles and gives you the gist of how assembly works.
I really enjoyed TIS-100. I just never got around to beating it.
Oh, that's pretty cool. Thank you
-
Have you seen the insane complexity of modern CPUs? Ain't no one hand coding that like a 6502 in 1985.
I wonder if there's anyone alive right now who would be capable of such a task.
-
Because it's true. Here's an article from Tim Sweeney from 2001:
https://web.archive.org/web/20010105180900/http://www.gamespy.com/legacy/articles/devweek_c.shtm
Mainstream application programmers switched to C in the early 80's. Game developers were slower to switch, because their small teams and focus on performance kept assembly language viable till the following decade. When id Software released DOOM, they surprised much of the industry by having no reliance on assembly code--despite excellent game performance, and by successfully cross-developing the game (in NeXTstep and DOS), then successfully porting it to an astounding variety of platforms.
having no reliance on assembly code
That's not true. The original Doom has assembly. They replaced it for the Linux source release. But by that time PC hardware was much faster ( remember back in the 90's performance doubled every 2 years) so it wasn't needed.
"Planar.asm"
-
Have you seen the insane complexity of modern CPUs? Ain't no one hand coding that like a 6502 in 1985.
Even if one did, say using x86, it would still just be interpreted by the CPU into the CPU's native opcodes, as the legacy instruction sets are interpreted/translated.
-
I wonder if there's anyone alive right now who would be capable of such a task.
If the hardware was fixed, I don't see why not.
Might not be as fast as the optimisations compilers do these days though.
If you have to support thousands of types of GPU and CPU and everything else, then fuck no.