Stuff I'm up to.

Pixel City, Test


Next in Projects: Origin Story

If you’re one of the people who has reported 5 minute loading times with Pixel City, would you be so good as to try this download and report the results?

I’m not sure what’s causing these slowdowns, but the program should be running orders of magnitude faster than what you’re seeing and I’m sort of groping around looking for possible causes.

Thanks.

Also, the YouTube demo of the program seems to have taken off. It’s now the #6 top favorited movie this week under “Gaming” on YouTube. It’s also the #6 most watched gaming video in New Zealand. (Far outpacing interest in other countries.) I had no idea I had so many fans down there. Hello, New Zealanders. I love your accents. Your country is beautiful.

Link (YouTube)

Anyway, thanks to everyone for spreading the thing around. I do think that lots of public interest is a great motivator for taking care of a project after the fun parts are over with. We’ve very much entered the dull grounds keeping and janitorial phase of software engineering here, and knowing people are still using the software and following the project gives me a reason to make sure everything is as polished as possible given my miserly time budget and general indolence towards projects that have left the experimentation stage.

Finally, thanks to those who have worked on the project over at GitHub. I’ve brought some of your changes back into my own codebase. If we had a forum over there we’d be golden.

Next in Projects: Origin Story
A Hundred!204124. There are now n+1 comments, where n is a big-ish sort of number.
1 2 3

121 comments:

  1. That version takes 2 seconds to load for me, instead of the 9 seconds it took before, so something must’ve changed. It also doesn’t seem to lag as much. Steady 64fps, but it goes down to 20 if I turn bloom back on, which I don’t want to do anyway.

    Edit : I was getting the window-flicker sometimes with the last version, so it’s not something new. (I have a radeon 3600series graphics card and 2gb ram, don’t ask me more than that :p)

    Works fine on dual monitors too.


  2. 2
    Kim Sullivan

    I didn’t have problems with the original version, but in this version, several new things seem to be broken:

    * Some window textures flicker (it looks like two surfaces with different textures are at almost the same position and depending on rounding, the lower one shows through… difficult to describe, you probably know the effect). Happens mostly in the lowest segment of a building, next to the street (and only on one side of the corner)
    * Displaying the OSD doesn’t seem to work (the text seems to be overdrawn by the city, so I can’t report the FPS).
    * Help doesn’t seem to work?

    I’m on a P4 2.8 using a GeForce 7600 GT.


    • Kim Sullivan: That effect you’re describing is called z-fighting. It’s actually present is all version of the program. (Blocky style buildings have a random chance to exhibit this effect.) It’s fixable, but hasn’t made it up the list yet.


  3. This does the trick for me (or, rather my computer here at work).
    startup is about ten time faster for me now.
    What did you change?

    Thanks for the interesting series,
    Jurjan

    edit: Thanks instead of hanks….


    • Jurjan: Yesterday I mentioned that I was suspicious that windows simply wasn’t calling WM_PAINT fast enough. This one ignores whatever windows tells it about needing to update and runs on its own timer. If I get more reports like yours, it will mean I was right.

      Note that the program will now be capped at ~60fps, so even people with great hardware will no longer be seeing framerates of 150+. That’s just as well.


  4. Loaded this up on my home vista machine, which before was working fine, but now I can’t get the F1 display to appear, so I can’t see the FPS.

    I am surprised that I’m only getting in the 30-50 FPS range during full-effects mode. It jumps to the 60s if I flip on letterbox.

    I have an Intel Core2 @2.12ghz, and an NVidia 8800GTS 640MB graphics card.

    I figure the graphics card should be smoking this puny city, but I guess my old-architecture CPU is where the slowdown happens? Is this thing multithreaded in any way to take advantage of dual cores?

    I’ll check my windows VM on my mac to see if this solved the long-load problem when I get to work.


  5. my work laptop just displayed a black screen with the previous version: with this one it hangs at what appears to be a random spot in the loading process… :( I’m on a core 2 duo laptop, 1gb ram and an integrated Intel 945GM graphics adapter running XP.

    Worked fine with latest version at home, I’ll try this one when I get back home tonight. (main PC is a core 2 duo with 2GB ram and an nvidia 8800GTS – works fine. haven’t tested with the Athlon XP2800+ with ATI card I also have – both run XP)


  6. 6
    Kim Sullivan

    Shamus: you’re right, it looks like I was just unlucky to have several bad cases appear the first time I ran the new version. Or maybe I was just looking harder.


  7. I have a three monitor setup, and it won’t run at all. the thumbnail preview in the screen saver tab used to take a minute or so to load, and now loads nearly instantaneously, but I can’t get the screensaver to actually run.


  8. Latitude D820, 2.2Ghz core duo, 3.2GB ram, NVIDIA NVS 110M (1920×1200 and 1280×1024 two monitors)

    This feels a lot better in terms of framerate even with both monitors enabled. I can’t, however, turn the framerate display on. F1 works, but only up until the loading graph shows – then none of the hot keys work for me.

    Whatever you did seems to be a big change, but there’s still more to go. It started up with bloom off, and I can’t turn it back on, so that might be a big chunk of the frame rate increase.

    This laptop isn’t great, but I don’t think it’s so underpowered for this app. I have a feeling there’s a lot of performance to untap yet.

    Thanks for the sharing the fun.


  9. Well, this version doesn’t work on my laptop, either. The previous one would just show a blank screen for a minute or so before popping back to the desktop. This one shows the loading icon, which fills quickly (<2 sec) to 60-90%, then hangs there. If I move the mouse or hit a key to cancel the screensaver, it takes ~5 sec to go back to the desktop.

    I’m checking this on my graphics-underpowered work laptop (a Compaq 6510b), specced as follows:

    Core 2 Duo T8100 @ 2.1 GHz
    2 GB RAM
    Integrated Intel Mobile 965 graphics (I suspect this may be the problem)


  10. This now runs on Windows XP under VMWare Fusion on my Mac. The frame rate is awful and the F1 menu doesn’t display properly.

    My hardware: A 2007 Macbook 13″
    CPU: 2.16GHz Intel Core2Duo
    Graphics: Intel GMA 950 (64MB shared memory)
    RAM: 2GB


  11. It loads much faster on my crappy Intel card at work, but I’m getting, maybe 1 frame every 2 or 3 seconds. Stoopid crappy Intel card.


  12. Just checked on my windows VM on a mac. It loads much faster now..probably within 15 or 20 seconds.

    Gets about 0 to 1 FPS, still, though. I’m thinking that it’s the virtual environment causing the problem. vCPU access is scheduled in strange ways, so it’s probably not getting the CPU priority it wants.

    Whatever was causing the loading issue seems to be fixed, though. It was about 4 seconds of black screen, followed by the loading clock for another 5 seconds, at which point it hung at about 75%, went to a black screen for a few seconds and then displayed the city finally.

    That took around 15 minutes previously.


  13. yes! this works on my core duo with intel 945gm. the earlier one just showed a black screen. but now it starts loading instantly and very quickly. the framerate is only 15-20 but i guess this crappy 945gm can’t do anything more.


  14. This version is much better for me too. Loads very quickly, and fps over 50 without bloom. I’m at work, so low-end graphics card, but with 2,7 Ghz and 1,75 GB RAM.

    One thing on the cars. I saw many people commenting that the cars look weird from the side, and I agree, but for me, it’s only a problem at junctions. So I thought perhaps it’s possible on junctions to only have cars in one direction? I have no programming experience on these kind of things, so I cannot imagine how feasible that is though. It would also stop the cars from riding through each other on junctions.


  15. This one works in a reasonable amount of time, now. :) Thank you!! I was very much looking forward to running it, and nearly wept like a little girl when I couldn’t.

    While before, it took an hour or more to load the city (I just let it crank while I was doing other things), this one loads in 30 – 40s. I’m still only getting about one frame for 3 seconds with default settings, ~1 FPS with bloom off, but I’m either running it in a Windows XP VirtualBox VM or through wine, so I’m expecting slowdowns.

    I can back up the reports of missing help text… but on watching a little more, it looks like the help text is just black, and so only really appears when it’s backlit by a building.

    It looks like the help text turns white again during loading (like when regenerating the city)… sometimes. I saw it once, but couldn’t duplicate it.

    It also may have been the slow framerate and general unresponsiveness, but it seemed like the hotkeys weren’t working either…

    My Guest “hardware”:
    Windows XP VirtualBox VM
    32 MB Video Memory
    896 MB Base Memory
    VT-x/AMD-V Enabled
    3D Acceleration Enabled

    My Host hardware (which was also running Wine):
    Wine 1.1.15
    Fedora Core 10
    Intel Pentium Dual-Core 3.60 GHz
    2 GB RAM (note that ~1 GB was dedicated to the XP VM)
    256MB ATI Technologies Inc RV380 [Radeon X600 (PCIE)]
    – setup for a dual-head display

    One last request – I love the screensaver, but I would really like just a straight executable version, or a way to lock it to ignore mouse movement, and only exit when I hit Esc. It’s nice to open it on a second monitor and let it run while I’m only working on a single monitor.

    -Sean


  16. The New Zealanders must have noticed your infamous webcomic about their country.


  17. Load time is significantly better, but I couldn’t tell a difference on program performance, I’m at 3-4 fps in letterbox with bloom off. Oddly, the framecounter (or any other menu/display screen) would only show up when the bloom was off.

    Specs: XP Pro, AMD Athlon 3000+, 1 gig memory (two 512 sticks), Nvidia TNT2 64 video card

    As you might guess, the really old video card is the bottleneck. In the preview box on the screen saver options page the program runs ~25 fps.


  18. I don’t see a lot of difference, but loading time wasn’t a problem for me before. However, none of my buildings are textured. I keep meaning to grab the code and take a peek at what’s going on.


  19. I have an XP laptop with crappy onboard video card (Intel 855GM) — with the previous version it took five minutes to get through the load screen, after which it would crash immediately.

    This version loads much more quickly — just a few seconds — and runs without crashing, but at less than 1 fps. There’s something odd about the bloom lighting, too; it’s much more prominent and is sort of spread across the screen instead of near the lights, it looks a bit like the photoshop “radial blur / zoom” filter, if that makes any sense. If I turn off bloom lighting and switch to the plain texture, I can get up to 5 fps.

    (FWIW the previous version ran beautifully on my dual-monitor mac in bootcamp. Haven’t tested this one yet because I don’t want to reboot right now.)

    As a web developer I often get irritated about having to support four or five different browser environments… I’m gaining a new appreciation for how difficult it must be for windows developers, who need to support hundreds of different graphics cards and hardware combos — what a nightmare! (I’m also gaining a new appreciation for how truly junky Intel integrated graphics cards are.)


  20. Well I linked to your video ! I love it !


  21. [This time you asked for feedback]
    I couldn’t get the original one to work at all. This one does something which is an improvement.

    Here is what happened:
    I don’t know if this is significant, but is started loading, and did most of it quite quickly, but then hung on 85.74 for several seconds. It then went to a blank screen for about 10 seconds.

    I have not problem with the overall look of the buldings which do look very cool, but unfortunately it is more like a slideshow than a screensaver. It looks like a succession of stills which jolt from one to another every 5-6 seconds.

    Strangely, in the properties section when choosing the screensaver, the miniscreen on there has a frame rate of about 5 frames per second.

    I have a fairly old computer, and here are the specs:

    Windows XP
    Intel Pentium 4 2.80GHz processor
    1.00 GB Ram
    Intel(R) 82865G graphics controller

    I don’t know what it was, but I tried pressing buttons and couldn’t access the thing to turn off bloom or change things which I heard made things faster.

    The above was found after clicking ‘preview’. I set the time for the screensaver to 1 minute before it came one, and it refused to even show what I had above-just a blank screen. I didn’t sit around and wait to see whether anything would load after that (I am a busy man, I have games to play…).

    You know, I think that these problems are deliberate and that you are building up the suspense for people with low end machines, and have a properly working copy of it just ready to upload.

    I haven’t been this interested about a piece of software for quite a while, so this tactic is obviously working.

    Cheers.

    EDIT: I rebooted and tried again, no change. I did however see one of the company names as “Green Health” which was coloured green.

    I found this amusing.


  22. and the version of PixelCity of this post – loads in couple of seconds for me using ATI Radeon HD 3650 on WinXP SP3 32-bit running at 3.20 GHz and 3.19 Ghz, and 1 GB of RAM.


  23. New Zealand huh? Interesting. Maybe you got linked by a well known New Zealand blogger?


  24. Just ran it on Windows XP Pro in a Virtualbox myself; took about 15-20 seconds to load and ran at a whopping 5 seconds per frame…

    About expected from me, really. Still, pretty cool. I’ll have to learn how to port this to Linux. I’m pretty sure it would be cool to have this as one of the “standard” screensavers packaged in Ubuntu or something… :)


  25. Like several other people reported, this version loads quickly (3-5 seconds) but then runs at 1/3 FPS. Also, I too have not been able to view the F1 menu or framerate.


  26. The performance of this version is somewhat worse for me. The generation time is quicker, but the frame rate is slower. In the standard non-bloom mode I was getting 60 fps, now I’m getting 45 or so. The frame rate display and F1 menu appear only intermittently, so 45 fps is base on those intermittent appearances. I’ve seen it as high as 59, but mostly it’s in the mid 40 range when it appears.

    My home machine here is reasonably high-end, an HP d5000z, AMD Phenom 9750 quad core 2.4 GHz cpu, NVIDIA GeForce 9500, 3 GB RAM, running Vista (not my choice, that’s what it came with).


  27. Definitely loads quicker, but like others I’m having difficulty with the menus displaying with this version.

    They usually appear black, sometimes grey, sometimes flickering between black and grey, and only the “rainbow” lighting effect does the menu show up as white.


  28. This version works fantastic now. The work computer (Server 2003) now loads much faster (compared to my home computer, it seems about right for how bad the hardware is here), and actually runs. Whatever you did, helped the load time on the computers I own that had a problem immensely. There’s nothing you can do about making the framerate better on this old junker, but that’s not your fault. ;)

    Did you fix the memory leak yet? I forgot about it, set my home computer screensaver to it, and returned 3 hours later to an application crash.


  29. 209
    Delta Force Leader

    This version loads faster (approx. 5 secs. in preview and 20 secs. in full-screen), however it only runs at less than 1 FPS.

    Windows XP Home SP3
    Intel Celeron M 1.3GHz
    2GB RAM
    Intel 82852/82855 GM/GME Graphics Controller


  30. I think I found out why sometimes the framerate counter is not showing up, or the menu. Long story short? It is.

    I noticed, that when in no texture mode (on a work computer with no graphics driver that performs slowly) the menu or framerate counter show up in the upper left corner, but it’s BLACK with a black shadow. Since the upper half of the screen most of the time is a black sky, or a dark building, nobody notices they are there.

    Also, is it possible to have the menu/framerate counter show up in the upper left corner when in letterbox mode? Seems to me that since that space is wasted with black, you might as well keep the menu there. (it moves down when letterbox is enabled, and sits in the city display area)

    Anyone know of a good site to upload a picture, no registration required? I still have no web storage of my own, but would like to produce a screenshot of the black on black menu… Or, with Shamus’ approval, I’ll email it to him.


  31. This version does offer the promised improvement on city generation time, down on my work laptop from several minutes to about 5-10 seconds. It hangs around 90%, but I believe that to be when the program goes to start drawing the city. Given the unfortunately abysmal framerate (I would estimate 1-2 new frames every 20 seconds or so) I still can’t run it on my primary work laptop, but I have it set to run on a spare machine now where it merrily chugs away at 20fps, just enough for some procedural eye-candy when I’m not using it for terminal clients.

    XP Pro SP3
    Intel Pentium Dual Core T2390 @ 1.86GHz
    2 GB shared RAM
    Intel 965 Express Mobile (Shared RAM up to 384MB)


  32. 2012
    CaroCogitatus

    Those of you who can’t get F1 to work, try hitting F1, then “e” three times. That brings up the menu for me.

    Perhaps it’s there already, but that mode makes the text white instead of black?


  33. Yeah, that “z-fighting” I noticed in the earlier versions, but it was so rare, it didn’t really affect the experience, but in the new version, it seems like every other building has got a brawl going on.

    And key-strokes seem really hard to get to work.


  34. I’d say the NZ popularity was totally not my fault, but…
    well, it’s a good thing.

    and, to be honest, totally not my fault. *laughs*

    if it’s just the youtube video that’s picking up the traffic, it’s probably just flukeness.

    ok, it’s 5:22am and i haven’t slept yet. my brain’s not working.

    yay NZ!

    oh, and pixel city is shiny. the first download worked fine for me… ‘cept for a bit of blurring if the camera got too close to the buildings as they went past. which may be intentional, but was kinda… blah.

    i seriously can’t remember my own system specs beyond that it’s got a 64 bit processor that nothing knows how to use. the only thing that Ever noticed it was there was Alpha Centauri [since sold] and That was only because it didn’t know what to do with it!

    umm, yeah. yay city! err.. thing.

    I’m just going to leave before my sleep deprived madness slips any further away from reality…


  35. Well, this version works less well on my XPS Gen 2 (Nvidia GeForce Go 6800 Ultra) generally running at about 25-30 FPS instead of 60.

    As others noticed, the menus are colored black, grey, or flickering unless it’s on the rainbow setting.

    I’m also still getting funky skies. This time I took screenshots.

    Funky skies: http://i135.photobucket.com/albums/q131/Zubenel/pixelcity1.jpg

    Obscured FPS menu just visible: http://i135.photobucket.com/albums/q131/Zubenel/pixelcity2.jpg

    Note: You really have to squint to see the FPS menu in the second picture, but it’s there, I swear! I tried to get it at a moment when a light colored patch of sky was visible behind it.


  36. 2016
    radio_babylon

    well, before it never worked (left it running over lunch and still had a black screen when i got back)… this one, i see a progress meter that gets to 91.31% almost immediately, then stalls for about two minutes… then i get about one frame every 60 seconds…

    i have a mac mini running xp sp3… no clue at all about what kind of mac mini or anything, this is just the machine they gave me at the office :)


  37. First, the system specs:

    Dell Inspiron E1705 running Windows XP (Media Center version, I think)
    1.7 GHz Celeron Dual Core
    1 GB RAM
    Mobile Intel(R) 945GM Express Chipset Family (from the Device Manager – I have no idea what that equates to)
    1440×900 screen

    Now the results…

    On version 1, I assume I had one of those 5 minutes build times, but I can’t verify that. Impatience had me bail out long before anything showed up on screen.

    With this version, It loads everything up and builds the city quite rapidly, then things get interesting. The screen updates about once every 15 seconds. I had to watch it for several minutes when a lucky window backlit the black text showing 1 FPS.

    The really odd thing was the light bloom – the displayed bloom didn’t correspond to any existing lights. After watching for a couple of minutes, I noticed that the bloom matched the lights in the *last* displayed image.

    When the city rebuilt, the menu finally showed up in white (hallelujah!) and I could finally figure out what to press. (Oh! ‘G’ to toggle Fog, not ‘B’ for ‘Bloom’…) It took a few times alternately hitting G and E to finally get the Bloom to disappear completely, which helped the framerate some. Also, switching to letterbox mode got the observed about the same as the reported framerate – 1fps or so.

    As mentioned above, it runs like a moderately fast slideshow, but at least I can see the coolness now. :)

    A few of the more interesting signs I’ve seen:
    National Aerospace (Isn’t that a real company somewhere?)
    eData
    Green Petroleum
    Monolithic Financial


  38. Old version worked fine but in this version I can only watch the F1 commands and the frame rate on one of the full scene effects (the one just before the one where all the buildings are transparent).


  39. This version loads ridiculously fast compared to the previous version. I think it loads in less than a second, as compared to 2-3 previously…

    It looks like you can’t access the menu unless you’re in the “standard mode”. As soon as you switch to another special mode, the fps counter disappears and the the menu is inaccessible.


  40. I’m running a windows XP Pro with a gig of RAM…I get 5 FPS…if I’m lucky. Silly work machine! I’ll try it at home and see if it runs better there. Looks great in the video though! Thanks for releasing it!


  41. Definitely an improvement: loads equally fast as a screen saver and as an exe file, BUT the screen saver load screen stalls at 96.something %; maybe it would run eventually but I lack the necessary patience.

    Remaining issues, all mentioned before, in order of relevance to me:
    - Z-fighting aka Blinkenlights effect. This is ugly!
    - Predictable camera paths. Gets boring after a while.
    - Delayed bloom effect. But my machine’s too slow anyway.
    - Black menu texts. Which I don’t usually need.

    If the Z-fighting, the camera paths and the remaining screen saver loading delay were fixed, I could happily live with it. As it is, I start the exe every now and then and despite the great looking images get a little annoyed with the first two issues. I mean, forget about cars and streetlights and stuff; they could use some work, granted, but I don’t really care. But Z-fighting and the ever-repeating camera paths are really beginning to annoy.

    That said, I still think this is an outstanding project. I wouldn’t keep bitching about what’s missing if I didn’t really want this to be my sceen saver! Thanks again Shamus!


  42. Alright! this time it’s waaay faster than before! =D
    I get 1 frame every 13 seconds, and the loading takes 30 seconds, more or less (it always get’s stuck around 75%).
    For reference: I have a core2quad 2.33GHz, 2GB of RAM and an integrated graphics card (Intel g45/g43 chipset) which is more than probably my bottleneck here.

    Oh, and the bloom effect appears to be delayed. In fact, it runs so slow that there’s no correlation between what I see of the city itself and what the bloom is lighting.


  43. Update: I finally waited long enough for the screen saver to run. 10 seconds of blank screen, 5 seconds of loading “clock”, 20 seconds of same stalled at ca 99%, 30 seconds of blank screen. This gets better on subsequent iterations.

    But the animation only runs at ca 1 fps, as opposed to the ca 10 fps I’m getting when I run it as an exe from the command line. That’s way WAY better than with the old version, but it’s still, well, bad.

    I noticed something else though: when running as an exe, and the camera moves really slowly like it does at times, there’s hardly any visible Z-fighting (blinkenlights), and it even looks rather smooth. So if I could configure away those fast camera runs … please?

    Samsung NC10 netbook (Intel Atom @ 1.6 GHz, 1 GB RAM) running XP Home, JFTR.

    Thank you.


  44. The “black text” bug is fixed for me in that version.


  45. Shamus: 1.0.011 fixes the black menu text bug for me. Thanks.


  46. Before testing 1.0.010, I ran 1.0.005 again. I didn’t get an insane 80 minute loading this time, not sure what happened then. Running 1.0.005 I had about a 7-8 minute loading time for a city.

    Running 1.0.010 took about 5 seconds to load, though I still had only about 1 fps.

    1.0.011 fixed black text for me.


  47. With some music+design/concept it could make a really nice demo (“demo” like in demoscene http://demoscene.info).

    After a landscape ( http://www.pouet.net/prod.php?which=52938 ), a city in 4k ? :p


  48. We don’t have accents, it’s you dirty foreigners that do.


  49. Love it! Less than one second load time on Windows7 RC1 64-bit. nVidia gtx 280, 3.16Ghz CoreDuo, 6GB RAM, 1920×1200


  50. I think the underlying issue is that us New Zealander’s aren’t actually interested in most of the crap on YouTube, so when something that’s actually good shows up it gets disproportionately high hits from here.


1 2 3

3 Trackbacks

  1. By Cityscape – Hello, internet! « Not a blog on November 24, 2009 at 3:52 pm

    [...] Shamus Young, the lovely man whose PixelCity project this entire developer diary is inspired by a tribute to a total rip-off of, has linked to [...]

  2. By Cityscape « Not a blog on November 24, 2009 at 4:12 pm

    [...] I read this series of articles on building a simple, programmatically generated city. The techniques being used are [...]

  3. [...] and teaching a lot of lessons, before giving away the program for free for people to download as a screensaver. He even gives the source [...]

Leave a Reply

Comments are moderated and may not be posted immediately. Required fields are marked *

*
*

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> . Enclose spoilers in <s> or <strike> tags.