Загрузка видео...

Не удалось загрузить видео

На главную

More internal optimizations on my #Dreamcast and #Gamecube game engine: • 2D Perlin noise generation is now 67% faster (59 cycles per sample) • 3D Perlin noise generation is now 40% faster (97 cycles per sample) • Further optimized worst-case heap allocations, bringing the total improvement to 40x since...

23,329 просмотров • 1 год назад •via X (Twitter)

Комментарии: 11

Фото профиля Steampunk
Steampunk1 год назад

How exactly is the "ambient occlusion" handled in this engine? does it intelligently swap out textures based on surrounding blocks? it's so clean it almost looks per pixel but I imagine you don't have the overhead to do that in software, right?

Фото профиля A Flock of Meese
A Flock of Meese1 год назад

Ambient occlusion is handled with vertex colors.

Фото профиля Byte Wise
Byte Wise1 год назад

Is this fucking Minecraft on GameCube? You're a mad man, I love it

Фото профиля A Flock of Meese
A Flock of Meese1 год назад

This is the Dreamcast version. Here’s how it looks on the GameCube:

Фото профиля Melody
Melody1 год назад

2 questions Do you plan to add like greedy meshing or smth if u havent And are you changing the color of the sides of grass (Im also making a mc clone in turbowarp :3)

Фото профиля Pablo M.
Pablo M.1 год назад

I love your work. Little by little you are pushing the Dreamcast capabilities to the limit. How many polygons do you reach in this post?

Фото профиля A Flock of Meese
A Flock of Meese1 год назад

130,000 vertices, right up to the VRAM limit.

Фото профиля SlingerGames
SlingerGames1 год назад

This continues to impress! Amazing stuff!

Фото профиля thecraftsgt
thecraftsgt1 год назад

Man this runs better than my settup 😮

Фото профиля Pixel Art
Pixel Art1 год назад

Is this video on DC or GC? Either way, it's impressive.

Фото профиля A Flock of Meese
A Flock of Meese1 год назад

This video is on Dreamcast. Here's how it looks ont he Gamecube:

Похожие видео

Actual hardware capture of the latest build of jnmartin's #Doom 64 port to the Sega #Dreamcast, which has now become the definitive, prettiest way to enjoy the title, with its dynamic lighting and bump mapping. SO MUCH NEW SHIT TO TALK ABOUT: First of all, this is the very first game to utilize the brand new "hybrid" vertex submission mechanism we just added to KallistiOS. It was a long, cruel week to get all of the issues there sorted out, but they have been, and it has further boosted the game's performance while under load and is now something the rest of the DC community can utilize in their homebrew. This scene in particular used to lag using the traditional, DMA-based vertex submission mechanism with all of the lights and its higher geometric complexity, but notice it's not even dropping a frame now! Next, support for the Dreamcast's MOUSE and KEYBOARD have been added. These controls play EXTREMELY well and feel like a very smooth, natural way to play the game, if you want the Steam/PC control scheme. Finally... if there is any doubt as to whether the Dreamcast version is actually the definitive way to the play the game, jnmartin now allows you to export the assets from the (LEGALLY PURCHASED, DAMNIT!!!) Steam version, and import them into the Dreamcast version, where you can enjoy the extra bonus levels and campaign with the new and improved graphics! THIS IS NOW PUBLICLY AVAILABLE! The project repository, along with the README with build instructions can be found here: #gamedev #retrogaming #n64

Falco Girgis

39,781 просмотров • 1 год назад

The #GTA 3 port to the Sega #Dreamcast has been progressing at an incredible pace. It's been amazing to see the whole DC community come together to tag-team this "impossible" project... Here it is running on a stock DC, no longer requiring the 32MB RAM hardware modification, only a few weeks into development. Since I finally got the time to sit down, build the codebase, and look into some of what I think is the critical path for performance, let's talk about some technical shit, and some of the future steps I think can be taken to further improve performance. First of all, I want everyone to take note that this is NOT a port of the PS2 version. This is a port of the PC version, which has extra content, increased draw distance, improved textures, and other things that have actually increased the challenge here... Whether the DC version will ultimately have these additions or not will remain to be seen, but we're running into plenty of shit that the PS2 didn't have to worry about (like these big-ass PC replay saves won't fit onto a Visual Memory Unit!) Secondly, lets talk about what is and isn't currently optimized, because it's absolutely vital that the DC's hardware is fully utilized here for the sake of performance and achieving a competitive polygon count. Unlike with modern devices, where the whole graphics pipeline is handled by the GPU, both the PS2 and Dreamcast were responsible for transforming and doing lighting calculations for each vertex BEFORE they got submitted to the GPU. The PS2 had a vector coprocessor to do this, while the Dreamcast had a few extremely important SIMD and fast math assembly instructions on its CPU to do these computations. Up until literally just a few hours ago (not shown in this footage), the Dreamcast's SH4 was doing 100% of these operations in slow-ass plain C and C++ code, which is absolutely sub-optimal and is immediately bogging down its CPU with just transforming vertices, bottlenecking the entire graphics pipeline on the fist T&L stage, and also leaving less CPU time for handling other gameplay logic... this is going to absolutely have to be addressed (and already has begun to be). Another issue that is crippling performance here is the fact that the models are all using individual triangles rather than triangle strips, which the Dreamcast's PVR GPU was designed to handle better... Converting these models to use strips rather than individual triangles will result in MANY different gainz for the DC, as you're going from 3N to N+2 vertices per triangle. Converting the models to triangle strips will 1) reduce load times, since model assets will be smaller 2) reduce the amount of video memory required to hold these vertices on the GPU 3) reduce the amount of shit that must be transferred from the CPU to the GPU and 4) give us back a bunch of CPU time, since the SH4 will be less bogged down transforming redundant vertices! TL;DR: This is still EXTREMELY suboptimal in terms of fully utilizing the graphical potential of the Dreamcast. There is going to be a LOT that can be done still to both improve performance and polygon counts, so stay tuned! FINALLY: Mad respect and love to Stefanos Kornilios Mitsis Poiitidis, for doing an amazing job leading this project, and to Frogbull , Esppiral, and everyone else who is helping us stick it to the PS2 by making this happen! #gamedev #retrogaming #cplusplus

Falco Girgis

88,356 просмотров • 2 лет назад

Been optimizing my ASS OFF now that jnmartin has pushed all of his progress on his Star Fox 64 Sega Dreamcast port to a private GitHub repo to collaborate with a bunch of us DC devs before release. MAN this thing is HIGHLY optimized already... We're essentially running a high-level emulator for the N64's RSP coprocessor, doing graphics transforms, matrix math, and display list conversions not only on the main SH4 CPU, but also sitting atop a high-level OpenGL driver, in real-time. Not only that, but once again, we're doing all audio synthesis and mixing also on the main SH4 CPU, so this thing is doing a literal asston on the main CPU with what might seem like a relatively straightforward port. 99% of the time, everything runs flawlessly, but when you drop a bomb on a shitfest of enemies in a densely populated area, as with the N64 original, the FPS can dip momentarily. Here's a direct hardware capture of me testing a new SH4 optimized routine out for gainz on my Sega Dreamcast... this mofo is meant be used for one-off 3D vector transforms by a single matrix which has not been preloaded into the XMTRX FP register matrix back-bank. Rather than doing a full 4x4 load on the matrix just to do a single 4D transform via the FTRV instruction, we're simply peforming 3 3D dot products against a single 3D vector, allowing us to pipeline the loads, dot products, and store operations better than doing a load all at once followed by a transform, and we aren't wasting a lane on the FPU for a 0.0f W component!

Falco Girgis

36,966 просмотров • 10 месяцев назад

jnmartin and I just spent the last 12 hours straight locked into an epic tag-team, binge-coding session. We've decided to return to perfect our port of Mario Kart 64 to the Sega Dreamcast, bringing with us all of the skills, knowledge, and tools at our disposal that we gained from every port we've been involved with since we originally released MK64 DC to the public. 1) jnmartin has just completely redone the audio synthesis and mixing code. It was originally emulating the Nintendo 64's RSP in software, on our CPU, and wound up being a total resource hog, despite us going to hell and back again, substantially boosting its performance by vectorizing it with our SH4 SIMD instructions. 2) Now that the audio is actually offloaded to the AICA, we can leverage its DSP to put back in effects such as reverb and echo that we simply didn't have the CPU budget to implement before... so the overall audio quality of the port will be SIGNIFICANTLY improved. 3) jnmartin has been working on many small bugfixes, such as the near-Z clipping edge-cases that would cause corrupted triangles to draw over the players' screens sometimes in 3 and 4 player modes. 4) jnmartin just kicked GLdc--our OpenGL 1.1 driver, built atop of KallistiOS--to the curb and has instead implemented a bare-metal renderer that raw-dogs KOS's lowest-level PVR GPU driver directly, giving us more control and better performance within the renderer. 4) I just implemented support for playing with the Sega Dreamcast keyboard peripheral as a controller, partially as a flex, and partially because jnmartin kept complaining that he only had 3 controllers for testing... 🤣 4) I have taken my entire accelerated math and linear algebra library, SH4ZAM--which was born just after this port was originally released--back with me this time and am optimizing every freaking thing I can get my hands on with it. Every matrix multiplication, vector transform, memcpy-call, and scalar or trig routine is getting swapped out for the corresponding hand-optimized, meticulously benchmarked, and rigorously unit-tested equivalent within SH4ZAM, which now ships as part of kos-ports. As you can see from this series of direct hardware captures, overlaid with the terminal window which was capturing the FPS logging reports from my actual Sega Dreamcast, the performance is now SIGNIFICANTLY better than it was previously, and it already ran on-par or slightly better than the N64 original under most circumstances! Sooo many GAINZ to be had! 💪

Falco Girgis

13,358 просмотров • 2 месяцев назад

FINALLY finishing up a MASSIVE PR from hell for the Sega Dreamcast port of Grand Theft Auto 3! This is an actual hardware capture now of the DC version under a high load, which would've previously been a slideshow, between the dynamic lighting from the sirens, the amount of rigid bodies in the physics simulation from the cars, and the high-speed chase placing high-demands on asset streaming... I went through all of the low-level common math infrastructure in both the engine and at the RenderWare driver layer and made numerous optimizations, before slowly working my way up to optimizing individual algorithms at the application layer using the new math routines. Firstly, the common low-level floating-point math routines for everything from trig and inverse square root operations to floor(), ceiling(), and clamp(), were replaced with what was meticulously found (in Compiler Explorer) to be the optimal patterns for GCC 14.2.0, targeting our SH architecture (sometimes favoring C builtins, sometimes inline SH4 ASM). Next, in the layer above, with inline SH4 assembly, the common matrix math and linear algebra routines were accelerated using the Dreamcast's vector instructions. Some cleverness went down here, such as cramming matrix metadata into unused insignificant bits of an element, combining loading two matrices with multiplying them, fast transposes, fast quaternion multiplication using 4 dot products, etc. Once the foundation was laid, some of the Renderware code such as the calculations for the lighting, updating bounding volumes, and deriving UV coordinates for specular environment maps on the cars was made faster automatically. The main gainz were actually made rewriting a decent amount of the collision intersection and contact resolution code, though, from using C++-style overloaded operators for multiplying single 4D vectors by a 4x4 matrix to doing batches of 4D vectors by the same matrix. This SUBSTANTIALLY reduced the number of times the backing 4x4 matrix bank had to be reloaded and allowed me to keep it resident within registers while it was being used by the intersection algorithms!

Falco Girgis

114,621 просмотров • 1 год назад

Just woke my sorry ass up from a code-induced coma after spending the night optimizing the rendering for #GTA3 on the Sega #Dreamcast... still have a SHITTON more code to go through, but the results are looking fantastic! Here's the second half of the opening intro! A bunch of the special effects such as screen-space bloom, spot-lights, fog, and rain have made their way onto the DC, and while it looks like there are a few graphical glitches here and there, the aesthetic of the original game is starting to be realized without impacting performance too much! I need to go approve a few PRs into the KallistiOS repository to buy us a few more KB of RAM back to ensure that a 16MB stock DC can make it this far into the intro cutscene without running out of memory, though, along with giving us the space to enable these -O3 optimizations on all builds, as they're currently an optional build flag only enabled when targeting units with the 32MB RAM expansion. Right now 16MB builds are currently only optimized at -O2, which yields a drop of maybe 3-5 FPS or so. ON IT! The rendering glitches with the spotlights are almost certainly textbook graphics pipeline state change leaks (common especially with OpenGL-style APIs which manipulate global static state), and will just take a little more sleuthing to resolve. Finally, there is still a SHITLOAD of room left for increased performance on the rendering side... I will be continuing my work there, Jaxyn will be implementing the final portion of the near-plane clipping algorithm, and our fearless leader, Stefanos Kornilios Mitsis Poiitidis will be tackling everyone's favorite thing to ask about: audio. Thank you all so much for your continued support and for proving that, despite what you may have been told, the Sega Dreamcast is still alive and kicking! ...and maybe, just maybe, the narrative you've all been fed (and many of you are still parroting) about the DC not being able to handle this game was fake news. ;) #gamedev #retrogaming #indiegame

Falco Girgis

24,802 просмотров • 2 лет назад

So as it turns out... Diddy Kong Racing has some really badass reverb DSP effects that get applied to sounds emitted while driving within tunnels or enclosed spaces. SO WHAT ABOUT ON THE SEGA DREAMCAST? Well, check out this direct hardware capture, and listen very closely to what honking the horn sounds like as I drive through the tunnel! But we're already essentially emulating the N64's RSP coprocessor with DKR DC, which was handling audio tasks such as ADPCM decoding, mixing, resampling, and more... purely in software on the SH4. The SH4 is also responsible for all TnL on the Dreamcast, so it's doing graphics, gameplay, and now audio processing, PLUS DSP effects? And we're trying to hit a solid 30FPS target? How tf we planning to pull that one off? ...with GAINZ, of course! This one was pretty insane. The algorithm on the left is the actual fixed-precision loop which gets run by a DSP, essentially applying a function of some coefficients, a gain, and the value of the previous sample to the compute the value of the current sample. Since sample N depends on sample N - 1, the loop is fundamentally sequential, plus the values are all integer-based with fixed-precision, not acceleratable floats for our FPU... So check mate? We're fucked? I guess Bruce is gonna wind up dropping reverb to improve FPS after all? NOT SO FAST. As it turns out, I was able to still achieve a 1.5x speedup over the standard implementation, leveraging every trick I've ever known for the SH4's FPU with SH4ZAM vector math library. 1) All arithmetic and intermediate values went from integers to floats, so that they can use the SH4's FPU. 2) I was able to tease out the independent values and cofactors used for calculating FOUR samples at once by unrolling the loop to 4 iterations, and preloading the XMTRX 4x4 matrix back-bank with a lower-triangular transform matrix containing the cofactors. 3) I was able to cram 4 samples at a time into a 4D vector, which I then transform against the constant XMTRX cofactors with shz_xmtrx_transform_vec4(), which results in only single ASM instruction, FTRV, getting emitted to transform the 4D vector by the entire 4x4 XMTRX, thus doing the majority of the work to calculate 4 freaking output samples with ONE instruction. 4) I was able to strategically prefetch both the source and destination buffers while doing FPU work, in order to keep the caches fed. 5) The clamping... was the trickiest part. I had to calculate all 4 output values WITHOUT the clamping, then check for any required clamping post-transform.. but the problem is that if sample N gets clamped, then the value of sample N + 1 will change as well... and we just computed 4 nonclamped results in parallel... By abusing the goto statement and labels, I was able to efficiently jump to a label which would clamp all of the values following a component that was found to require clamping, but avoiding recomputing and reclamping the previously assessed values that were within the clamping threshold. The result? Yet again, the 200Mhz SH4 has carried another load that it was never intended to bear... and it looks like we WILL be keeping reverb in Diddy Kong Racing for the Sega Dreamcast! 💪

Falco Girgis

14,871 просмотров • 2 месяцев назад