Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Source Code for Populous for Windows CE / Dreamcast Released (github.com/lemonhaze420)
149 points by davikr on Dec 25, 2022 | hide | past | favorite | 71 comments


Populous is a game I'd love to play again! I had high hopes for Godus, but in the end Godus was pretty much everything I hate about modern games.


Could you explain that in more detail? I was thinking about buying it.


If you have three hours (!) to spare, Kim Justice's documentary on Peter Molyneux is worth a watch: https://www.youtube.com/watch?v=zFZ92jySWe0.

If you don't have three hours to spare and all you want to know about is Godus then, helpfully, the documentary is also available in several parts (which, I believe, was its original format). Godus is covered in part 4: https://www.youtube.com/watch?v=V9ysOEFJhFY.

Bit of a sad tale overall. Nevertheless, for reasons I've explained at https://news.ycombinator.com/item?id=24377333, and despite all of this history, Peter Molyneux will always remain something of a legend to me.


> Godus is covered in part 4

You should also do yourself a favor and read John Walker's interview on RPS, which is absolutely brutal:

https://www.rockpapershotgun.com/peter-molyneux-interview-go...

(I miss that era of RPS)


It indeed is brutal. In fact, I'll go a little bit further. This question jumped out at me as being bang out of order:

> RPS: Do you think you can make a great game?

Peter Molyneux has clearly made some mistakes over the years, and Godus was certainly a fiasco, but can he make a great game? What an absolutely arrogant and impertinent question. He's made a long list of great games going all the way back to Populous. So, yes, I think he can make a great game. John Walker ought to be ashamed of himself for asking that and I don't understand why Peter Molyneux didn't shut him down with a much stronger answer.


Ouch, that was brutal for sure

It's a very good lesson in managing expectations and planning ahead. I don't ever want to end up in Molyneux's shoes. I think he did his honest best, but he just can't manage a lot of people or a complicated schedule, and because of that he pissed everyone off.


time gating, microtransactions, ties to "social" features where the first to dig a specific piece out of a cube would win godus related things (that were never delivered), and ultimately abandoned after early monetization failed.


@frogilus: This sounds correct, it's been too long for me to remember specifics, but time gating and microtransactions sound like some of the biggest issues I had with it at the time.


It would be beneficial to add a readme explaining what this is.


The only google results about Populous and the Dreamcast refer back to this HN post and a comment-less Reddit post or two linking to the same repo. Mysterious. It doesn't look like Populous ever got a Dreamcast release either.

edit: Oh, I dug around for LemonHaze and found this twitter post https://nitter.mint.lgbt/i/status/1607154272612896769 I think the title of the HN post is erroneous. It seems to be an unreleased Pocket PC port, which makes way more sense.

edit2: The source for the code seems to be https://en.sega-dreamcast-info-games-preservation.com/liste-... where it's titled as "Source code of Populous for the Pocket PC system (Unreleased Windows CE Version)" Apparently WinCE games can be ported to Dreamcast too?


The credits also reference Pocket PC:

  CString theCredits[50];
  theCredits[0] = "POPULOUS";
  theCredits[1] = "FOR THE";
  theCredits[2] = "POCKET PC";


> "Apparently WinCE games can be ported to Dreamcast too?"*

My memory is fuzzy but that seems doubtful. Windows CE for PocketPC had implementations for Windows' windowing system but IIRC Windows CE for the Sega Dreamcast did not, under the assumption that the game developer would be going straight to DirectX to manage the display.


Windows CE was on the CD for Dreamcast games. You could use image Builder to choose what was included. However Populous is fullscreen and dose not use any Window's UI.


Dreamcast ran windows ce, so it would be easy (ish?) to port it.


The Dreamcast didn’t come with CE. There was just a version that could be used /with/ the DC.

For some reason people equate “compatible with Windows CE” stickers with “runs Windows CE when you turn it on”


According to segaretro.org the Dreamcast did actually run an "optimized" version of WinCE (painful acronym) with DirectX. Some games ran on top of it but most ran a different OS that actually booted off of the game disc.

https://segaretro.org/Windows_CE


From that link: “ In the end, Sega chose to go down a different route than what was originally planned - bundling simple operating systems within the discs themselves. Running games through Windows CE was still an option for developers, but most games used Sega's proprietary software instead. The limited adoption of Windows CE is often blamed on console programmers lacking the experience to deal with the OS, and a lack of advantages that Windows CE offered over the competition.”

It doesn’t by default boot to CE. It /is/ an option though. But it doesn’t boot it from an internal ROM.


Or having the experience to not want to deal with that OS


Yeah, what an odd decision. I did a lot of work on CE back in the day, and I'm not a pro game dev by any means, but I don't know what advantage it would offer over any SDK that abstracted the hardware a little

CE was a very lightweight OS that was mostly nice for making it easier to port drivers and apps from one embedded system to another

Maybe Sega had some vague plans to turn the Dreamcast into a multipurpose family computer?


Considering it had a modem, could have an Ethernet module added, had official Web Browser Discs, had official Keyboard and Mouse accessories (I have all of these except the darn Ethernet module)… I think they were. Or at least a “web TV” -esque plan.

It had a ton of potential. The hardware is still fast enough to do basic browsing etc without issue if it had an updated browser.


It should be noted that the Dreamcast doesn't have any built in OS. Windows CE libraries were booted of the GD-Rom discs.


I think it’s reasonable to assume what is on the box comes in the box.

It’s not very intuitive that CE is merely available as an SDK option, and that it is only included in the boot media if developer wishes to do so.

Also slightly disappointing that it could have been the first console that don’t need to go through reset/reboot when changing games, though that would have been too ahead of its time.


I would agree if the sticker on the box didn’t say “compatible” :p


Dreamcast has a little Windows CE logo right on the front but I never knew to what extent that meant much


Seems pretty spot on to me. Which part has you confused? Maybe Google Populous (game) if you don't know the title or "Dreamcast" if you don't know what that is.


it's a nefarious underhanded dump to legetimize misspelling deprecate as depricate


Nefarious is pretty insulting. Software preservation is important


Important enough to promulgate a wrong spelling of deprecate?


Absolutely.


Is this an actual release or a nebulously-licensed dump of some random port? If it's the former, that's awesome as this was one of my favourite games as a kid.


The files don't look generated at least, no generator would produce unordered stuff like this (god.h):

    #define FIRST_RUIN_TOWN     54
    #define BAD_LAND            66
    #define FLAG_SPRITE         64
    #define SHIELD_SPRITE       68
    #define GODS_HAND_SPRITE    78
    #define ANHK_SPRITE         80
    #define SKULL_SPRITE        81
    #define DEVILS_HAND_SPRITE  79


A generator wouldn't even have this file. You'd just see 54 embedded somewhere in a call.


that was my first thought, too



A different repository by the same user had a similar text:

https://github.com/LemonHaze420/DCSpeedBall2/blob/e6d9ce3c11...

I don't remember Speedball 2 having a DreamCast port, so these repositories seem somewhat strange. They are also strange for missing license files and various other asset files.


I love how they even took into consideration safe programming practices, who says game devs shouldn't care about security.

https://github.com/LemonHaze420/DCPopulous/blob/master/safep...


Paranoia was pretty common (and reasonable!) back in the era before you could easily release patches. Tossing in all those asserts etc would mean you would catch problems sooner during testing and be able to fix them quicker.

Many game companies ship with asserts + assert messages turned on, for example, instead of making them DEBUG-only.


Would they abort(3) when an assert fails?

Isn't there a risk of having a erroneously strict assert predicate and then having the game abort unnecessarily?

If the game keeps going without aborting in the case that state has somehow been compromised, there is still the chance that the player won't actually notice.

I wonder if they are afraid that the game state will be compromised in a way that makes the player not realize the corruption, but still ruin the game.


You have the aggressive asserts in during development, you can make them nonfatal in release builds. Though many games actually leave them on, for example World of Warcraft still has them set to crash the game with a detailed error message. Tabula Rasa (the ill-fated MMO) handled many assertion failures in a nonfatal way with an in-game popup, and errors in WoW mods also don't crash the game.

Most of the games I work on have a mixed approach where if an error is recoverable I don't crash out, but if it's not then I fail-fast out with a detailed error popup. An example of a recoverable error would be a bug causing a player-activated ability to fail to activate, while fail-fast would be the right choice for something like an unexpected null in a data structure.


What did they do here? Verbatim copy it from the original assembler implementation to C code for WinCE?

https://github.com/LemonHaze420/DCPopulous/blob/master/popul...


It looks like it's been converted from arm to c - any assembly language bits in the original populous would have been presumably in 68000?

If it was based on the Archimedes version then maybe the sprite routines would have been the only assembly language bit.


Seems to be an unreleased port for the PocketPC, see my other comment https://news.ycombinator.com/item?id=34133405


Where is the Dreamcast code? I don’t see any non-Windows preprocessor directives.


I think this is an unofficial port. Populous is a lot older than the Dreamcast. It was originally released for MS-DOS and the Mega Drive / Genesis. As far as I know there wasn’t any official WinCE release. To be honest, by the time WinCE (let alone the Dreamcast) came to market there were already a few sequels to Populous so I doubt they’d have even bothered porting the original DOS game by that point.


I believe that, as most of the games in that era, it was originally released for Amiga. Wikipedia [1] seems to agree with me, but we both may be wrong.

[1] https://en.wikipedia.org/wiki/Populous_(video_game)


It was. I meant on Microsoft and Sega platforms (since this is mentioned as a WinCE/DC port) but appreciate the way I worded that wasn’t clear at all.


Sure looks like a PocketPC app to me:

    REG_ORIENTATION_SETTING
    DEFAULT_STYLUS_CONTROL


Dreamcast games often run Windows CE as their host operating system.


Dreamcast supported Windows CE but it was mainly the homebrew community which used it because it didn’t perform as well as Sega’s own hardware specific SDK. So most games didn’t use WinCE


> Windows CE but it was mainly the homebrew community

Name some?

Granted I’ve been out of the homebrew dev scene for a while, but this doesn’t sound right. Developing for Windows CE would require a commercial/proprietary copy of Platform Builder and Dreamcast BSP. This is not very “homebrew” friendly at all - especially when there were a ton of homebrew libraries and OSes for Dreamcast through the years, eg Kallistios.


There are a few homebrew releases that used WinCE, but that makes up something like 1% or less of homebrew software. I think there was some MP3 player, a 3D FPS that was never released, and a Duke3D port? Maybe a couple more? KallistiOS is, by far, the most popular choice, and is used in probably 98% of homebrew.


Ok then… on the other hand there were a bevy of commercial releases targeting Windows CE

https://segaretro.org/Windows_CE


All generalisations have counter examples (hence it being a generalisation). The fact that the above link is a small portion of all the games officially licensed on the Dreamcast supports my generalisation.


I was responding to the claim WinCE was mainly used for homebrew. That’s not true. It wasn’t used much, but what it was used for was mainly commercial releases.


It’s been somewhere in the region of 20 years since I’ve played any of the original era homebrew games but there definitely were a few.

Modern titles like Intrepid Izzy I don’t think are WinCE though.


Sega’s own Sega Rally 2 used WinCE. This is often blamed for its performance issues.


I wasn't part of that effort directly so I only saw what occurred at a slight distance but I'll suggest that that might not be a fair characterization. The SR2 team got quite a lot of direct support from the WinCE for Dreamcast team since it was a launch title and issues from them were given high priority. Current builds of SR2 were available at MS for testing continuously; I recall one of the early techniques the SR2 team used for the dust kicked up by the cars looked nice but absolutely tanked the framerate and they had to be advised to use another approach. They were certainly not left to stumble around in the dark.

As for performance, having an OS instead of coding to the bare metal of course imposes overhead but, from what I recall hearing, 3D performance of the WinCE SDK was on a par with Sega's SDK. The graphics engineers had access to Sega's SDK so they were able to do their own comparative benchmarking and they knew game developers would be scrutinizing that.

Ultimately, SR2's frame rate was entirely in the hands of the Sega Rally 2 development team by what code they used and what level of detail they tried to show. The cheat code for SR2 for the Dreamcast that reduces detail to increase framerate is an example of that. They were highly motivated to replicate the arcade experience as closely as possible and constrained by a need to hit the launch date and made choices that resulted in the frame rate issues SR2 has. Had they been using Sega's bare metal SDK, they may have made the same choices favoring arcade fidelity over stable framerate and therefore laying all the blame on WinCE isn't entirely reasonable.


Interesting:

#ifdef COMPAQ_SOUND

// IPaqs are slow to declare a buffer finished with. Need fewer, but longer buffers.

// Longer buffers result in a time lag between the code

// issuing a sample play command and it actually being

// played. This configuration seems to be the best.

// Short or longer buffers cause stutter.

#define SOUND_BUFFER_LENGTH (3072)

#define NUMBER_OF_QUEUED_BUFFERS 2

#else

// All other machines are much better about the sound code

// and have a response time half that of the IPaq.

#define SOUND_BUFFER_LENGTH (1024)

#define NUMBER_OF_QUEUED_BUFFERS 3

#endif



Well first off it needs to be rewritten in Rust, obviously. I just can't enjoy playing a game if I don't know for sure it's memory safe.


The most HN comment ever.


How did we get this far before people went insane?


Well some PC games (Bethesda for one) are known for constantly crashing and being more bug than game. Maybe if their engine actually was memory safe they’d have more time to polish the game?

On the other hand, it doesn’t seem to matter since people will buy Skyrim for their fridge for the 40th time over.

(For me personally, AlephOne for Marathon has some mysterious crashes every few days and it’s pretty annoying.)


> Maybe if their engine actually was memory safe they’d have more time to polish the game?

Maybe if they had programmers who didn't suck*

Fixed for accuracy.


I'd look at the "systems" idea from ECS design. See for example bevy https://bevy-cheatbook.github.io/patterns/generic-systems.ht... which will also satisfy RiiR for the sibling comment ; )

The main idea is to have a callback and iteration over entities you have (that match some condition/interface). This would refactor the code to .add_system(reduce_size).add_system(handle_magnet_carrier).add_system(...)..., where each section is a separate behaviour which can be tested in isolation.


I heard the term "Tour de France coding" for this style, as the indentation resembles a TdF stage elevation profile rotated by 90°.


Stuff like this would be great for a computer science class. Algorithms, performance, software engineering.


No need to, look it's all commented and nice:

  /* if either paple magnet carrier is a knight make them drop the pm*/


>> if(life >= CITY_FOOD)

I mean, why refactor when something is so eminently readable?


It's almost a perfect wave of brackets


Most of the bracket lines are space-indented and most of the if lines are tab-indented - likely GitHub rendering with 8-space instead of 4-space tabs is making it look worse than intended,




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: