frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Show HN: A PSX/DOS style 3D game written in Rust with a custom software renderer

https://totenarctanz.itch.io/a-scavenging-trip
32•mvx64•3h ago
So, after years of abandoning Rust after the hello world stage, I finally decided to do something substantial. It started with simple line rendering, but I liked how it was progressing so I figured I could make a reasonably complete PSX style renderer and a game with it.

My only dependency is SDL2; I treat it as my "platform", so it handles windowing, input and audio. This means my Cargo.toml is as simple as:

[dependencies.sdl2] version = "0.35" default-features = false features = ["mixer"]

this pulls around 6-7 other dependencies.

I am doing actual true color 3D rendering (with Z buffer, transforming, lighting and rasterizing each triangle and so on, no special techniques or raycasting), the framebuffer is 320x180 (widescreen 320x240). SDL handles the hardware-accelerated final scaling to the display resolution (if available, for example in VMs it's sometimes not so it's pure software). I do my own physics, quaternion/matrix/vector math, TGA and OBJ loading.

Performance: I have not spent a lot of time on this really, but I am kind of satisfied: FPS ranges from [200-500] on a 2011 i5 Thinkpad to [70-80] on a 2005 Pentium laptop (this could barely run rustc...I had to jump through some hoops to make it work on 32 bit Linux), to [40-50] on a RaspberryPi 3B+. I don't have more modern hardware to test.

All of this is single threaded, no SIMD, no inline asm. Also, implementing interlaced rendering provided a +50% perf boost (and a nice effect).

The Pentium laptop has an ATI (yes) chip which is, maybe not surprisingly, supported perfectly by SDL.

Regarding Rust: I've barely touched the language. I am using it more as a "C with vec!s, borrow checker, pattern matching, error propagation, and traits". I love the syntax of the subset that I use; it's crystal clear, readable, ergonomic. Things like matches/ifs returning values are extremely useful for concise and productive code. However, pro/idiomatic code that I see around, looks unreadable to me. I've written all of the code from scratch on my own terms, so this was not a problem, but still... In any case, the ecosystem and tooling are amazing. All in all, an amazing development experience. I am a bit afraid to switch back to C++ for my next project.

Also, rustup/cargo made things a walk in the park while creating a deployment script that automates the whole process: after a commit, it scans source files for used assets and packages only those, copies dependencies (DLLs for Win), sets up build dependencies depending on the target, builds all 3 targets (Win10_64, Linux32, Linux64), bundles everything into separate zips and uploads them to my local server. I am doing this from a 64bit Lubuntu 18.04 virtual machine.

You can try the game and read all info about it on the linked itch.io page: https://totenarctanz.itch.io/a-scavenging-trip

All assets (audio/images/fonts) where also made by me for this project (you could guess from the low quality).

Development tools: Geany (on Linux), notepad++ (on Windows), both vanilla with no plugins, Blender, Gimp, REAPER.

Comments

creikey•1h ago
Very cool project, can't play because on mac but looks like cool approach
armitage__•1h ago
I love custom game engines. Looks fantastic! Will you be sharing the source?

Show HN: A PSX/DOS style 3D game written in Rust with a custom software renderer

https://totenarctanz.itch.io/a-scavenging-trip
32•mvx64•3h ago•2 comments

Show HN: I built a platform for long-form media recs (books, articles, etc.)

https://rhomeapp.com/Guest
12•rohannih•5h ago•0 comments

Show HN: HuMo AI – Create Realistic Videos with Text, Image, and Audio Inputs

https://www.humoai.co
2•Viaya•3h ago•0 comments

Show HN: npm-daycare, an NPM proxy that filters out recent & small packages

https://github.com/stack-auth/npm-daycare
6•n2d4•4h ago•2 comments

Show HN: A store that generates products from anything you type in search

https://anycrap.shop/
1143•kafked•3d ago•326 comments

Show HN: Pyproc – Call Python from Go Without CGO or Microservices

https://github.com/YuminosukeSato/pyproc
39•acc_10000•1d ago•9 comments

Show HN: Scientific Calculator for Android

https://play.google.com/store/apps/details?id=scientific.codegres.calculator&hl=en_US
2•Codegres•6h ago•0 comments

Show HN: AI Code Detector – detect AI-generated code with 95% accuracy

https://code-detector.ai/
70•henryl•11h ago•60 comments

Show HN: I wrote a from-scratch OS to serve my blog

https://github.com/thass0/tatix
7•thasso•15h ago•0 comments

Show HN: I reverse engineered macOS to allow custom Lock Screen wallpapers

https://cindori.com/backdrop
77•cindori•1d ago•56 comments

Show HN: Daffodil – Open-Source Ecommerce Framework to connect to any platform

https://github.com/graycoreio/daffodil
64•damienwebdev•1d ago•8 comments

Show HN: I built a decentralized protocol for predicting interest rate movement

https://kairosswap.com/
3•vinniejames•8h ago•0 comments

Show HN: Ghostpipe – Connect files in your codebase to user interfaces

https://github.com/inputlogic/ghostpipe
4•adriaanmulder•8h ago•1 comments

Show HN: I built a tool to visually manage my LLM prompt templates and save them

https://promptcanvas.ml4den.com/
3•ml4den•8h ago•2 comments

Show HN: AI-powered web service combining FastAPI, Pydantic-AI, and MCP servers

https://github.com/Aherontas/Pycon_Greece_2025_Presentation_Agents
42•Aherontas•2d ago•22 comments

Show HN: Omarchy on CachyOS

https://github.com/mroboff/omarchy-on-cachyos
63•theYipster•2d ago•62 comments

Show HN: Semlib – Semantic Data Processing

https://github.com/anishathalye/semlib
58•anishathalye•1d ago•12 comments

Show HN: Dagger.js – A buildless, runtime-only JavaScript micro-framework

https://daggerjs.org
76•TonyPeakman•2d ago•73 comments

Show HN: I Collected Every Emoticon I Could Find – All Mood and Generator

https://emoticonhub.com/
2•AdityaGavit•10h ago•1 comments

Show HN: Small Transfers – charge from 0.000001 USD per request for your SaaS

https://smalltransfers.com/
192•strnisa•6d ago•74 comments

Show HN: Quizquestions.org – A free library for quiz questions

https://www.quizquestions.org/
2•Salim99•11h ago•0 comments

Show HN: Drop-in Redis replacement in Rust with 5M+ GET/s

https://github.com/mehrantsi/feox-server
23•mehrant•20h ago•3 comments

Show HN: MCP Server Installation Instructions Generator

https://hyprmcp.com/mcp-install-instructions-generator/
22•pmig•1d ago•6 comments

Show HN: Datadef.io – Canvas for data lineage and metadata management

https://datadef.io/
12•theolouvart•2d ago•6 comments

Show HN: Clean Clode – Clean Messy Terminal Pastes from Claude Code and Codex

https://cleanclode.com
5•thewojo•13h ago•2 comments

Show HN: Alyx, a caffeine tracker with no accountability

https://alyxcaffeinetracker.com/
3•jordanmorgan10•14h ago•1 comments

Show HN: Universal single-letter project commands to speed up your CLI workflow

https://github.com/paldepind/projectdo
2•paldepind2•14h ago•0 comments

Show HN: I built an app store for open-source financial plans (on spreadsheets)

https://finfam.app/explore/views
46•mhashemi•1d ago•14 comments

Show HN: Ruminate – AI reading tool for understanding hard things

https://tryruminate.com/
17•rshanreddy•1d ago•3 comments

Show HN: Vicinae – A native, Raycast-compatible launcher for Linux

https://github.com/vicinaehq/vicinae
178•aurellius•1w ago•34 comments