Stuff I'm up to.

Procedural City, Part 13: “Release” of Program and Source


Screensaver

Link (YouTube)

I hesitate to call this a “release”. The program has been tested on exactly one computer, which can’t even be called a “test” with a straight face. Not only is this not a release version, it’s not even beta-worthy. Even internal alphas have undergone more scrutiny than this program. It is only my boundless hubris that allows me to call this “version 1.0″.

But I don’t have any machines suitable for testing right now, and I don’t have time to run some sort of open beta. Besides, any such effort would quickly fill up with people who were just there for the software and not really into the whole “test unreliable software and then report in detail all the ways in which it failed to work”.

So I’ll preface this release with a stronger version of the usual disclaimers: No warranty is implied, it might not work, use at your own risk.

Sorry to the Mac users. I do not omit you out of malice, but I’ve never developed for Macs before and have no means of doing so.

Download PixelCity v1.0

Take the PixelCity.scr file out of that archive and put it into your /Windows directory and you should be ready to go. There is no configuration dialog, so when you hit the “settings” button in ScreenSaver configuration, nothing will happen. Just hit F1 while the program is running to get a list of things you can do. Be sure to press ‘E’, as it will show off some full-screen effects I haven’t mentioned or showcased before. (I wanted to have some surprises! Although perhaps seeing the message “This program as performed an illegal operation and needs to close” will sate your desire for surprise.)

Please do consider spreading the word on this project on your blogs or wherever you tell people about cool stuff. Reluctant DM was nice enough to put it up on Digg, but Digg has yet to respond to anything I’ve done. Projects, comics, articles. I’ve gotten links from some internet hotspots, but I’ve never earned more than an indifferent shrug from Digg. It’s a very FARK-esque audience and I doubt I’ll get any digs until I write my magnum opus: Procedural Man Getting Hit in Balls with Baseball. (It works on so many levels!)

Source

I’ve put the project on Google Code, although I’m not sure if I will continue with the project or not. I’d love to keep working on it, but further changes will most likely make for dry reading, and that means the project would no longer be feeding this website. We’ll see.

I’m using MS Dev Studio 6, which turns eleven years old this year. Sorry to those of you using development environments forged sometime during this millennium. This is something I cannot change. Although to be fair, migrating from my platform to your is likely much easier than going the other way.

Development

In Win.h there is a #define that lets you disable screensaver mode, which is crucial for development. Setting SCREENSAVER to 0 will change the behavior of different parts of the program and give you access to the primitive and unintuitive development camera.

If you want to test it in screensaver mode, set SCREENSAVER to 1 and invoke the program with the /s command-line option.

Porting

The program is very much tied to Windows at this point. I tried to quarantine all of the Windows-specific code into its own ghetto module (Win.cpp) but that didn’t really work. The stuff for generating a render contex and loading fonts in Render.cpp is also windows-specific, and of course you must #include windows.h everywhere you use Gl.h, which is just about everywhere. And finally, checking the millisecond timer means calling the Windows-specific GetTickCount (). So those items will probably form your to-to list if you’re looking to port.

Optimizations

There is a lot of work that could be done to speed this thing up. Many promising ideas were suggested in the comments during the three optimization posts.

Switching to vertex buffers would likely give a huge boost. (See the comments at the top of Mesh.cpp.) A lot of improvements could be made to the visibility table and how cell visibility is determined. And I suspect there’s a better way to fill the bloom buffer than the one I’m using now.

I didn’t pursue these because there’s just no point in trying to optimize any further on this machine. To be done right, the changes need to be done on an older machine. Profiling can help, but only in cases where old and new hardware encounter the same bottlenecks. The thing runs at 200fps+ on my machine, and it’s entirely possible that I could ratchet that up to 300fps in such a way that provides almost no benefit to the poor guy running the thing on an old laptop. Furthermore, at this speed it’s pretty hard to detect improvements amid the noise, so it’s hard to get a feel for how effective changes are. (Again, profiling doesn’t tell you about those every-ten-frame lurches that are imperceptible at 200fps and nauseating at 20fps. There is simply no substitute for testing on the right hardware, which is why the loss of my old computer was such a terrible blow. I’m currently watching family members to see if any of them are going to upgrade soon. Ideally, I hope to inherit a ~2004 machine.)

Still, I’d start with vertex buffers.

Derivative Work & Collaborations

I am gratified to see that so many people want the source and are eager to do new and cool things with it. I’m not sure how we should go about this. Google Code isn’t up to tracking a dozen forks of the project, and I don’t have time to administrate that sort of activity anyway. Ideally we want someplace where people can swap code, knowledge, and screenshots. Some people will no doubt struggle getting it to compile on their different (from mine) development environment, and a little help from others can go a long way towards saving everyone time & headaches.

This is ideally the job of a forum, but I’m not in a position to provide one of those right now. It would be perfect if such a thing was available along with Google Code, alas.

I’m open to suggestions.

UPDATE: The codebase is now available on GitHub, which has the source file / social functionality we’re looking for:

http://github.com/skeeto/pixelcity/tree/master

Future Work

While I have many features I’d like to add, I don’t have any immediate plans to do so. Right now I’m going to wait and see if there are any egregious problems with the screensaver.

But if pressed, I suppose I’d like to add the following someday:

  1. Port the thing to wxWidgets, which might give me the cross-platform access I’ve always wanted. (Win, Linux, Mac.)
  2. Implement vertex buffers.
  3. Fiddle around with the city-generation parameters. I don’t think I’m getting as much variety out of the existing code as I could. More mid-size (25 story) buildings with a large footprint might do a lot to break up the “bar graph” effect I have going now.
  4. And of course, the street-level detail is a timehole which is happy to consume any effort I’m willing to put into it.

Thanks for reading. It’s been fun.

A Hundred!20202018There are now 178 comments. My website weeps for mercy.
1 2 3 4

170 comments:

  1. It runs at around 30 FPS, sometimes up to 60 depending on the effects I’ve got turned on. Only problem is… I don’t get any textures. All buildings are completley black.

    http://img239.imageshack.us/img239/5555/pixelc.jpg


  2. Looks awesome! Good Job, Shamus!

    I am getting between 15 and 30 fps, and if i fiddle with the different settings I can make it drop down to 5-7, and around 10 is where it actually gets annoying to watch. at some points, it jumped to 70fps, but i don’t know why.

    stats: 1.9 GHz on an AMD Athlon 64 X2 dual core TK-57
    2.0 GB of memory, ATI Radeon X1200 graphics card. 1280×800 resolution.

    I am no code-junky, so I will let it sit the way it is until someone gives me a step-by-step instructions for how to change it.

    (edit: I have also gotten very good praise from a code-junky or two [who appreciate the coding involved] AND from the computer illiterate [who only care about the shiny result])


  3. Where do we find the 3-d glasses for that one setting?


  4. So, it’s pretty nice.

    But there’s some issues.

    1) The way the camera moves causes the image to look jerky, so the business names and such are very hard to read unless they’re really big and you’re going really slow. This might have something to do with the framerate I’m getting. I only have about 15 FPS consistently.

    2) Bloom is just plain horrible for my machine. Firstly, I seem to be displaying the bloom from the frame that came before the current frame, making an annoying ghosting effect, and the bloom takes my framerate from survivable-but-somewhat-disappointing (about 15) to just bad (5).

    3) The billboard thingies will always appear in front of those really thin towers you’ve made, which is odd.

    4) The cars on the road seem awfully scattered. When they first generate, it looks almost like these roads don’t have lanes at all. And the cars’ lights going sideways when they’re sideways to you looks weird. I thought about this, and I wondered if maybe having the car lights rotate to to be the average of the camera angle compared to the car’s orientation and the car’s angle. So a car going directly across the screen will have lights that are rotated to be pointing only 45-degrees away from the camera, instead of a full 90.

    Using… 1.24 GHz AMD Athlon, 512 MB memory, nVidia 5200 FX video card. 1440×900 monitor.

    Also: “… probably form your to-to list.”


  5. Works great on dual monitors at 1680×1050 each running off a GeForce 8800 GT, Quad Core 2.66GHz, 3.25GB RAM… 60-61 FPS.

    Thanks again for releasing this for us to enjoy.


  6. Don’t fret about not doing good on digg, you are on the front page of reddit.com with 658 upvotes (and climbing!).


  7. I just saw a LLC company :D glad you put that in.

    Though, I just checked the source and didn’t find it in the list for names. Is there a mismatch between the source and the release?


  8. Ok, I’m not your target demographic. I’m running a newer machine than anyone here is reporting, and I’m getting a very high framerate: 180-190 fps. (Vista 64, Quad Core, 6 GB ram, ATI 4850 video card). It runs really well on higher end machines. Obviously it’s great! Thanks for releasing this.

    My old machine running XP SP3 with Athalon 3200 and 2 GB ram with a NVidia 7600 GT gets about 20 fps, across 2 monitors.


  9. Looks like I’m the only person who has attempted to compile this with the free VS2008 Express Edition and lived to tell the tale; here’s what I had to do to get it to kind-of work, on what I think is my bog-standard VC++2008 Express installation (no SDKs or extra libraries are installed, as far as I can remember):

    0. Get the source, by hook or by crook. I neither have nor want svn installed on this computer, so grabbing the zip from the GitHub mirror someone provided above was easiest for me.

    1. Import the VC6 project (double-click it, and tell VS2008 you really do want to convert it).

    2. Set SCREENSAVER to 0. Some library complains if it’s set to 1; I haven’t figured out how to fix that yet. The actual error is

    1>scrnsave.lib(scrnsave.obj) : error LNK2019: unresolved external symbol __imp__InitCommonControlsEx@4 referenced in function _WinMainN@16

    I can’t figure out where that one’s coming from, but it doesn’t appear with SCREENSAVER set to 0. Also, Shamus, your “development camera” is truly awful.

    3. Nuke all references to glaux.{h, lib}. There are a bunch in header files and one pragma in Win.cpp. Google tells me this file is obsolete; given that I can remember using it during my own last foray into OpenGL years ago, that’s probably true. The project seems to compile fine without it.

    4. Math.cpp, line 110, fmod call should have an “f” tacked on, to read
    result = (float)fmod (a1 - a2, 360.0f);
    and not confuse the poor compiler.

    Those changes get it to build just fine for me in VC++2008 Express.


  10. Long time reader, first time poster.

    Excellent work, Shamus. I got it running on my 1st gen MacBook via my Parallels Desktop (v4.0) Windows XP. Runs at ~30 FPS in 800×600. Drops down to ~11 FPS when bloom is enabled. Runs normally at 20-25 FPS in 1280×800. (Haven’t tried enabling bloom in this resolution as I fear it will have a massive drop in performance.)


  11. This is about Twenty Thousand kinds of awesome. Runs pretty well on WinXP on my laptop (Core2 T7200 @2.0GHz, ATI Mobility Radeon X1400). I get on average about 70 fps with bloom turned off (at least I think that’s what setting it is).

    Is there any way to get the source code as a single archive file? I’ve never used any of the tools mentioned for online code sharing.


  12. I was quite surprised to receive a lower framerate in this than I got in Crysis. Oh Shamus, the irony!

    Core Duo 2 2.66ghz
    4GB RAM (or rather 3.25 thanks to XP)
    Win XP Pro SP3
    Nvidia GeForce 8600GT
    Running at 1920 x 1200

    The camera also stuttered every second or so, regardless of which settings I was using.

    Bloom is very weird — it seems to lag behind the scene when the camera’s moving, causing all the glows to appear separate from their lights.

    But…very pretty!


  13. With bloom I got 45-50 fps
    with bloom and letterbox mode I got 70-75

    Athlon X2 5600+ (dual 2.8)
    2GB DDR2
    XP Pro x64
    GeForce 8600 GTS
    1280×1024

    This is the best screensaver ever :D


  14. wxWidgets? nuuuuu

    Use Qt. Qt is awesome. It has everything but the kitchen sink, and makes multiplatform stuff a breeze.


    • Qt subclasses OpenGL. I HATE porting to interfaces like that. Every #@%ing time I want to make an OpenGL call I have to get a pointer to the (whatever) context, and then use that:

      glEnable (GL_BLEND);

      becomes:

      thing=GimmieThatThing ();
      if (thing) {
      thing->glEnable (GL_BLEND);
      }

      Yuck.

      It would add a tremendous amount of work to the porting process, as it would require extensive and all-encompassing changes to every single module. It would also contribute to some unwanted line number bloat.

      Having said that, feel free. If Qt does what you need it to, then I’m sure someone else will appreciate the port as well. I’m not a member of the “There can be only one” school of thought. :)


  15. I’ve given it a whirl- VERY cool stuff. My only complaint is that the sky is very odd/nonfunctional- there are no stars, and the fog looks pretty bad. Could be just drivers, I suppose.


  16. Okay, people may yell at me to go away, but I just tried this on my pathetic little Samsung NC10 netbook, which is my fastest computer by far. After seven minutes of blank screen and 45 minutes of loading screen, I did actually get to see Pixel City. At about 4 fpm (yes, minute!).

    But preeetty!

    Bloom does look weird for me too; couldn’t turn it off because I got no reaction to either F1 or E keys, and soon inadvertently touched the touchpad causing the thing to go off.

    But I could live with the few fpm I’m getting, if it weren’t for the thick end of an hour of loading (or rather, generating) time. So, Shamus or anyone: any way to save all that stuff it’s generating in that time to disk, and loading it again on startup? That’s got to be faster, seeing as my whole WinXP session can be loaded from disk in a couple of seconds.

    Also, I’d like it for there to be a config file where I can turn off bloom and other eye candy permanently and without the need to press keys at runtime, since that doesn’t seem to be working. Or maybe a real screen saver options dialog?

    I know that I’m not the target audience with this pathetic hardware I’ve got, but still, I real<y like this thing and think it looks quite awesome. I don’t know how much work it’d be to make this usable to me, but I’d really appreciate it if someone went to the trouble of doing so, and I think that even those with less pathetic hardware might appreciate the effort.

    Thank you.

    But nevertheless: Shamus, this thing is drop dead beautiful, and if nothing else it has been an intriguing thing to read about. Thanks for sharing!


  17. With effects (doesn’t matter which): 31 fps
    Without: 61 fps
    Resolution was 1200×800. I don’t get higher on this laptop.

    I also get a very slight stutter every few milliseconds. Possibly a bottleneck that just won’t show on your hyper-fast machine?

    Machine is an Intel P8600 DualCore (I think), equipped with an Nvidia Geforce 9650M GT with 4 GB RAM in total. Vista 32x. Which is not too bad of a setup, I think.


  18. Shamus: I am following along with git-svn at the moment. This sort of thing could be done with a cron job.

    [... pause ...]

    Ok, I just set up a cron job. The GitHub version I put up should sync up every half hour, on the half hour. It seems to be working fine right now.


  19. On my laptop (XP, Celeron 1.6 Ghz, 1G RAM Radeon9000) I get between 9 and 12 fps before it just dies. It dies at completely random points too. Sometimes in the loading part, sometimes in the city flyby. Sometimes before it even reaches the loading part. But it ALWAYS dies. I’ve not gotten more than 2 minutes out of it.

    It looks gorgeous! But the crashing is inexplicable… I don’t know what the issue is there. The laptop works on games like Quake, and WoW, and guildwars….

    On my desktop (XP, AMD 2.6 Ghz dual core, 2G RAM, Radeon X1650) it took about 30 minutes to load. Once running it hit 1 fps. It would show one image of the city, then about 3 seconds later show a completely different static image of the city. (this is with the bloom disabled)

    Still great stuff though.


    • To anyone else investigating the “stuttering” issue:

      It’s not really stuttering. The FPS remains unchanged. You can see this by setting it to only use the “orbit” camera modes. The camera spins round and round with no lurching.

      No, the real problem is in the flycam_position () code. There is some defect in the way the camera position is being calculated which is only visible at lower FPS.

      EDIT: No. I was wrong. I have no idea what’s causing this. If you want to test it yourself, set the effects mode to EFFECT_DEBUG_OVERBLOOM. That will give you all the slowdown you could wish for. :)


  20. Update to my own post at #73.

    Something very weird is going on here. I renamed the .scr file to .exe and invoked it from command line with “pixelcity /S”, and lo and behold, it loads in a couple of seconds and runs at 6..11 fps. Several orders of magnitude faster, in other words, and perfectly acceptable …

    … if it weren’t for two little glitches: 1) buildings in the middle distance have issues with the textures, making it look like different windows are lit from frame to frame, especially when panning; and 2) after an arbitrary time, but at the latest after fading out and rebuilding, the program quits on me.

    Also, the cam seems to repeat the same pattern of travel each time.

    But I’m still quite happy now. Shamus: again, awesome work.


  21. 20202013
    Brian Ballsun-Stanton

    Some fun little magic. To run this screensaver as a desktop background in windows:

    Go to a command prompt and type:
    PixelCity.scr /p65552

    I don’t know why that magic string does what it does, but it seems to work on any arbitrary screensaver. But only that number.

    Oh, and killing it is a pain. You have to either alt-tab to the window (using the mouse is no good) and hit alt-f4. *or* kill it through the task manager.

    Fun!

    In other news, this is a fantastically computationally expensive black screen on my Lenovo X61. (Uber CPU/ram. itty bitty graphics card.)


  22. Sounds like whatever’s going on involves scrnsave.lib, which does the parsing of command-line flags, and which my research has indicated is broken in VS2008; I wouldn’t be surprised if it’s odd in other VC++ versions. I posted a question to Stack Overflow about it, which I’ve heard is good at solving these sorts of problems. We’ll see what they come up with.


  23. Finally got a pic to prove my point.

    Observe LLC on a sign in the release:

    http://img8.imageshack.us/img8/3492/94615386.png

    However, LLC is not contained in the code.

    http://github.com/skeeto/pixelcity/blob/0997f49311b29138ad278dd567ec36b6c0b3d2c8/foo.h


    • Sigh. I explicitly told svn to DELETE foo.h. But no matter what I do, I can’t get rid of it.

      Foo.h was a temp file – I copy & pasted the real code into that file for the purposes of writing post #12. The REAL code is at the top of Texture.cpp.

      Foo.h is a useless temp file, now forever married to the codebase by inscrutable rules.


  24. [...] And now the source code has been released! And as expected, my PC can’t handle it =( [...]


  25. Reddit led me here. Very interesting stuff! I’m on linux with a 3ghz intel wolfdale and nvidia 8800gt. This runs great and looks sweet for such a tiny download (and a relatively quick slap together, from what I read)!

    I can run your .scr file with wine using the “wine PixelCity.scr /S” (thanks the some guy above for this!).

    However, I want to view FPS info to see what I’m getting, and everytime I move mouse, or press a key (I think F1 displays this info?), the screensaver goes off.

    Anyone in a similar situation?


  26. Thank you very much for releasing this code. I think I’m going to try to port it to SDL. (I currently work on quite a few SDL/OpenGL projects, including a quite popular free/open-source game, so I have a fair idea as to what I’m doing.)

    I have long been a fan of this blog, but I have never felt strongly enough to comment on one of its posts before.

    I was led here by Reddit, but I would have found this anyway as this blog is one of the sites that I regularly read.


  27. Just informing you that it works perfectly on my Windows Vista Business x86_64 machine.


  28. Brian Ballsun-Stanton: That’s the window handle for your desktop. From what I remember, screensavers are drawn to elements via their handle, that’s how they can do the preview thing.


  29. My specs:
    3.0 ghz core 2 duo
    8800 GTS
    4gb RAM
    Windows Vista

    Runs great, around 100 fps (200 with bloom off)
    The fog effect is a little muddy, and I can’t see the sky shown in earlier screenshots. Was there a change there I missed? I like the camera effects but the street level view is rather low res and looks a bit ugly (which is probably not news to you).

    Still all in all I am quite impressed, very neat little program.


  30. Awesome!

    I get about 70FPS in the default mode. This is on a fairly recent (as in less than a year old) Core(TM)2 Quad CPU but I’m running Vista so who knows. It goes down to 7FPS in some modes. Also what might be contributing is the fact that my screen resolution is 1680×1050. I dunno.

    If I have time I’ll see if I can’t port this to Java with jME. I’ve been looking at that recently but I have no real experience with it or with 3d programming so I’m not making any promises.


  31. hey, i put into windows folder and preview in the desktop properties works fine in the menu window but any fullscreen effort dumps back to desktop at about 70% loading any ideas…

    running athlon AMD TL-52 dual core 1.6Ghz
    1GB ram
    at 1280×800 resolution…


  32. I now have a new screensaver!

    30 FPS on my dual screen 2x1152x864 system. I love it! :D


  33. Working great on my machine!
    ~80 FPS with bloom on,~110 with bloom off. Managed to get it up to 150 by turning everything off.
    Occasionally the FPS dropped to around 60, no matter what settings I had it on.
    1600×1200 resolution.
    Camera movement seems a bit jerky, but very nice over all.


  34. Very nice. I’m glad it works for multiple monitors; many screen savers don’t.


  35. Wait, wait, WHAT?

    > , and of course you must #include windows.h everywhere you use Gl.h, which is just about everywhere.

    WTF?

    What kind of totally BROKEN header *is* this, that it *requires* a Windows-specific header?

    To anyone trying this with a newer environment: is this actually still true? Was it just a horrific breakage around the time of VC6, or is it still broken?

    (<GL/gl.h> should not require a platform-specific include. That’s what <GL/glx.h> is for on Linux (glXCreateContext and friends), and <wingdi.h> is for on Windows (wglMakeContext and friends). If the main gl.h header requires a platform-specific include, then it’s doing the wrong stuff.)

    Anyway, hopefully I can do some porting this weekend…


    • Bryan: My reaction exactly.

      Microsoft issues this OpenGL with their dev environment. Worse, they haven’t updated it in years, so the headers are stuck with OGL 1.1 functionality. Some Google searching can take you to the heart of the problem, which probably rhymes with “Girect X”. For a long time, nobody else was inclined to make a set of LIBs / headers for Windows since “Microsoft already did it.” (Poorly.)

      For example, line 1152 for the Gl.h file:

      WINGDIAPI void APIENTRY glAccum (GLenum op, GLfloat value);

      Both WINGDIAPI and APIENTRY are #defined via Windows.h.

      So, yeah. Bleh.


  36. Runs well on my good comp. However, does not display either the framecount or the sky(toggling fog does not help). And, as said above, bloom fails. Far too large blur, coupled with massive slowdown. Running:
    AMD Athlon 64 X2 dual-core processor 3800+
    1 gig ram
    NVidia GEforce 6100
    And unfortunately Vista. :(

    Edit: On my parent’s 2004 first-wave XP(no clue about more than that) 1 FPS, but at least I was able to see the framecounter. ;) Still looked really good, but no speed. Of course, the 75% mem used already might have something to do with that.


  37. This project has been immense fun to follow. I even busted out my Windows machine (ThinkPad T60p 3GB RAM, ATI Mobility FireGL V5200 512MB RAM, 2.16 GHz T6200 dual core proc) to test this out. Works great in all modes, but I only get like 7-12 FPS in the default bloom modes. In order, the modes get ~12 FPS, 26, 54, 40, 100 or so.

    Thank you for documenting this fun project in full public view – that can’t be easy! Releasing the code to the community is also really great. I’ve blogged about this blog on my blog at fugutabetai.com (I heard you like blogs in your blog so I put a … oh forget it.)


  38. Wait, WTF again?

    glAccum just takes a couple of…

    Oh. I see. I still don’t *like* it, but I see.

    They’re using Windows-specific calling convention specifiers — WINGDIAPI / APIENTRY are used to specify “this function comes from a DLL, so please make the linker do the right thing” (snide comment: decent shared-library formats are able handle this properly already, so the tag for the linker isn’t needed), “this function should use the Pascal calling convention” IIRC (snide comment: it’s much simpler when your OS only *has* one calling convention, which matches C’s), etc.

    That being said, the *RIGHT* way to do this is for GL/gl.h itself to include for you (which will do nothing if the header’s already there), instead of forcing the programmer to do it. That way they can still use their own special defines for all this calling convention stuff that shouldn’t even be required, and it won’t break code that’s trying to be portable.

    Grr.

    *Anyway*, between this, the case-insensitivity of Windows, and the vs. / directory separator, the first bunch of porting changes are all fairly well confined to surface details; I’m most of the way to getting Building.cpp into an object, at least. (Now, whether that links into the executable or not is a different issue…) :-)

    Though I am getting lots of “class X has virtual functions but non-virtual destructor” warnings; generally that’s prone to failure later, if you try to delete a pointer to the base type (it’ll call the wrong destructor). g++ warns if you do this, even if you don’t ever delete a pointer to the base type. (Later edit: Oh, I see. There is no destructor. Declaring an empty inline one that’s virtual in CEntity fixes it.)

    I’m also getting this:

    Building.cpp: In member function ‘void CBuilding::CreateModern()’:
    Building.cpp:746: error: name lookup of ‘i’ changed for new ISO ‘for’ scoping
    Building.cpp:741: error: using obsolete binding at ‘i’

    ISO C++ scoping rules prevent re-use of the “i” from the previous loop. To get this to work, I’ll need to either re-declare it (add another “int”), or, if your compiler barfs on that, move the “int i” out to function scope.

    I ought to figure out where on the github site this purported forum functionality is. Maybe I have to sign up?


  39. Tried to add this to the previous post, but it just timed out:

    Re: the non-virtual destructor, it looks like there is no destructor for CEntity (or many of the derived classes), so it’s enough to just add an empty inline virtual destructor in Entity.h: a fairly simple change. :-)

    (I really need to just fork the repository and start submitting these changes to the fork…)


  40. Hi Shamus,

    This is very awesome, just saw the YouTube video. You ask if this stuff is any use. I know that at my university in Switzerland a start-up was recently founded in the procedural city generation scene, they are pretty successful.

    See here: http://www.procedural.com/

    Best of luck to you. Keep up the great work.
    Jack

    PS: Repeating this comment, not sure if you’ll see it where I had posted it first.


  41. Fantastic stuff! Dripping with awesome, thanks for sharing. Runs at about 14 fps on my office-approved laptop, 60 without bloom. And I do like the extras :)

    Oh, btw, I did get the company: “ePetroleum”, huzzah!


  42. Suggestion: Clock-towers. Some cities would have a big biilboard with a digital clock display, others would have a giant stereotypical clock tower. And the clocks should synchronize with the computer clock.

    That would just be awesome, and it would allow people to watch the pretties and still be able to tell the time.


  43. I ran it up on mine and after watching teh ever growing cheese I was treated to a veiw of the city in the middle of the night during a power cut.

    I’m guessing it’s the three monitor dual graphics cards breaking it.


  44. Hey, I can verify that this works under Wine 1.0.1 under Ubuntu 9.04. 7 FPS at 1680×1080, but that goes up to 70 FPS without bloom lighting. I also see the fog texture overlap weirdness, and the bloom lighting lag issue (where the extra light comes from is updated less frequently than the camera position).

    Otherwise, looks amazing!


  45. Another data point on your beta test:

    60 fps @ 1680 x 1050 on:

    3.16 GHz Dual core
    3.25 GB RAM (due to 32 bit OS with 2 x 2 GB sticks)
    GTX 260 GPU

    I seem to be getting less FPS than some others have noted (not subjectively noted, just with the fps counter enabled). Could be either due to win XP or I’m using a higher resolution than they?

    Shrug.

    Great job.


  46. Ooh ooh, just saw the comment about clock towers. Seconded :)


  47. Hi Shamus,

    I’m halfway through porting this to Mac OS X (just some font and effect weirdness left to fix), and it looks like others are doing similar ports.

    Do you have a plan for gathering these ports/changes? At the very least, it requires separating all the OS/window-system specific stuff out from the actual working code.

    I’ve tried to change the original files as little as possible, but I can’t check what’s changed since I (foolishly) decided to try git – which doesn’t (by default) handle the differences between windows and unix newlines. So as far as git is concerned, I’ve frobbed every line in the project.

    Anyhoo, it’s not worth my time to fix that unless there’s interest in gathering updated sources together eventually. Let us know.


  48. Works on Windows 7. The sky box seems to be missing though.


1 2 3 4

8 Trackbacks

  1. [...] read Shamus’ development diary in its entirety here, or download the Windows screensaver file here. Oh, and thanks to the dudes at @DenkiGames for pointing out Pixel City in the first place! Digg it [...]

  2. [...] [...]

  3. By Procedural City « Indigo Static on May 5, 2009 at 8:50 pm

    [...] And now the source code has been released! And as expected, my PC can’t handle it =( [...]

  4. [...] 14: Feedback and AssessmentPosted by Shamus on May 7th, 2009   Previous in Projects: Procedural City, Part 13: “Release” of Program and SourceShort [...]

  5. [...] Maggiori info sul progetto le trovate sul blog dell’autore. [...]

  6. [...] Maggiori info sul progetto le trovate sul blog dell’autore. [...]

  7. [...] Maggiori info sul progetto le trovate sul blog dell’autore. [...]

  8. [...] found this not too long [...]

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.