Giter Club home page Giter Club logo

sc2krepainter's Introduction

SC2KRepainter

Fixes palette animation in Win95 SimCity 2000 on modern Windows

Instructions

Run SC2KRepainter.exe before or after you launch Win95 SimCity 2000 on modern Windows, like Windows 10, and the game's animations should start working. You must run the game with the "Reduced color mode" compatibility setting set to "8-bit (256) color". This application targets .NET 4.5, which should be built-in to Windows 8 and newer.

Side Effects

As this fixes palette-based animations in SC2K by forcing the game to repaint its entire window instead of just the sections the game wants, it has side effects. One example is that the price of things as you click and drag will disappear right after changing.

Technical Description

SimCity 2000 uses palette swapping to animate lots of things in the game. Windows 10 (and I've heard some older versions like 8) still support 256-color compatibility mode, but don't update the results of changing palettes until the game repaints that part of the window. That's why you could often see little bits of the animations near things like the tile highlighted near your mouse cursor. On older versions of Windows, the actual palette being used to draw the screen would be updated, so the game wouldn't need to repaint anything to cause the animations to happen.

SC2KRepainter simply finds the SimCity 2000 window and invalidates the paint status of the entire window over and over again in a loop. This causes the game to redraw the entire window with every update, which allows you to see the animations. However, it also forces the game to repaint things it didn't expect, which is why the side effects previously mentioned occur. There may also be performance impacts, though I wouldn't think they'd be noticeable on a modern machine.

This whole problem seems like it could be much better solved by patching SimCity 2000 itself to repaint its window every time it changes the palette, and to fix the side effects, but that sort of low-level x86 assembly hacking is outside my wheelhouse.

sc2krepainter's People

Contributors

guspaz avatar

Stargazers

 avatar John-Michael Mulesa avatar Nicholas Ochoa avatar

Watchers

Rob Gevers avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.