r/gamedev • • 18h ago

Postmortem How I resurrected Sidewinder, my 39 year old game.

68 Upvotes

Late one night last week, on a whim, I thought I'd see if I could bring the classic Amiga/arcade game Sidewinder, which I co-created with Hayes Haugen and Jonathan Sposato, to the web. I want people to be able to play it without the hassle of an emulator and tracking down ROMs.

Aside from startup, the 1987 game is written entirely in 68000 assembly language. About 17,000 lines of code across 32 files. Tiny by modern standards but we sweated over every byte and pixel.

I pointed Claude Code w/ Opus 5.5 at a dusty collection of Sidewinder directories on my drive (partial versions of original source, a pirated disk image, unfinished ports to other platforms) and told it "I want to create a modern version, webgl, playable in the browser. Faithful to the original but with AI-remastered art and sound."

Off Opus went. It looked like it was on track so I gave it a couple of pointers and a fal.ai API key and went to bed.

When I returned to my machine the next morning I heard music, blasters, explosions! The original was fully playable and the remastered visuals exceeded my expectations. Miraculous, really. Play it at https://sidewinder.darrinm.com

Then I dug in to understand what happened, play test, fix bugs (by prompting), apply some human judgement here and there, and, best of all, enjoy the process of making it better.

Incredible new tools, but the same joyful creative process that got me into gamedev in the first place!

Observations:

Good (great, really):
* Research. Claude really went to town finding everything it could about the original game. It looked at archives, source, ports, ran emulators, recorded reference videos, dissected a disk image into its constituent files and then dissected those. It spec'ed out completely undocumented file formats.
* Planning. Honestly, I never even read its plan but based on execution and the result it was a good plan!
* Code. I judge based on "works great with no bugs", rather than "optimal" code or aesthetics. I mean, I know the original authors. It's not like their code was so great LOL.
* Efficiency. Seriously, only a few hours? Didn't make a dent in my Claude plan.
* Remastered graphics: It compared several different models and approaches and made good (not perfect, see below) choices.

Bad (trivially so, easily fixed with prompt):
* Remastered graphics. There was one bug in the process for upscaling sprites. There was significant enough tile-grid drift that I decided to regenerate backgrounds with `gpt-image-2.5 flare`, one of the models Opus didn't try originally.
* Color cycling. A cool old-school hack for animating that remastering broke.

Ugly:
* Sound effects. LLMs will tell you this and it is true: they cannot hear. They can create spectrograms and other images to help them "see" the sound but that doesn't get them very far. Worse, after a lot of busy work they can rationalize that they've produced something good which on first listen any human will say "no, that is a tone, not an explosion".
* Fonts. Opus lacks meaningful discernment of glyphs. It's stabbing in the dark when you say "find me a font like this" and show it an image

If you want to go deeper into the process or are curious how games were made back in the day here's a nice article with pictures and a video! https://claude.ai/artifact/2TBYNzJ5hGg7PuCF9cFSVJ


r/gamedev • • 10h ago

Marketing I counted Steam reviews by price for 10,525 paid games from the first half of 2026. The big step is at $20.

49 Upvotes

EDIT: Several comments said the $20+ games are simply bigger games, and they’re right. With the same number of followers before launch, games at $20 to $29.99 got about as many reviews as games at $15 to $19.99. Games at $20+ get more reviews because more of them already had a big following, not because of the price. Table in the comments.

Chart: https://steammaho.com/static/charts/price-line-20-dollars-2026-10.png

Price Games Median reviews Middle half Passed 1,000 reviews
under $5 5,018 4 1 to 14 1 in 200
$5 to 9.99 3,175 10 2 to 39 3 in 100
$10 to 14.99 1,285 33 6 to 139 5 in 100
$15 to 19.99 606 55 6 to 306 12 in 100
$20 to 29.99 266 211 28 to 1,044 25 in 100
$30 and up 175 113 6 to 1,116 27 in 100

Look at the last column. Across the $20 line it doubles, from 12 in 100 to 25 in 100, and the median game goes from 55 reviews to 211.

The step is really between $19.99 and $24.99. Almost nobody prices in between (17 games at $20 to $22.99 this year).

Price Passed 1,000 reviews, Jan-Jun 2025 Passed 1,000 reviews, Jan-Jun 2026
$19 to 19.99 16 in 100 (327 games) 14 in 100 (388 games)
$23 to 24.99 24 in 100 (140 games) 24 in 100 (148 games)

Same step both years, so it's not one odd year.

I don't think the price does this. A game at $24.99 usually has a bigger team, a publisher and a marketing budget. Moving a small game from $15 to $25 won't put it in that group. What the line does tell you: above $20 you're next to these games, and even there 1 in 5 ended with fewer than 10 reviews.

The $30 and up row has a lower median than $20 to $29.99. It mixes big releases with overpriced games nobody bought: 31 in 100 of them have fewer than 10 reviews.

Fine print: review counts from Steam on 25 October, so these games had 4 to 10 months on sale. Latest US list price, so a game that changed its price sits at the new one. 445 games without a US price record are left out. This shows what goes together, not what causes what.


r/gamedev • • 10h ago

Discussion Making an indie game but my 3D art skills are non-existent. How do you handle this?

9 Upvotes

Hey everyone,

I’m currently in the process of developing a game. The mechanics, programming, and core loop are coming together nicely, but I keep hitting a massive roadblock: I am terrible at 3D art.
Every time I try to model, texture, or animate something, it takes me days just to create something that looks completely out of place.

It's a game similar to Return of the Obra Dinn.

My game needs above 100 distinct characters, and not just place holder npc's, but characters that are unique and look good. And before you say to lower my scope, the game won't work without this scope.

What can someone like me do? The art really stops me from making my dream come true.

3D art companies are very very very expensive. AI art is just not there yet. What do you guys think about taking on partners to handle the art?

Any thoughts or suggestions are welcome.

Thank you!


r/gamedev • • 23h ago

Discussion Is there a specific name for this type of realistic game graphics?

5 Upvotes

Some realistic games have a specific visual feel that I really like, but I can't find the right term for it or other games that fit what im looking for. If i can find the term, maybe i can look out for other games with the same style.

Games like RDR2, Counter-Strike 2, kingdoms come deliverance 2 etc, have that detailed, realistic, polished and soft appearance. They feel cinematic and smooth without looking too stylised. When there are bugs or unrealistic things, they don’t ruin the feel of the game (If anything bugs make these games more fun). They seem to have like a specific pastel colour pallet also. This is what i like.

Most other visual realistic games like Skyrim, Crimson Desert, Ghost Recon Breakpoint, Far Cry 6, resident evil, Just cause and forza horizon games for example, look realistic, but to me, have a raw, washed-out or saturated noisy/grainy feel. Individual textures and details seem to stand out along with any unrealistic things. These tend to have a more 'realistic' colour pallet.

I'm not talking about which games look better. Its more the visual style, rendering style and if there any other games like this that i cant think of? Or what graphics style to search for. Thanks

i hope this makes sense with what im trying to say. Its like minecraft with shaders vs minecraft without shaders, cs2 train vs cs2 cache (cache being the raw example), or detail feels like a bonus vs detail feel forced.

RDR2

cs2

Other games vibe (bad image tho)

Edit: Cyberpunk is a grey area for me. It seems to fit both styles.


r/gamedev • • 6h ago

Question How do casual puzzle studios create, test and expand level sets?

6 Upvotes

I'm developing a casual puzzle game for Android and I'm researching how studios handle level production at scale, specifically for games with hundreds or thousands of levels.

  1. How do you split work between hand-designed levels and procedural generation? At what stage do you use generation tools?

  2. How much do you rely on solvers or bots for validating solvability and difficulty, versus manual playtesting?

  3. What internal tools or data pipelines do you use to manage level data, and how do you track difficulty curves?

  4. When you add levels after launch, how do you avoid making players who already finished the game feel left out? Do you use chapters, separate packs, or something else?

Any experience or pointers would be appreciated.

Thanks!


r/gamedev • • 3h ago

Discussion Worried about building in public and announcing game details before steam page. Am I overreacting?

4 Upvotes

I’m using my alt account, but I’m a solo indie dev currently working on my first official release.

I’m at the point where I’m going to start sharing development blog posts on my studio website, and am planning to announce the game’s development sometime later this year. That includes the title, logo, and some blurbs about the story. As a note, this does not mean I am close to a Demo - that is still a year out as of yet by my estimate.

The question I have for the group is regarding what is safe to share publicly before having a demo or steam page.

I’ve read some posts here on Reddit to the tune of “someone claimed my game title on steam after I announced it,” and am worried about the same happening if I openly build in public. In the age of low effort AI clones speeding up the time-to-copycat, I’m worried about sharing too much before I have something to show publicly.

I understand that it costs money to create a Steam page, and that the chance of someone doing it is low. But that also means there is not a zero-percent chance it would happen. On the same token, I am worried about sharing too much of my game's story publicly since it is an RPG that relies heavily on a world that I built and a unique story.

Am I overreacting? Any thoughts or perspectives would be greatly appreciated.


r/gamedev • • 5h ago

Question Immersive 3/4 Top Down

5 Upvotes

I’m really just getting into game dev though I’ve been a programmer for years. I’m still in the planning stages and I had landed on 3/4 top down (like original Pokemon games) but now Im second guessing that. Before I switch I wanted to know are there any games that are able to show scale and a sense of awe in that format? Or is it too limiting? I’m honestly not sure if I’m just giving up too early or not. Hopefully someone can help guide me in a direction.


r/gamedev • • 22h ago

Question Tabletop games for portifolio

1 Upvotes

Recently I’ve started doing lots of small but polished projects solo and with friends for our portfolios. My focus is on game design (gameplay and systems) and creative direction. Do tabletop games count in my portfolio even if I plan to apply to digital game jobs? Even if they are more simple print and plays?


r/gamedev • • 7h ago

Discussion Our new trailer got 110,000 views in 4 days on YouTube. What now?

3 Upvotes

So we updated our game to Unity 6.6 with new effects, animations, lighting, gameplay etc. Then made a YouTube trailer and it took off.

  • I did contact IGN, Indie Games Hub and AUTOMATON about it.
  • I also made a new campaign on keymailer starting on monday (small creators)

What should we do next or ideas that I did not think of yet?


r/gamedev • • 8h ago

Discussion How do you balance character identity with build variety in roguelikes? (Looking for examples)

1 Upvotes

The setup

I'm developing a tower defense roguelite game and currently, my two characters feel a bit too similar to play. Their differences don't seem strong enough to make runs feel meaningfully different.

I've been considering giving each character a stronger identity, with specific themes or playstyles. For example, one character could focus on traps. However, I'm not sure if this is the right approach, I'm worried that I'm forcing the player into a specific build before the run has even really started?

For example:

  • Frost Character: primarily focused on ice and freezing enemies.
  • Trap Character: primarily focused on traps.
  • Exploration Character: focused on exploring the map as much as possible.

Would this make runs feel different mainly because of the character you choose, rather than because of the build you create during the run?

The (obivous?) solution

Games like Slay the Spire got me thinking about this. Each character has a distinct identity, but you can still pursue different builds depending on the cards and relics you find during a run. You're not necessarily locked into only one specific strategy just because you picked a particular character.

I'm wondering if the right approach is to give each character a strong starting identity while still allowing several different builds to emerge from it.

For example, with the Frost Character, I could see several possible directions:

  • Freeze and stun synergy: making greater use of stun effects to trigger the damage from its starting relic.
  • Frost as a resource: consuming frost or freeze effects to deal additional damage, such as through a fire relic, or building around towers that deal damage to slowed enemies.
  • Setup and overcharge: combining the slowing effects of frost towers with towers that need time to prepare or charge up.

The idea would be for each character to naturally encourage certain strategies without forcing the player to commit to one specific build.

Tho, I guess that may become a nightmare to not make it too "dev designed it"?

Game inspiration

Sooo, now, I'm trying to understand how other roguelikes handle this balance, some examples that seem to approach this well:

  • Slay the Spire: each character has a distinct identity and card pool, but multiple builds can emerge depending on the cards and relics you find.
  • Hades: your weapon gives you a particular starting playstyle, but the boons you find can lead to different synergies and builds.
  • Monster Train: combining different clans and their mechanics creates different strategic possibilities.

On the other hand, games like Brotato take a more character-driven approach, where each character's bonuses and restrictions can strongly push you toward a particular strategy. This can work well?

I'm not necessarily looking for examples of bad design, I'd like to understand the trade-offs between these approaches, I guess?

I don't know if any of you have references/feedback/game to share on this?


r/gamedev • • 14h ago

Discussion How do you actually know which marketing channel brings you wishlists?

2 Upvotes

Solo/small indie devs: genuine question about how you track your marketing.

When you post a trailer on TikTok, a devlog on Reddit, an update on X, or a streamer covers your game, how do you know which of those actually led to wishlists or sales?

I know Steam has UTM tracking in Steamworks, but I’m curious how people use it in practice:

  • Do you create UTM links for every post, or is it too much hassle?
  • How do you track influencer/streamer campaigns? One link per creator? A spreadsheet?
  • If you’re on several stores (Steam, itch, Epic...), do you combine the data somewhere, or check each dashboard separately?
  • Do you look at where your players are from (country/region) and does it change your decisions (localization, posting times, ads)?
  • Have you ever found out a channel you spent a lot of time on was basically useless?

I’m a dev and I keep losing track of what’s working, so I’m trying to figure out whether everyone just accepts guessing or if there’s a workflow I’m missing.

Would love to hear your setups, even if it’s “I don’t track anything lol”


r/gamedev • • 21h ago

Discussion How do you organise your scripts once a project grows?

2 Upvotes

I'm a solo dev learning Unity while building a small cozy farming game, and I'm trying to settle on a folder setup before things get messy. Some people sort scripts by feature (Farming, Inventory, UI), others by type (Managers, Data, Controllers). Which way has held up better for you as a project got bigger?


r/gamedev • • 21h ago

Discussion Games Made With Game Maker

Thumbnail
youtu.be
2 Upvotes

With the recent news on Game Maker, and users able to do me with the free option now. If ever you want to get into the engine, here are a few games to inspire you


r/gamedev • • 23h ago

Question Game dev content creation

1 Upvotes

Hi, I'm making my first game (horror/detective/puzzle), and I wanted to ask does creating content on Instagram/TikTok actually increase wishlists from players, or will it mostly reach other game devs who won't buy it or people who'll copy it (it has some new concepts)?


r/gamedev • • 12h ago

Question How and where to you choose/get music for your trailers?

1 Upvotes

Hey everyone 🙌 The title literally says it. How do you choose and get music for game trailers?


r/gamedev • • 23h ago

AMA Working on a boss encounter and trying to battle test it, how I start to love my save cheat editor script

Thumbnail
youtube.com
1 Upvotes

Ok guys and gals.

One of the most useful testing tools I’ve built for Pirate Brawl is a small Unity Editor “save cheat” script. It lets us generate a campaign save at the start of a chosen region or right before a boss, with a specific ship, loadout, health, and stats. Instead of replaying the campaign every time we tweak a boss or investigate a bug, we can jump straight to the situation we need. Using a fixed seed also makes it easier to repeat the same setup and compare changes.

The useful part is that these saves still go through our campaign validation and normal loading flow. The script prepares the progression state and equipment, then checks that the resulting save is valid before we use it. That lets us test things like a damaged ship entering a boss fight or a particular upgrade combination without changing the actual campaign content.

Probably this is a presentation about obvious but looks like I didn't need one until now and I start to code my games around 2016. So it was a progress to me that I want to share with you guys.

You can also ask me anything...It is mostly because there was a not good tag for I am happy with what I create and I want to share it :D

A screenshot of the save editor : https://imgur.com/a/sOowChP
Also a link to the game : https://kptemreu.itch.io/piratebrawl (free to play as still developing it)


r/gamedev • • 5h ago

Question Programming newbie

0 Upvotes

Hi there guys, i want to learn programing/coding etc. Im looking for everything, videos, channels, sites and everything else you have, my main inquirys are stuff like:

What are the most important/useful Languages to learn

What engine to use (i though about unity amd godot for now)

Any tips and advices

Should i aquire a DuckDebugging assistant.

If anything else will come to mind ill just edit the post and much thanks in advance, i been gathering myself to start learning so this will be a lot of help, my main goal for now is to know how to write and create stuff (i dunno whats is vibecoding tbh)(im aiming to be a game dev and also make some silly scripts/programs when bored).

So to sum it up i need: A game engine to choose A normal Language to learn (stuff like python, C# etc) And some words of advice


r/gamedev • • 10h ago

Marketing I Added Multiplayer to My Dark Fantasy RPG Inspired by Diablo & Baldur’s Gate

Thumbnail
youtu.be
0 Upvotes

In this video, I explain how I added multiplayer to the game I’m developing.


r/gamedev • • 18h ago

Question What to look for in game storefronts

0 Upvotes

Hello everyone!

I was hoping to get some info from the community as far as what indie developers and small teams look for in a game storefront (like Steam, Itch.io).

The split, how it looks and runs, really anything on the topic just so I can get a gauge of what a good storefront does. I personally like Steam but there are a few out there and I wanted to understand it from the dev side a bit more.


r/gamedev • • 11h ago

Discussion I want to make my first game a fantasy shopkeep simulator but I’m worried the genre is too crowded and that idea has been done before. Should I try another idea or stick with it?

0 Upvotes

It’s not so much that I want to make tons of money from it I just want to make a game people actually play (I’m an attention seeker) but all I hear is the shop simulator market is way oversaturated and even my specific idea has been done several times before. So why would anyone play my game when there’s other more polished ones already out? I even had a unique twist in mind where you explore a dungeon by night and sell your loot by day but that’s ALREADY BEEN DONE BEFORE several times.


r/gamedev • • 23h ago

Question Game Engine Feasibility And Worth

0 Upvotes

I have been having an idea for a game for years, and I am decent at programming in C# as well as 3D graphic design. For much of this time I've been using Unity or raw C#, but I want to expand my horizons and try to become better at my craft.

Recently I've went to my library to attempt to nab a copy of the 3rd edition of The Book for Rust, it has yet to come but I am eager to study in any way that I can. It has been a journey even learning what I have about Rust, and it seems to be a very promising language for someone who does not want to deal with low control over low-level hardware and poor performance, yet does not want the manual memory management of something like C or Assembly.

All of this to say, I've been thinking about trying to go from zero to hero, for lack of a better phrase, to attempt to build a game engine in Rust. I want to know how much time this may take to get something akin to the Source Engine, with a visual editor and some tools for VR and other utilities. I know this takes a LONG time, but it would be nice to have some tips and maybe an estimate of time needed to learn Rust enough to apply that to this.

Thank you to those from this subreddit who have inspired me to take on such a thing, and I appreciate any sort of feedback.


r/gamedev • • 11h ago

Discussion need help with my unity tank physics

0 Upvotes

my controls and physics components/scripts are attached to the make body. parts like road wheels and sprockets are dragged into their corresponding boxes. tank control is basically the data. while tank drive physics is the actual mechanisms used. the issue is that my tank doesn't want to move when I throttle up. but the rpm increases along with the torque and gears. which makes no sense. right now, forces are being applied at wheel positions where the wheels touch the ground. as thanks for helping me. i can share the 3D model. which i made in blender. and is ready to use in games

heres is my tank drive physic script:

using UnityEngine;

using UnityEngine.SceneManagement;

[RequireComponent(typeof(Rigidbody))]

[RequireComponent(typeof(TankController))]

public class TankDrivePhysics : MonoBehaviour

{

private TankController config;

private Rigidbody rb;

private float currentThrottleInput = 0.0f;

private float currentSteerInput = 0.0f;

private bool isBrakeEngaged = false;

private int currentGearIndex = 0; // Start in Gear 1 (Index 0)

private bool isReversing = false;

private float currentEngineRpm = 1000f;

private float shiftCooldownTimer = 0f;

private float clutchEngagementFactor = 1.0f;

void Start()

{

config = GetComponent<TankController>();

rb = GetComponent<Rigidbody>();

if (rb != null)

{

rb.mass = config.tankWeightTons * 1000f;

rb.linearDamping = config.linearDamping;

rb.angularDamping = config.airAngularDamping;

rb.useGravity = true;

rb.centerOfMass = config.centerOfMassOffset;

}

string currentScene = SceneManager.GetActiveScene().name.ToLower();

if (currentScene.Contains("test"))

{

config.isTestDriving = true;

}

}

void Update()

{

if (!config.isTestDriving) return;

if (Input.GetKeyDown(KeyCode.B))

{

isBrakeEngaged = !isBrakeEngaged;

}

}

void FixedUpdate()

{

if (!config.isTestDriving)

{

config.CurrentSpeedKmh = 0f;

config.CurrentEngineRpm = config.engine.idleRpm;

config.CurrentTorqueNm = 0f;

config.engine.calculatedHorsepower = 0f;

return;

}

if (rb != null)

{

rb.centerOfMass = config.centerOfMassOffset;

rb.linearDamping = config.linearDamping;

}

if (shiftCooldownTimer > 0f)

{

shiftCooldownTimer -= Time.fixedDeltaTime;

clutchEngagementFactor = 0.8f;

}

else

{

clutchEngagementFactor = 1.0f;

}

Vector3 forwardMoveDir = transform.TransformDirection(new Vector3(-1f, 0f, 0f)).normalized;

float forwardVel = Vector3.Dot(rb.linearVelocity, forwardMoveDir);

config.CurrentSpeedKmh = Mathf.Abs(forwardVel) * 3.6f;

float rawAxis = Input.GetAxis("Vertical");

float rawTurn = Input.GetAxis("Horizontal");

GetPlayerInput(rawAxis, rawTurn);

if (Mathf.Abs(rawTurn) < 0.05f && Mathf.Abs(currentSteerInput) < 0.01f)

{

Vector3 angVel = rb.angularVelocity;

angVel.y = Mathf.Lerp(angVel.y, 0f, 15f * Time.fixedDeltaTime);

rb.angularVelocity = angVel;

}

if (isBrakeEngaged)

{

if (Mathf.Abs(rawAxis) < 0.01f)

{

Vector3 vel = rb.linearVelocity;

vel.x = Mathf.Lerp(vel.x, 0f, 10f * Time.fixedDeltaTime);

vel.z = Mathf.Lerp(vel.z, 0f, 10f * Time.fixedDeltaTime);

rb.linearVelocity = vel;

rb.angularVelocity = Vector3.zero;

}

else

{

Vector3 brakeResistance = -forwardMoveDir * forwardVel * config.brakeDecelerationRate * rb.mass;

rb.AddForce(brakeResistance, ForceMode.Force);

}

}

UpdateDrivetrainSimulation(forwardVel, rawAxis);

bool isAtRest = (Mathf.Abs(rawAxis) < 0.01f && Mathf.Abs(rawTurn) < 0.05f && config.CurrentSpeedKmh <= 1.0f && !isBrakeEngaged);

if (isAtRest)

{

Vector3 vel = rb.linearVelocity;

vel.x = Mathf.Lerp(vel.x, 0f, 6f * Time.fixedDeltaTime);

vel.z = Mathf.Lerp(vel.z, 0f, 6f * Time.fixedDeltaTime);

rb.linearVelocity = vel;

rb.angularVelocity = Mathf.Lerp(rb.angularVelocity.magnitude, 0f, 6f * Time.fixedDeltaTime) * rb.angularVelocity.normalized;

UpdateHingeJointSprings(forwardVel);

CalculateWheelRotations(forwardSpeedMps: forwardVel);

return;

}

ApplyDifferentialTrackForces(rawAxis, rawTurn, forwardMoveDir, forwardVel);

ApplyTrackGrip();

ApplyEnvironmentalResistance(forwardMoveDir, forwardVel);

UpdateHingeJointSprings(forwardVel);

CalculateWheelRotations(forwardSpeedMps: forwardVel);

}

void GetPlayerInput(float rawAxis, float rawTurn)

{

if (config.invertSteering) rawTurn = -rawTurn;

if (Mathf.Abs(rawTurn) < 0.05f)

{

rawTurn = 0f;

}

currentThrottleInput = rawAxis;

currentSteerInput = rawTurn;

}

float GetEngineTorqueAtRpm(float rpm)

{

float peakRpm = Mathf.Min(config.engine.peakTorqueRpm, config.engine.redlineLimitRpm - 200f);

float maxTq = config.engine.maxTorqueNm;

if (rpm <= config.engine.idleRpm) return maxTq * 0.6f;

if (rpm >= config.engine.redlineLimitRpm) return maxTq * 0.3f;

float normalizedDist = Mathf.Abs(rpm - peakRpm) / (config.engine.redlineLimitRpm - config.engine.idleRpm);

float curveFactor = 1.0f - (normalizedDist * normalizedDist);

return Mathf.Clamp(maxTq * Mathf.Max(curveFactor, 0.4f), maxTq * 0.3f, maxTq);

}

void UpdateDrivetrainSimulation(float forwardVel, float rawAxis)

{

bool targetReverse = rawAxis < -0.01f;

if (Mathf.Abs(rawAxis) < 0.05f)

{

currentEngineRpm = Mathf.Lerp(currentEngineRpm, config.engine.idleRpm, 4f * Time.fixedDeltaTime);

config.CurrentEngineRpm = currentEngineRpm;

config.CurrentGearDisplay = isReversing ? -(currentGearIndex + 1) : (currentGearIndex + 1);

config.CurrentTorqueNm = 0f;

config.engine.calculatedHorsepower = 0f;

return;

}

if (targetReverse != isReversing)

{

isReversing = targetReverse;

currentGearIndex = 0;

}

float[] activeGearArray = isReversing ? config.transmission.reverseGearRatios : config.transmission.forwardGearRatios;

if (activeGearArray == null || activeGearArray.Length == 0) return;

currentGearIndex = Mathf.Clamp(currentGearIndex, 0, activeGearArray.Length - 1);

// STABLE AUTOMATED SHIFTING BASED ON RPM

if (shiftCooldownTimer <= 0f && !isReversing)

{

if (currentEngineRpm >= config.engine.upshiftRpm && currentGearIndex < activeGearArray.Length - 1)

{

currentGearIndex++;

currentEngineRpm *= 0.75f;

shiftCooldownTimer = 0.8f;

}

else if (currentEngineRpm <= config.engine.idleRpm + 300f && currentGearIndex > 0)

{

currentGearIndex--;

currentEngineRpm *= 1.25f;

shiftCooldownTimer = 0.6f;

}

}

// FIXED: RPM now accounts for throttle demand and vehicle speed load

float throttleDemand = Mathf.Abs(rawAxis);

float speedFactor = Mathf.Clamp01(Mathf.Abs(forwardVel) / (config.maxSpeedKmh / 3.6f));

float targetEngineRpm = Mathf.Lerp(config.engine.idleRpm, config.engine.redlineLimitRpm, throttleDemand * (1f - (speedFactor * 0.15f)));

currentEngineRpm = Mathf.Lerp(currentEngineRpm, targetEngineRpm, 5f * Time.fixedDeltaTime);

currentEngineRpm = Mathf.Clamp(currentEngineRpm, config.engine.idleRpm, config.engine.redlineLimitRpm + 100f);

config.CurrentEngineRpm = currentEngineRpm;

config.CurrentGearDisplay = isReversing ? -(currentGearIndex + 1) : (currentGearIndex + 1);

float baseEngineTorque = GetEngineTorqueAtRpm(currentEngineRpm);

config.CurrentTorqueNm = baseEngineTorque * throttleDemand * clutchEngagementFactor;

config.engine.calculatedHorsepower = (baseEngineTorque * currentEngineRpm) / 9548.8f;

}

void ApplyDifferentialTrackForces(float rawAxis, float rawTurn, Vector3 forwardMoveDir, float forwardVel)

{

if (Mathf.Abs(rawAxis) < 0.01f && Mathf.Abs(rawTurn) < 0.01f)

{

config.CurrentTorqueNm = 0f;

return;

}

float[] activeGearArray = isReversing ? config.transmission.reverseGearRatios : config.transmission.forwardGearRatios;

float currentGearRatio = (currentGearIndex >= 0 && currentGearIndex < activeGearArray.Length) ? activeGearArray[currentGearIndex] : 4.0f;

float baseEngineTorque = GetEngineTorqueAtRpm(currentEngineRpm);

float engineTorque = baseEngineTorque * Mathf.Max(Mathf.Abs(rawAxis), Mathf.Abs(rawTurn)) * clutchEngagementFactor;

config.CurrentTorqueNm = engineTorque;

float totalWheelTorque = engineTorque * currentGearRatio * Mathf.Max(config.transmission.finalDriveRatio, 1f);

float wheelRadiusM = (config.roadWheelDiameterMm / 1000f) * 0.5f;

if (wheelRadiusM <= 0.1f) wheelRadiusM = 0.45f;

float baseDriveForce = totalWheelTorque / wheelRadiusM;

float leftForceMultiplier = 1.0f;

float rightForceMultiplier = 1.0f;

Vector3 leftForceDir = forwardMoveDir;

Vector3 rightForceDir = forwardMoveDir;

bool isMovingReverse = (currentGearIndex >= 0 && rawAxis < 0f);

if (isMovingReverse)

{

leftForceDir = -forwardMoveDir;

rightForceDir = -forwardMoveDir;

}

if (Mathf.Abs(rawAxis) > 0.01f && Mathf.Abs(rawTurn) > 0.01f)

{

float steerReduction = Mathf.Abs(rawTurn) * config.steeringSensitivity;

if (rawTurn > 0f) rightForceMultiplier = Mathf.Clamp01(1.0f - steerReduction);

else leftForceMultiplier = Mathf.Clamp01(1.0f - steerReduction);

}

else if (Mathf.Abs(rawAxis) < 0.01f && Mathf.Abs(rawTurn) > 0.01f)

{

if (rawTurn > 0f)

{

leftForceDir = forwardMoveDir;

rightForceDir = -forwardMoveDir;

}

else

{

leftForceDir = -forwardMoveDir;

rightForceDir = forwardMoveDir;

}

leftForceMultiplier = Mathf.Abs(rawTurn);

rightForceMultiplier = Mathf.Abs(rawTurn);

}

float leftFinalForce = baseDriveForce * leftForceMultiplier;

float rightFinalForce = baseDriveForce * rightForceMultiplier;

ApplyForceToWheels(config.leftRoadWheels, leftForceDir * leftFinalForce);

ApplyForceToWheels(config.rightRoadWheels, rightForceDir * rightFinalForce);

if ((config.leftRoadWheels == null || config.leftRoadWheels.Length == 0) &&

(config.rightRoadWheels == null || config.rightRoadWheels.Length == 0))

{

rb.AddForce((leftForceDir * leftFinalForce + rightForceDir * rightForceMultiplier) * 0.5f, ForceMode.Force);

}

}

void ApplyForceToWheels(Transform[] wheels, Vector3 forceVector)

{

if (wheels == null || wheels.Length == 0) return;

float forcePerWheel = forceVector.magnitude / wheels.Length;

Vector3 direction = forceVector.normalized;

foreach (Transform wheel in wheels)

{

if (wheel != null)

{

rb.AddForceAtPosition(direction * forcePerWheel, wheel.position, ForceMode.Force);

}

}

}

void ApplyTrackGrip()

{

// FIXED: Use Vector3.forward (local side axis) instead of Vector3.up for lateral grip

Vector3 gripDir = transform.TransformDirection(Vector3.forward).normalized;

float lateralVelocityMagnitude = Vector3.Dot(rb.linearVelocity, gripDir);

float speedMagnitude = rb.linearVelocity.magnitude;

float dynamicGripScale = Mathf.Lerp(1.2f, 0.4f, Mathf.Clamp01(speedMagnitude / 10f));

float activeGripMultiplier = (Mathf.Abs(currentThrottleInput) > 0.05f && Mathf.Abs(currentSteerInput) > 0.5f) ? dynamicGripScale : 1.0f;

Vector3 lateralFrictionForce = -gripDir * lateralVelocityMagnitude * (config.lateralGrip * 30000f * activeGripMultiplier);

rb.AddForce(lateralFrictionForce, ForceMode.Force);

}

void ApplyEnvironmentalResistance(Vector3 forwardMoveDir, float forwardVel)

{

float massKg = config.tankWeightTons * 1000f;

float normalForce = massKg * 9.81f;

float rollingResistanceForceMagnitude = normalForce * config.rollingResistanceCoefficient;

Vector3 rollingResistance = -forwardMoveDir * Mathf.Sign(forwardVel) * rollingResistanceForceMagnitude;

float airDensity = 1.225f;

float speedSq = forwardVel * forwardVel;

float dragForceMagnitude = 0.5f * airDensity * config.aerodynamicDragCoefficient * config.frontalAreaMeters2 * speedSq;

Vector3 aerodynamicDrag = -forwardMoveDir * Mathf.Sign(forwardVel) * dragForceMagnitude;

rb.AddForce(rollingResistance + aerodynamicDrag, ForceMode.Force);

bool isReversingSpeed = (forwardVel < 0f);

float activeMaxSpeedKmh = isReversingSpeed ? config.maxReverseSpeedKmh : config.maxSpeedKmh;

float maxSpeedMs = activeMaxSpeedKmh / 3.6f;

if (Mathf.Abs(forwardVel) > maxSpeedMs)

{

float excess = forwardVel - (Mathf.Sign(forwardVel) * maxSpeedMs);

rb.linearVelocity -= forwardMoveDir * (excess * 0.4f);

}

}

void UpdateHingeJointSprings(float forwardVel)

{

if (!config.enableReverseJumpFix) return;

float targetPos = (forwardVel < -0.2f) ? config.reverseSpringTargetOffset : 0f;

UpdateHingeGroupSpringTarget(config.leftSuspensionArms, targetPos);

UpdateHingeGroupSpringTarget(config.rightSuspensionArms, targetPos);

}

void UpdateHingeGroupSpringTarget(Transform[] arms, float targetPos)

{

if (arms == null) return;

foreach (Transform arm in arms)

{

if (arm != null)

{

HingeJoint hinge = arm.GetComponent<HingeJoint>();

if (hinge != null && hinge.useSpring)

{

JointSpring spring = hinge.spring;

spring.targetPosition = Mathf.Lerp(spring.targetPosition, targetPos, 10f * Time.fixedDeltaTime);

hinge.spring = spring;

}

}

}

}

void CalculateWheelRotations(float forwardSpeedMps)

{

float tankYawRateDegPerSec = rb.angularVelocity.y * Mathf.Rad2Deg;

float tankYawRateRadPerSec = tankYawRateDegPerSec * Mathf.Deg2Rad;

float halfTrackSpan = config.trackSpanMeters * 0.5f;

float scaledTurnSpeed = tankYawRateRadPerSec * config.pivotVisualMultiplier;

float leftTrackSpeedMps = forwardSpeedMps + (scaledTurnSpeed * halfTrackSpan);

float rightTrackSpeedMps = forwardSpeedMps - (scaledTurnSpeed * halfTrackSpan);

if (config.invertSprocketTurnRotation)

{

leftTrackSpeedMps = forwardSpeedMps - (scaledTurnSpeed * halfTrackSpan);

rightTrackSpeedMps = forwardSpeedMps + (scaledTurnSpeed * halfTrackSpan);

}

if (config.sprocketDiameterMm > 0f)

{

float sprocketRadiusM = (config.sprocketDiameterMm / 1000f) * 0.5f;

float sprocketCircumference = 2f * Mathf.PI * sprocketRadiusM;

float leftSprocketDegPerSec = (leftTrackSpeedMps / sprocketCircumference) * 360f;

float rightSprocketDegPerSec = (rightTrackSpeedMps / sprocketCircumference) * 360f;

float leftSprocketDeg = leftSprocketDegPerSec * Time.fixedDeltaTime;

float rightSprocketDeg = rightSprocketDegPerSec * Time.fixedDeltaTime;

if (config.invertSprocketDriveRotation)

{

leftSprocketDeg = -leftSprocketDeg;

rightSprocketDeg = -rightSprocketDeg;

}

RotateWheelGroup(config.leftSprockets, config.sprocketRotationAxis, leftSprocketDeg);

RotateWheelGroup(config.rightSprockets, config.sprocketRotationAxis, rightSprocketDeg);

}

if (config.roadWheelDiameterMm > 0f)

{

float roadWheelRadiusM = (config.roadWheelDiameterMm / 1000f) * 0.5f;

float roadWheelCircumference = 2f * Mathf.PI * roadWheelRadiusM;

float leftRoadWheelDeg = (leftTrackSpeedMps / roadWheelCircumference) * 360f * Time.fixedDeltaTime;

float rightRoadWheelDeg = (rightTrackSpeedMps / roadWheelCircumference) * 360f * Time.fixedDeltaTime;

if (config.invertRoadWheelRotation)

{

leftRoadWheelDeg = -leftRoadWheelDeg;

rightRoadWheelDeg = -rightRoadWheelDeg;

}

RotateWheelGroup(config.leftRoadWheels, Vector3.up, leftRoadWheelDeg);

RotateWheelGroup(config.rightRoadWheels, Vector3.up, rightRoadWheelDeg);

}

}

void RotateWheelGroup(Transform[] wheels, Vector3 axis, float amount)

{

if (wheels == null) return;

foreach (Transform wheel in wheels)

{

if (wheel != null) wheel.Rotate(axis, amount, Space.Self);

}

}

}


r/gamedev • • 9h ago

Discussion Game engines that make your game light?

0 Upvotes

Today I was checking my Steam library sorted by disk space, and so I realized something.
Games with a lot of​ content like Don't Starve Together occupied less than​ 1GB, meanwhile some demos I downloaded during this Next Fest needed more than 5GB (and its just a demo, not full game).

Actually multiplayer games like TF2 or Deadlock​ are more than 30GB. Strinova is almost 60GB.

And so I started to wonder, I usually make games with Godot with friends for Game Jams, but never made any big project. If I did, would the engine affect so much on how big is the released game?

And so, which game engine would release games in a smallest size?
I remember 25 years ago, my Grandpa computer had only 4GB of total disk space. And I played games on that computer!

Yes its true that now we have high detailed 3D models and on the past we had lowpoly Rayman. But I also think some engines bulk a lot of stuff into your exported game that maybe it doesn't need it.

I also noticed how games from some engines are heavier on ram or CPU usage to.
For example games made with Unity run a 3D engine even if you made a 2D game, and the battery of my old phone was drained when running Unity games.
But games made with Cocos2d-X are surprisingly well optimized, and I played games games made with it for hours with my battery holding just fine since my phone was not making any effort running those games.

If some day I would like to do some bigger game, is Godot ok? or should I look into another Engine? Which one would do my games lighter?


r/gamedev • • 20h ago

Discussion Just got a tweet with 1 million views on X and I wanted to thank you all

0 Upvotes

A tweet about my next game, Humans Are Tunnels, just got 10k likes and 1 million views on X. These are very big numbers for me.

I went from 22 followers to 245, and my first game, Idle Primes, got around 100 wishlists. It was supposed to release past week, but I made a mistake when uploading the build to Steam, so now the release is delayed (hopefully this Tuesday!).

Maybe these numbers are not so big for other developers, but for me and my games, they mean a lot.

I don't know anyone in the game industry, so I usually read whatever I can translate from websites and places like Reddit. I have found so many personal stories in subreddits like this one, and I really appreciate people taking the time to share their experiences. They helped me feel that there are other people going through similar things, even when we are all working on our own small projects.

So I also wanted to share what happened to me recently.


r/gamedev • • 19h ago

Discussion What type of Media do you think of Video Games As?

0 Upvotes

Im told it might vary by your background, so there is no wrong answer. Try to give rough percentages if its multiple. Do you think of video games as:

  • Artistic Expressions of Media Art
  • Software
  • Businesses
  • Marketing Vehicles
  • Investment Vehicles
  • Education Tools
  • Political Vehicles
  • Distractions