Video wird geladen...

Video konnte nicht geladen werden

Zur Startseite

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,084 Aufrufe • vor 1 Jahr •via X (Twitter)

11 Kommentare

Profilbild von Steampunk
Steampunkvor 1 Jahr

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?

Profilbild von A Flock of Meese
A Flock of Meesevor 1 Jahr

Ambient occlusion is handled with vertex colors.

Profilbild von Byte Wise
Byte Wisevor 1 Jahr

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

Profilbild von A Flock of Meese
A Flock of Meesevor 1 Jahr

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

Profilbild von Melody
Melodyvor 1 Jahr

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)

Profilbild von Pablo M.
Pablo M.vor 1 Jahr

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?

Profilbild von A Flock of Meese
A Flock of Meesevor 1 Jahr

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

Profilbild von SlingerGames
SlingerGamesvor 1 Jahr

This continues to impress! Amazing stuff!

Profilbild von thecraftsgt
thecraftsgtvor 1 Jahr

Man this runs better than my settup 😮

Profilbild von Pixel Art
Pixel Artvor 1 Jahr

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

Profilbild von A Flock of Meese
A Flock of Meesevor 1 Jahr

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

Ähnliche Videos

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,726 Aufrufe • vor 1 Jahr

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 Aufrufe • vor 2 Jahren

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,939 Aufrufe • vor 8 Monaten

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,089 Aufrufe • vor 1 Monat

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,524 Aufrufe • vor 1 Jahr

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,783 Aufrufe • vor 1 Jahr

It's officially that time of year again! Presenting the second annual "DreamDisc" indie gamejam for the Sega Dreamcast! If you weren't around for last year, check out the video! We had 24 incredibly polished, epic submissions including a wide-range of genres, such as 3D space shooters and resource managers, 2D platformers and racing games, VMU minigames, custom hardware, and even a custom implementation of the Java VM for SH4! Just like last year, the top 10 submissions, as voted by a panel of judges, will be pressed to a commercially released, actual physical Sega Dreamcast disc, which will be available for purchase from Orc Face Games - Chew Chew Mimic out on Dreamcast!! Oh, and there are cash prizes for the top 3, of course! This year we have an even wider range of engines, frameworks, and prebuilt library solutions for developers are all experience levels, including: 1) Antiruins - Lua-based, very newbie friendly game engine for the Sega Dreamcast. 2) raylib - famous cross-platform C-based games framework which needs no introduction 3) SDL2/3 - our very own ports of the famous cross-platform SDL libraries, which target the Dreamcast. 4) Simulant - the same engine that powered Driving Strikers--the very first online homebrew commercial DC game--as well as last year's wining submission, written in C++. 5) KallistiOS - you can raw-dog the indie SDK and pseudo OS that started it all and powers everything in the community, rolling your own tech stack. 6) SH4ZAM - my collection of SH4 assembly optimized math and matrix routines, which originally powered our Grand Theft Auto ports. Contestants are encouraged to join the OrcFace and Simulant Discord servers where they can interact with other DC developers, share their progress, and ask for help with anything they may need. Official DreamDisc '25 website:

Falco Girgis

16,980 Aufrufe • vor 8 Monaten

Been up almost the entire night making big audio gainz on the SH4 CPU for the Sega Dreamcast port of Mario Kart 64! It took about 3 of us pitching ideas and optimizing together, but holy shit, the 200Mhz SH4 is keeping up 99% of the time doing all synthesis and mixing in SW! What you're seeing is the first hardware capture of Mario Kart 64 running on the Sega Dreamcast with working audio playback... and trust me, it was not easy to get here! First of all, all of the audio signal processing for synthesizing individual notes from sampling instruments then mixing the SFX channels and the BGM together into a single audio stream is being done completely in SW on the DC's 200Mhz SH4 CPU--while it was done in HW on the N64. It is also carrying the whole T&L load for rendering with extra overhead per draw call due to us using our OpenGL 1.1 driver for graphics (GLdc). You can currently see a teeny little bit of slowdown at the beginning of the race when all 8 karts are bunched together, emitting their own SFX, which all has to get mixed in SW, bogging down the CPU... but don't worry, plenty of gainz left! On the left is a very interesting routine which proved to be incredibly gainzy when accelerated... So lets jump into what we did to this "aResampleImpl()" routine! 1) Compiler Optimizations: Everything is compiled with -Os by default to save RAM, because jnmartin is preloading almost everything up-front; however, we've created a "hot file" listing within the Makefile which allows us to build specific perf-critical translation units at with the -O3 optimization flag. 2) Manually managing the data cache: notice how many prefetches and barriers are in this routine in order to phenangle GCC's codegen to be somewhat similar to the ordering we've done things in C. Additionally, I've gone through hell in Compiler Explorer to ensure that all of the buffers used here can be prefetched in a timely manner, so that they're cache-resident before they're actually used. 3) SIMD: While we were discussing this routine in Discord, Paul noticed that the sample calculation was essentially performing a dot product of 2 4D vectors... which... GUESS WHAT. The SH4's FPU can do with a single instruction, FTRV, which is what "shz_dot8f()" provides an intrinsic around... The gainz were pretty substantial, despite having to convert back and forth between int16_t and floats. The new FP SIMD code can be enabled with "SH4_SIMD_GAINZ," otherwise the slow integer path is taken, so you can see the code difference. 4) Custom memcpy() routines: The builtin memcpy() routine that we're given in GCC15 from Newlib for the SuperH architecture is EXTREMELY slow... about as slow as copying byte-by-byte in ASM, so doing any sort of multi-byte loads and stores (provided adequately aligned buffers), even in C code, offers substantial gainz. Anyway, that's it for today! Stay tuned for more gainz!

Falco Girgis

15,547 Aufrufe • vor 1 Jahr

It's finally time for the massive update I know EVERYONE has been eagerly waiting for... Presenting to you over 6 straight minutes of spliced footage directly captured from my actual physical Sega Dreamcast... RUNNING THE LATEST BUILD OF OUR SONIC MANIA PORT!!! I can't even begin to describe to you how polished and fantastic it's starting to feel... as though it belonged on the Dreamcast all-along... Thanks to the hard work of jnmartin, sonicfreak94, and a few others, not only is the Dreamcast port nearing completion, but... wait for it... THE 3D STAGES THAT STRUGGLED ON EVERY UNOFFICIAL PORT ARE NOW ALL RUNNING FULLSPEED!!!! Trust me when I say that this took an absolutely ENORMOUS amount of effort from jnmartin and the crew to pull off, considering the low-end for this game was the original Nintendo Switch, and ports running on consoles with twice our processing power struggled to run these levels fullspeed. The first and most obvious thing is that the 3D software renderer was ditched and all rendering was done natively with our PowerVR GPU... which actually wasn't as simple as it sounds. The tilemaps for these levels have had to be tessellated into a bajillion PVR quads and transformed and rendered as individual polygons to look correct and run faster than a slideshow. Mr anonymous Ocarina of Time chad developer came up with a pretty slick LoD scheme for drawing tiles closest to the player at 1x1 pixel sizes with sizes increasing with distance up to 2x2 and 4x4 pixels, allowing them to reduce the overall number of tile vertices that have to be transformed by the SH4 CPU and submitted to the PVR GPU, by strategically keeping the majority of the polygon detail closest to the camera, with detail decreasing as the tiles get further away. Next, the 3D geometry was preprocessed and converted from being triangle-based to being triangle-strip based, drastically reducing the number of vertices per model that our 200Mhz SH4 CPU had to transform (with plain integer arithmetic and no FPU vectorization, since this is all slow-ass fixed-point integer math)! Finally, it was discovered that the lighting was a disproportionately significant contributor to the TnL load on the SH4 for processing vertices. Jnmartin came to the realization that 99% of the time only the Y axis direction is considered for lighting equation intensity with just a white color. So this simplified lighting model got baked into the renderer, which gave another round of gainz. So in the end, after all of this work came together, a draw distance of 75% the distance of the retail Sonic Mania versions was achieved for the decorations, plus the character models have their full geometry count and have not been simplified on a freaking Sega Dreamcast with a 200Mhz SH4 CPU and only 16MB of RAM! 🔥

Falco Girgis

88,417 Aufrufe • vor 4 Monaten