Pixel City - Procedurally generated city
Vložit
- čas přidán 5. 09. 2024
- This is a demonstration of a program I wrote to generate and fly through a dynamically generated city. You can read the step-by-step of how it was made at my website:
www.shamusyoung...
* The program was built on vanilla OpenGL, Windows, using MS DevStudio 6.0
* Building the city takes about 5 seconds.
* Took about 50 hours of coding time.
* Runs on older hardware. The goal was to have the program work on Windows machines less than 5 years old.
* To be released as a Windows screensaver.
The music is "Around" by Oursvince, used under the Creative Commons:
www.vincentbern...
This man really was great at videogames in much more ways than one.
Rest in Peace, Shamus. Thank you so much for everything you've done
I found out about Shamus's passing yesterday. It's taken the better part of a day for me to process it.
This was my favourite one of Shamus's projects, and I can't count how many times I fell asleep to this pretty little city wooshing around on the monitor nearby. In the middle of some really rough patches in life, it was comforting. I really should've told him thank-you or something.
Thank you, Shamus. At the going down of the sun, in the morning, in light and in word, we will remember you.
God Bless you.
Oh wow. I used to watch a lot of his videos and websites on how he would program well over a decade ago. Didn't know he died! That's really sad. Thanks for letting us know. 😥
Wow that's sad
For those people looking for the program! - code.google.com/archive/p/pixelcity/downloads
Give this comment a thumbs up so more people can find it, please.
It's June 25, 2016 and I still love this.
It's January 17th, 2020 and i still love this.
@@minkshaming same
@@SquidsTv indeed! 😃
It's 2024 and I'm still visiting
@@EBTS-3 Holy cow, eight years later!
I'm just picturing this kind of thing being used in an open world Rampage-style game, where you control a giant monster causing havoc in city after city to your hearts content.
I have been programming for nearly 30 years. This is still one of the most amazing things I've ever seen.
"Kinda pretty"?? Very pretty! Just take a panoramic shot of it and you got yourself very nice Deus Ex skybox!
Or just port the whole thing into Deus Ex and use it as a skybox
Oct. 2020 and still very pretty :)
In my humble opinion this "city generation" in many ways still beats much that I have seen even now. Especially considering how "automatised" the generation appears and how "lean" the results appears to be. And if it's possible to "generalise" the "algorithms" I could well see this still worth while either as a plugin or a small standalone "city generator" for 3D modeling (and texturing)
But realising that this is a more than 10 years old project, I'm well aware that the likelihood of happening is somewhere between zero and none :)
Still if You didn't find any other "use" of it, I can report that "at least" it works very well as an "inspirational piece" to show what You can do if You can program.... (as well as You that is).
And I actually came here after testing a "WebGL implementation" that credited this "piece" as it's inspiration.. So Yea.. :)
Best regards.
If you could incorporate this into the Unity engine somehow, you'd likely make a killing. It takes tons of time to make cities by hand, and this procedural method would be a good seller. Believe it.
Seriously consider making this for Unity. It would be incredibly useful for tons of game efforts.
Mhm.
yeah here I am watching this video to find a way to make it in Unity for my game. Wait for me bro
Traffic was moving. Immersion = ruined
for something this old I'm very impressed even today
This is the simplest, yet one of the coolest virtual cities I have ever seen. Now that is an achievement...
Best application I can think of this is for animation. City enviroments can be generally tedious to deal with.
my name jef
@@Rossilaz58 Uh... no, It's Ross.
true
A superb effort - congratulations. Have you considered variety in the rooftops for helicopter pads, pools, ariels and gardens? Parks, malls and public transport might add to variety in the main streets..and finally historic and outliers would make the cityscape feel more matured and organic. But a fine return on 50 hours, very well done.
Really good work. One problem: I don't think simple lights work that well for street lights and cars. Perhaps add simple models to go with them.
having this as a screensaver made me want to take up programming as a kid
RIP Shamus Young
"Have you ever stood and stared at it? Marveled at its beauty? Its genius? Billions of people just living out their lives. Oblivious."
This looks like the intro for Ghost In The Shell ! Yes. I like it. MOAR.
This is beautiful, the fact that it was 2009 makes it considerably more impressive.
Oh Shamus, you shame us!
Evan Howell Not really more impressive. An algorithm is an algorithm. It will still look good further down the road.
Evan Howell what? We had already Quadcores in 2009. Why would you say something like this?
This is a great demo. I like the high level overview steps. I'm learning opengl programming and something like this would be a good goal and I'd learn a lot about textures and stuff. Each step you did was a good next step in the evolution of the model. Your model doesn't really have to be anything, it's just an excellent example of what you can do when you set your mind to something.
going through my old bookmarks and found this and just realizing this is originally why i subscribed to you haha
Would add randomly generated advertising panels, displays(dynamic), texts in limited level of height. Another thing: making some logical "landscape" of buildings. There could be random placement of "downtowns" where buldings make hills. But not absolutely random, but slightly growing to the center. And those adwertisings I mentioned before, could become more concentraded in the downtown "hill" then around lower buildings.
Make gradients to vertical unwindowed strypes - upward illumination.
Anyone got a copy of this tune? The "Around" by Oursvsince that I keep finding isn't the same as this one..
Its amazing the complexity you can get just from a simple set of procedures.
That's awesome! Nevermind the screen saver, patent or copyright this thing (I dunno which you do for programs) and sell it to game developers. This takes the random level design to a whole new level. Nevermind a randomly generated dungeon, nevermind randomly placed enemies or weapons, imagine a free roaming game that put you in a new city EVERY TIME you played it! It could place new missions and everything at key points, you could save it until you finished that one and have it make a new one!
Great job with this project! People just don't realize how powerful procedural generation is. If you need a city simply have the computer do the work, things like this save quite a lot of disk space.
I could imagine this in a city sim game, where you run a city, but you don't have to bother placing every building, the city build itself up, as you manage it. Or city simulator in a strategy game, where you don't want to spend time on macro management, you go to war or something like that., meanwhile your city grows.
Fantastic work Shamus!
I love the description, anyone with a basic knowledge of graphics programming should be able to produce similar results. Your results are wonderful! It'd be great for a flight sim, most just have flat textures for "cities".
Hi Shamus - "Pixel City" is an incredible piece of work, really well done...
This is amazing. I'm a first year Computer Science student, and this kind of thing really inspires me. I hope I could do something this cool one day.
Very awesome, can't wait for the demo of this. It looks very realistic (which is kind of scary when you think about it....)
Nice work! You could even play with the arrangement of buildings with difference style and height as higher/newer buildings tend to be built close to each other (like a business district or something). Or you could create a random city grid with short and long streets. But this is a really amazing work!
Very cool Shamus! Can't wait for the screen saver to be posted.
Everyone, go read the project notes on the twentysidedtale site. Very interesting!
Awesome stuff! Totally the way of the future. To hand make every single aspect of every single game is ludicrous, procedural generation is what's gonna have to take over a lot of the time. And this is another very important step towards that.
Screensaver? No man, just pure inspiration to gamedevelopers wannabes like me. Glad you shared this. Thanks mate.
Instructions unclear. Accidentally i cured cancer instead.
Thank you? Lol
Isn't it a dead meme ?
"Accidentally i cured cancer"
good grammar
@@monomii2841 Great comment
@@elbretto6062 it could be a standard douche comment on the interwebs or... or it could be a very cool inside joke, as the buildings here are probably generated using proc gen grammar, so, if you actually used those grammars to cure cancer they would, indeed, be an example of VERY GOOD GRAMMAR! Maybe I try too hard to see the good in people, what do I know :)
Instructions unclear. Accidentally built a shelf instead.
Mostly because the concepts of the games that used the equations was limited, but check for example the game ELITE that's being developed, it's pretty amazing how they are reviving the procedural generation in a new and fun way :)
Continued: As for the missions, they are generally pretty simple from a programming standpoint, e.g. go there, walk in the marker to speak to an npc, go there, shoot some guys and so on. The story behind it gives it most of it's depth. You could load the cutscenes and mission scripts when the player accepts the mission. So maybe 6-10 seconds on the loading screen. Still, i personally wouldn't mind waiting for much longer if it's a good sandbox game.
Very nicely done! I want to do an outdoor nature style generator, like this, but with all organics, trees, lakes, rivers, Maybe with roads and small towns or ruins. You should make this so it is a world that is of unlimited size, so it generates the world as you travel. Make it so a seed for the RNG can be input and you always see the same world, but it generates it in sections as you travel. Work on an indoor generator so buildings can be explored too. Nice work anyhow!
this would be clever as scenery in an open source flight simulator, like flightgear
this is truely hitting close to my soul. Its a contrast between our abilities and the computer's. NOt to mention that it has a high production efficiency boost and if done with high end quality in mind, could generate entire virtual cities for movies or games. Spore is a game that already endeavors on this.
Imagine if something like terragen and pixel city could be used simultaneously to create huge city worlds :)
Dude. I'm beginning to study urban modelling for a PhD. Your program is bloody awesome. Better than many I've seen published in academic journals. Well done!
Impressive. Reminds me of Greeble, only different and really cool in its own way.
More than a screensaver, this can be a tool that saves thousands of man hours in game, art and other contextual applications.
Beautiful work. What the people complaining about lack of features/detailing and such fail to realize is that this is fundamentally a weekend (well, long weekend anyway. ;-) ) hack to demonstrate the technique, and isn't *meant* to be a fully-fleshed out work. Still...makes you wonder what game programmers keep spending years on, you know? :-)
That's very impressive, both the coding and the video. Good job!
Amazing how little details makes the whole scene so much better. Thanks for the inspiration.
yeah it would be pretty cool to see, I'm still amazed on how much detail there is and made by just 1 guy.
If the buildings can have bouncing boxes applied to them, this could be used to QUICKLY create flight simulators, or old Armored Core like games ixnay the fake vehicle dots. It wouldwork pretty neat for low intensive graphics projects and independent devs if they can set their own height maps too and it could work around height maps.
Some of these video responses are pretty amazing as well
SWEET program.
yeah
would be superhard to make european city
tsartomato Yup, you would have to model history and have that affect the evolution of the city. Not impossible but very tough indeed.
You could pull a really neat game out of this. If I were you, I'd be making it as we speak.
+Helder de Vontaire What sort of game are you talking about? There is no gameplay unless you suggest some. This procedural city is only good as a screensaver or a city for a flight simulator.
Aidar K
An rpg, for instance. Or, pursuing and destroying cars in an arcade style racer. Idk, that's up to the creator.
Helder de Vontaire This particular generated city doesn't have any considerable amount of detail for an RPG or a racing game. It looks good only from a distance. You don't want to walk around cubes with blurry textures and moving light sprites.
Aidar K
Well, it's just the base. Obviously you gotta improve it.
Helder de Vontaire My point was that you don't build a game around some background, you have a game idea, a gameplay and create a background around it.
Amazing, had watched this video 8 months ago, spent 30 minutes going through bookmarks to try and find it again. Glad I did. So very inspiring.
This was excellent! Sorry you're gone.
That's it, I absolutely must program this!
procedurally generated maps for mirror's edge would be awesome :)
and yes, I am well aware that it is well beyond the scope of this project, but I thought of it when I read step 7.
This is very cool, folks should check out the article series explaining how he put it all together.
@benanderson88 : It is ported to Linux. You can find it in the latest version of the "Really Slick Screensavers" collection, for instance, where it fits the description admirably. Search in your distribution's repository, or Google it. I don't know about MacOS, but I imagine it's been ported.
This is pure beauty. No other words for it.
I envisioned a game in the style of Shadowrun being made out of this. Amazing work.
Looks great. Love things with that hand-programmed touch that are graphically unique.
With procedural planets becoming the norm for space sims (Star Citizen, Elite Dangerous, No Man's Sky, Infinity Battlescape, etc.) this is the next step :)
Beautiful to finally see it in motion Shamus!
It's the program Pixel City deserves... But not the one it needs right now.
You say "Release it as: Damn I have no idea what this is for"
I say it's a demo. It is art, it is bragging rights, it is fairly awesome.
I say release it at a demoparty.
Yeah I hear they have those in Finland and Norway when everyone isnt hibernating
@@ChadDidNothingWrong Revision in Saarbrucken Germany is basically the biggest demoscene only event.
I was reading his posts as he made this. He actually spent a while making some more complex AI for the cars, but scrapped it because the extra work wasn't really that noticeable, and took too much processing power (not to mention time needed to program proper movement patterns for cars).
Some fast-moving sirens would be interesting, but I think he wants more attention paid to the high-up buildings than the street-level details. Still, it'd be cool to see.
Step 7 : You post this on the internet, together with an up to date CV and you start applying to game companies.
Its a nice demo and I'm sure will generate interest.
Agreed. This would be so cool as a screensaver.
As the company representative for Monolith Enterprises Unlimited, I salute you for your awesomeness.
Awesome video, Shamus! I just read the entire series and downloaded it as my screensaver. I love your blog and your projects, keep it up.
I think this is what they use for cities off distance or in the background for 3D Animated Movies
Remembers me a little bit on Dark City. Respect for your coding capabilities.
Damn, that's very impressive! you could probably use this as a tool to create many different levels and they wouldn't even have to be cities of buildings.
Must learn how to do this, this kind of stuff is what's inspiring me to learn OpenGL.
Amazing work!
Awesome looking.
And only 50 hrs of work!
@m1dlguk procedural generation makes programming very time efficient(albeit extremely mechanical and generic results in the long run), so 50 hours of this doesnt seem like a stretch. it was a good job nonethless.
@leniopable: he uses openGL. check out the link given in the description. He explains step by step how he built it. its simple yet so freakin amazing.
Wow, this would be quite an amazing screensaver.
The last step clearly reflects the nature of us computer geeks: we do cool things and then ask ourselves what they can be used for. Imagine what we could do with good ideas in our hands.
great project you have here Shamus! Thanks for uploading it!
if the lights can be animated using musical input, this can make a great music visualization. kind of a disco city.
You've managed to evoke a city very well with the minimum details. Conservation of detail at its finest.
great work. minimalistic, dark, atmospheric. reminds me of Syndicate Wars.
Still impressive.
Thank God, there are still people who create such things : a one man solutions, people who create such things for joy to show that it is possible :)
w00t... how funky. I found your channel by the Rage mega-texture reset-button video after searching for more videos of Carmack showing off the Rift prototype. Then as I decided this was interesting I pressed PLAY ZE ALLZ! The fun part is, I've seen this video before :D Stuff like this has happened to me a few times now, bumping into old videos I had no idea what they belonged to before, haha. It's always a bit odd and fascinating. Thanks for nice videos :D
Dang this is so good! seems useful for scene fillers in games too. I was watching and wondering why this seemed so familiar, and realised that an Xbox Live Arcade minigame called "Boom Boom Rocket" uses panning through a city just like this, but I think it was Sydney though, because the Opera House was visible in one song.
Until I started learning programming I never appreciated how long things like this took. Good job.XD
It has been out as a screensaver for a pretty long time. Just check his site linked in the description.
All the people complaining about graphic quality and begging for release - move your lazy asses and check the link in description - In series of articles author explains how and why things here work the way they work. Screensaver is also there for download.
this is the 2015 and it is stil awsome mate!
you can add some street lightings, neons on walls of buildings and anti air crush marking lights on top of higher buildings - it should look more realistic.
but now this is amazing ;)
Awesome, you should release a demo with it , the demoscene comunity will be very grateful.
Best video I have seen this year. This is amazing.
It should be.
But you have to keep something very different in mind when viewing grpahics though: drawcalls.
On consoles where there is a single optimised platform, you can get 50K of drawcalls through, there is one api that is suited to just the single hardware config in the box. On desktops, you have a myriad of cards and cpu's and the api reflects this, and as such you are lucky to get 10K of drawcalls in before it all falls down, and then you have not hit the limit of the graphics card.
RIP
Fucking awesome... and the fact that it is released under the GPL is even better!
This is amazing. I first heard of shamus young when he wrote articles for the escapist, but I didn't know that he was a coder.