Procedural Programming- The Secret Behind Spore
imashoe writes "Ever wonder how Spore works under the hood? The game seems to be insanely huge and how is it that there can be an infinite amount of different creates created in the game? The answer is Procedural Programming."
Given that I've only seen videos of someone else playing "Spore", I have to say, no, I don't wonder how it works. I wonder when the hell it'll be done.
The cake is a pie
"The game seems to be insanely huge and how is it that there can be an infinite amount of different creates created in the game?"
I think you misspelled "crates."
to generate one meaningful article about it? since apparently it's good at increasing noise by putting out fluff pieces as this one.
--
captcha: uncouth. Quite.
Attention Procedural Programmers: You have piqued my interest. Please reply with snippets of example code.
Actually I never even heard of Spore.
I really feel like the person who wrote the article doesn't know what he is talking about.
This article reads like pure garbage. Procedural programming simply refers to any form of programming in which procedure calls are made... ie. any mainstream imperative programming language. Does anybody really believe that games fill up multiple DVDs because there are too many IF statements? Editors, wake up please.
Please tell me this article is just a joke that I'm not getting.
Horrible, horrible article with no connection to reality.
There is no way spore is going to live up to the hype they keep generating. Even if it is a moderate financial success people will view it as a failure because of expectations. as far as procedural programming is all bull, they're franticly animating to fix the impossible procedural animation system. My prediction is that it will be delayed and be a disappointment to anyone who is expecting the greatest game ever.
So Spore is programmed in C/C++. This is surprising... how?
I think you meant to say 'seemingly infinite' or 'infinite for all intents and purposes.'
I've tried to think of mental exercises to challenge people with a concept of something being infinite. For example, if you had an object of infinite mass with no gravity, would it be possible for us to exist alongside this infinite object?
Infinity has interesting properties and I challenge the use of 'infinite' in this summary. The article uses cautious words: Procedural programming essentially shrinks the technological world, allowing us to fit a lot more information in limited space, and allowing this information to interact in near infinite ways. The basic theory of how one would store infinite states of data instantly disqualifies any device I know of. Computers, game systems, etc. are ultimately storing data in a binary on/off form. You can story many bits of data and come up with many states very quickly. You cannot, however, store an infinite amount of states on a finite amount of bytes. There's just no way to do it. A very large amount of different states? Of course. But not an infinite amount.
For the purposes of speculation, what would be the best way to give a user a seemingly 'infinite' number of states? Well, the obvious choice (and what random number generators on computers seem to favor) is to use time. Time is infinitely divisible (although the representation of that depends on decimal precision) and it is (seemingly) never ending. So one would base the resulting states in the game off of when a user entered input. It is still very easy to show that this is a many-to-one mapping. You can divide time down to a small enough unit that they are technically different moments yet the hardware that captures the analog input cannot discern between them.
I think that this concept of 'infinite' states is desirable to gamers. And it's the states that you find yourself in in a game that were clearly not thought out by the developers that makes a game special. When you have a large freedom of configuration pitted against players with that same freedom, you have the core success behind real time strategy games where players would build cities and armies and pit them against each other.
I don't think this claim can ever be made when a digital machine is being used. I guess you could design a program that would adjust to the size of the machine and extrapolate the amount of precision it used to measure the moment at which the user clicked the remote button and then stamped this number on the create's forehead (or some other form of uniqueness). But, I do not know enough about how the CPU acquires the time stamp. If it's a quartz crystal, this is only accurate to the number of vibration the crystal makes per second with electricity pumped through it. I have good reason to believe you will always encounter some theoretical issue or barrier when trying to achieve truly infinite implementations. Best to leave that word where it belongs: in mathematicl proofs and scientific theories.
My work here is dung.
Maybe the author is not using the right word, because every games (before the wide adoption of object oriented programming), I say every games, were using procedural programming.
The article author has no clue.
Despite the hype, spore is far from the first game to use this sort of thing. Back in the 8-bit and 16-bit days, it was, well, not common, but not unheard of. Games like the classic "Sentinel" used fractal landscape generators to have 1000s of levels on a 64k C64, "Frontier" used it to have a galaxy of worlds on the Amiga, etc.
Trouble was, such games tended to begin to look the same after a while, despite "near infinite" variations within the limits of the procedural generation algorithm. Already, I begin see that in spore. Yeah, your creations are unique. Like billions of others are.
Spore does more with the technique certainly. Will spore stave off bordeom longer than a procedurally generated C64 game - undoubtedly. But the boredom begins to set in after the space of possibilities has been delineated, not when the space has been explored exhaustively (this is common in programming itself too, as I think Paul Graham has pointed out when writing about Lisp). The former depends on the complexity of the procedural generation scheme, and spore's doesn't look infinite to me (though maybe it's extensible).
Girl: You got Spaghetti Code in my Perl!
Boy: You got Perl in my Spaghetti Code!
BONA FIDE REVIEWS: our content makes as much sense as our ads.
Please stop stalking me, bro.
Perhaps the author is confusing Procedural Programming with Procedural Generation?
Life is wet, then you dry.
use a functional programming language. prove mathematically that your functions are correct. and technically, it should be fairly easy to write compilers that automatically thread the program due to the nature functions are written in a functional programming language. i encourage everyone, especially the writer of this article, to read up on it. Haskell (a programming language) is a good place to start.
"The basics of sequential programming are all object oriented."
That pretty much captures how well the author understands programming.
Someone with a subscription needs to tag this story Vaporware.
I remember first getting excited about in-game videos of spore something like two years ago. It's starting to feel like we're getting nukem'd again.
I stole this sig from someone cleverer than me.
...with Duke Nukem Forever.
Now that I think about it, I'm pretty sure everything I just said is completely wrong.
What the writer is describing is NOT procedural programming but rather some sort of event-driven programming.
There should be a "-1:Groupthink"
The article isn't even titled properly, the technique that spore uses is not procedural programming, it's procedural generation, which is a completely different concept http://en.wikipedia.org/wiki/Procedural_generation
That article is terrible. It reads like a 9 year old trying to explain something he doesn't understand.
Maybe not
Which itself is hardly revolutionary given that functional programming has been around for four decades.
The comments about Civilization are particularly annoying.
The cake is a pie
More like rule-based, event-driven programming. This is what happens when people don't get a proper technical education.
Tsunami -- You can't bring a good wave down!
Ever wonder what the hell "Spore" is in the first place? Slashdot articles won't help you.
Heh. The author probably meant procedural content creation, but even that is a stretch. There's certainly procedural animation too...
wtf is going on here? Did he just explain functions?
[alk]
...that is, this game which had an "infinite" universe. The book Infinite Game Universe has some good discussions of this sort of thing, too.
The Army reading list
This a some crappy attempt to spam /. and I don't know how it got through.
Now that I think about it, I'm pretty sure everything I just said is completely wrong.
*Functional* programming sometimes seems like magic. Maybe that's what they are talking about.n g
Its not new but still cool.
http://en.wikipedia.org/wiki/Functional_programmi
How can anyone claim that procedural programming is better at generating dynamic content than object oriented programming? Then I realized this FA was BS.
There will at most be 'a lot' of different combinations.
Indeed - I'm sure you're exactly right. This looks like a new low for /. novice "tech" "writing" - and for this site for picking it up as a story.
Tired of Political Trolls? Opt Out!
How the fuck did this make the frontpage?
Procedural Spam Marketing FTW!
Of course - since many today tend to do object oriented programming (for good and bad) the procedural programming may seem "fresh" for some.
And there are other programming areas that can be considered too;
If builders built buildings the way programmers wrote programs, then the first woodpecker would destroy civilization.
who literally know *zip*. I just dipped my toes in the article, and lines like "procedural programming is ... object oriented..." snapped any suspenders of belief I had in the article.
Of course, it'll be smaller and faster than Objectionably-oriented software....
mark
I think the author meant infinite crates.
3 times, and I still can't make sense of it.
The author can't be talking about procedural programming in the classic sense. On a re-read, I suspect that "procedure" is somehow equivalent to "action". Especially the part about building weapons from components.
The implication is that "Spore" (whatever that is) has a calculus of action. Which (almost) makes sense. I imagine (again, back to the weapon example), that a cartridge contains "x" grams of explosive, that yeilds a force, acting on the ballistic component. That force must be containable by the barrel chosen, or the weapon explodes. Accleration can be computed, influenced by barrel length, and destructive force computed.
What I don't see is how these arbitrary physical limits are enforced. If they aren't, a handgun with the power of a howitzer could be constructed.
Just another "Cubible(sic) Joe" 2 17 3061
Not before April, 2008. And it may get held up even longer since they want to release simultaneously for PC and DS even though the two versions will be different and incompatible.
That's why the halting problem is undecidable.
What the hell is this article talking about? I can tell that the author either doesn't know how to program, or he doesn't know how to break it down into non-tech speak. Either way, the article doesn't make much sense.
As for procedural programming... I'm not sure how it would be possible to write an interactive multi-player procedural program without using the concept of an object. Especially when there is customization at the level that Spore claims to have. I really think perhaps the author of the article doesn't understand the difference between an object's method, and a non-object procedure/function.
The Generation
I'd say something witty here, but I'm not that bright.
Comment removed based on user account deletion
As I read of such procedural wonders as "throw fireball" and "drive your car" or "go to work", I was thinking of the power that this could have in the adventure game Zork.
My god, to think I was trying "open door" or "eat bread", when I could have used "Throw Fireball" or "Evolve self".
Please make my childhood complete by bringing these procedural programming wonders back to Zork. Please. Think of the children.
Author is just defining their algorithm. An algorithm can be implemented in any programming language with any programming techniques. They may have a better algorithm or a better way to do things, but it has nothing to do with the tools and techniques they choose to implement it.
It is kind of like a sale pitch; because our product X uses technique Y, it will do everything automagically, you don't even need to know what you are doing, hence you don't even need an algorithm !
The author seems to be confusing algorithms with tools and techniques.
Everything I write is lies, read between the lines.
Comment removed based on user account deletion
A little help please? Does anyone have a slashdot-editor-to-enlgish translator?
Comment removed based on user account deletion
Comment removed based on user account deletion
From the description, this doesn't sound like procedural programming. It sounds like a rule engine. One of those things where there are rules that fire if the current situation meets all the preconditions. Multiple rules can fire simultaneously, and you need conflict-resolution logic to to choose which one to use when there's a conflict. If rules fire that want to set both "turn=right" and "turn=left", then some priority system or random choice has to pick one. And some hysteresis may be needed to prevent dithering between equally good choices. If non-conflicting rules fire, you can do two things at once, like "jump" and "punch". "Emergent behavior"!
This sort of thing drives the NPCs in quite a number of games. If Spore has something new, the article certainly didn't explain what they're doing differently.
Get rid of this ridiculous story.
I can't believe this made it to slashdot. I can understand confused articles about patent law, copyright law and politics, but this is supposed to be a web site that appeals to people who have some clue about how computer software works. The article referred to is a pile of drivel, full of technical errors written in something that is a long way from coherent English. Maybe this belongs of the OMG!!! version of slashdot, but certainly not anywhere else.
They meant procedural content generation, like L systems, used to make believable looking plants that grow and change over time.
It's all about repeated iteration over a particular type of finite automata with a particular string.. Easily done if you've taken your 3xx/4xx graphics an theory classes, but perhaps past what most technology reporters are capable of.
So, to summarize:
* C is an example of procedural programming.
* Haskell is an example of functional programming.
* L-systems are an example of procedural content generation (content generated by a procedure, in a deterministic fashion).
--
Internet Explorer (n): Another bug -- that is, a feature that can't be turned off -- in Windows.
...numerical numbers, or am I confusing it with visual graphics?
Doesn't it make you feel good to know that our freedoms are protected by politicans, lawyers and journalists.
I just wanna play God!
Why do you abuse my games so? - Will Wright
[End Of Line]
This all sounds very interesting.. have any links to your games we could look at?
The article is plagued with incorrect semantics and definitions(CS Discipline).
It's sad and troublesome to witness Slashdot plastering (posting?) this article.
It talks against the editors and the site in general.
- these are not the droids you are looking for -
As a game programmer, I'm actually offended by this article. Why do I get the feeling it was written by a football jock who used to bash me (and other game programmers) up at high school? I was going to list the mistakes made in the article, but realized the entire article (even its name) is wrong. I spent 5 minutes looking around Slashdot for a "Bury" button, can someone contact the Slashdot President and tell him to launch a preemptive military strike on any future articles of this quality.
Comment removed based on user account deletion
... and COBOL
Yes I noticed poster tagged the article "wrong."
"I'm not much interested in interoperability. I want substitutability. I want to be able to throw your software out."
Anyone recall that 'game'/screensaver?
it would generate unique animated fish of uncountable variety, and show them swimming around, and you could breed pairs together to generate realistic children and such...
I tried running it on a 486 once, unfortunetly, it was so much faster than the system is was designed for, it didn't work (first thing on program startup was a benchmark, seeing how many minutes it took to generate a fish... since it took less than one minute, it crashed with a divide by zero)
The truth hurts :(
But there wil allways be Starcraft!
Privacy is terrorism.
Does anybody remember Starflight 1 and 2? Whole galaxies full of believable-enough planets fit on two 360KB floppy disks. Did these games do something similar to what the author of this article is still desperately trying to comprehend?
Breakfast served all day!
Among other things the author seems to believe that a game could fill multiple Blu-Ray discs with "IF/THEN statements", which are the main component of "sequential programming," which is "all object oriented."
This is the worst story I've seen in quite a while
http://en.wikipedia.org/wiki/.kkrieger a FPS with just 96KBs in size. The Demo scene surely knows how to squeeze in lots of stuff in small spaces.
- It generates code
- It appears the object orientation system works on some form of generic methods
Perhaps admitting they're using one of the other well-known basis' of computing (Lambda Calculus vs Turing/Von Neumann machines) is a bit too much for them to confess or maybe, even, understand?n/t
I've never been so disgusted as to be motivated to post a comment slagging off an article on ./ before as I have now. This article is so poorly written by an author who so obviously hasn't the fainted clue what they are talking about, I didn't know whether to laugh, or just cringe when I read it. Honestly, I think I lost a few IQ points just from reading this trash.
Now I know ./ posts some shaky articles, but this has to be the worst I've ever seen. Bad form, editors, bad form!
Of course the irony is that one should proof-read their own comments before criticizing someone else. Getting the slash and the dot around the right way would be a good start!
I think the author uses the term "procedural programming" when what he's describing is a DSL for games.
Five bucks to the first man who manages to fill "2 or 3 HD DVDs" with if-else statements!
"Flag on the moon. How did it get there?"
Went on to say that his 3d runderring was slow because it lacked "floating units"
Make a few bad jokes on
The beauty of /. is that even an absolute crap article will in most case get somebody to point out what actually was newsworthy about the item. So to summarize: It seems that the game allows the user to create their own procedural content generation through the use of editors.
"This entire world [...] is proceduraly generated" ... straight at around 2 mins in this video : http://video.google.com/videoplay?docid=8372603330 420559198
I think a big reason why that happens a lot in games is because the developers really want to tell you a story instead of giving you a game or a world to explore. They've got this beautiful story that they feel they really want to tell and don't want you, the player, to intervene in that in any really meaningful way. So they guide you and disallow any unorthodox ways of advancing in the game so that you'll get the story they want to tell you. And that creates the feel that many modern games have of you just having to run fundamentally meaninglessly to find the speacial ability or special object you need to find in this part of the game to get to the next cutscene that will advance the story.
Then the developers remember that they're trying to make a game and not a movie and add all kinds of extra things that you called 'advanced features', but that happens after the fact, and at that point, the story already constrains the game so much that any freedom to explore the world of the game that would otherwise be possible is already gone.
I suppose a lot of people enjoy that type of game, or maybe it's just a safe choice for the developers in some sense; it's maybe easier to tell a story through a game that's at least relatively engaging than to come up with gameplay mechanics that would keep people interested in and of themselves (a story is probably a lot easier to market as well).
Personally, I'd really like to see commercial games that would have game mechanics rather like what Nethack has. What I really enjoy about Nethack is that it feels like there's an actual world there where there are no artificial barriers. If something kills instantly, it kills everything instantly, all the 'boss' characters and yourself. Fair's fair and deadly's deadly. But fair is interesting, although at times extremely frustrating. Maybe for anything to be truly interesting it has to be frustrating on occasion...
Well, I guess I went off on a bit of a tangent there, since Nethack really doesn't use that much procedural content generation (apart from the layout of the dungeon), but I suppose I felt like I had to vent my frustration at the state of modern games, which for the most part seem to be not much more than glorified computer-animated movies with some meaningless running around required to reach the next scene. And the most frustrating thing about that is that computers and computer games as a medium could be used for so much more, for all kinds of unprecedented things! Alas, such are the realities of commercial products. Maybe I'll need to check out more indie games, maybe I'd find more variety there. I hear Darwinia's quite interesting.
Well, I hope you have good luck with your projects, they sound interesting. I hope you'll get far enough to publish something for the rest of us to see. My own projects and visions for games mostly seem to be stuck at the planning stage :-)
End rant.
This article is awful. Reading it modded my brain down.
;^)
Thanks a bunch, editors.
--
Toro
(Apologies to the Rev. Mr. Dodgson).
There is no right to feel safe thru security vaudeville at the expense of everyone's freedom, privacy and tax money.
Sequential programming is essentially a gigantic looped together tangle of If/Then statements.
(ya know, I did have a feeling programs were messy under the hood -- thanks for confirming)
The basics of sequential programming are all object oriented.
(of course, giant looped tangles of object oriented if/then's)
Well in games with so many options, the IF/THEN list becomes so long it becomes scrambled. Several calls to previous points in the list are made and the whole thing gets disorganized, something which programmers affectionately call "Spaghetti Code."
(Object oriented spaghetti, like a tipped over plate on the carpet)
Procedural programming doesn 't use "things" as the basic building block of a program, but instead "actions."
(I get it, sequential objects are dead like a row of peebles, and action procedures bring life, like turning the peebles into a school of fish!)
The interesting thing about procedural programming: modularity.
(modularity, brilliant! I bet they wish they had thought of that when they created object oriented programming)
Quem a paca cara compra, paca cara pagará.
As I posted last week, Will Wright will be giving a Spore preview at his Stupid Fun Club studio in Berkeley on Friday, August 10th as part of a benefit party for Bill Pullman's new play. The tickets are expensive ($250), but all proceeds go to benefit the Magic Theatre. It will be a small party so their may be an opportunity for some guests to take Spore for a spin after the preview. Besides Will and Bill, Apollo 9 astronaut Rusty Schweickart and Bill Nye the Science Guy are also expected to attend. For more info: http://www.magictheatre.org/season0708/sfcparty.sh tml
I've asked functional fans to objectively prove that functional improves anything measurable (and practical) in a realistic or at least semi-realistic custom business application more than 10% over procedural + relational programming; and they flat failed. They made up all kinds of odd excuses for their failure, some of them contradictory, but in the end they failed. Maybe there are subtle benefits, maybe functional fits your particular brain better, but there are no slam-dunk objective benefits, at least in custom biz apps.
Table-ized A.I.
All I can see for this one is:
(It may also be the reason I have yet to release anything)
It is hard to test something that is as wide open as you wish. I'm sure there would be all kinds of bugs and hacks found it in since a 99% realistic universe will either take over the world HAL style, or crash a lot.
Table-ized A.I.
Something not good going with slashdot choice of article lately.
Getting your erroneous article posted on /.
It's as bad as embarrassing yourself on national tv, only it's not only national any more.
I've been curious about how stuff like SpeedTree works for years now, and that "Practical Procedural Modeling of Plants" article you linked appears to be the perfect reference!
"[Regarding the 'cloud,'] ownership was what made America different than Russia." -- Woz
Well fellow /.ers, the article was pulled (anyone have an original for laughter purposes?) I'm oddly proud of the /. community for successfully cleaning cruft from the vast sludge of the internet.
If only with could do this stuff for mainstream media... like any of us bother any more :)
That is all informative in its all way, but that's not what Procedural Programming means. Seriously, look what the adjective or adverb applies to, because it says it all:
- procedural texture generation: generating textures using procedures, instead of painting them the old fashioned way. I.e., instead of paying a horde of artists, you pay a smart guy to write you a piece of code.
- procedural terrain generation: ditto for generating terrain, e.g., using fractals.
- procedural animation: ditto for animations. The old fashioned way was to actually have a pre-defined animation file. Nowadays the procedural way is getting to be the standard, since it's really the only one which can account for physics.
by contrast:
- procedural programming: programming using procedures (what you may call methods or functions in other languages.) The big improvement of procedural programming back in the day was that it actually introduced the partitioning the program into functions, as opposed to the first programs being a chunk of source with GOTOs to solve the flow.
It may seem like a simple concept nowadays, but it's sorta like the stirrups or the saddle: you'd be surprised to how many people it didn't occur to do that. The first CPUs didn't even have the equivalent of "call" and "return", and it wasn't mandated by the Turing Machine concept. Then the first ones who got that didn't have a stack yet, so you'd literally be limited to one level deep and you better be sure you never recurse.
So, really, it's a whole different concept.
You can have procedural texture generation, for example, without that procedure actually being procedurally programmed. It could be done with Functional Programming just as well, and in fact it even makes sense. Or you could use Logic Programming, and that makes sense too: you'll want to have _some_ rules there, so a language which is all about rules matching and inference might be all you need. Otherwise, you'll have to basically reinvent a sort of inference engine of your own. You could even use Genetic programming if, for example, you want to try to optimize the result to exactly what the player is doing there. Etc.
Or more pragmatically a mixture thereof. E.g., even if it's procedurally programmed, chances are you'll want some rules matching, and you'll probably at least have a functional concept along the way.
A polar bear is a cartesian bear after a coordinate transform.
Elite (by David Braben and Ian Bell) probably did something similar. A 3D space flight sim with 8000 planets, each with their own government and economic system, and it ran on 64K. A stripped down version even ran on the 32K Acorn Electron (still featuring 8000 planets).
The article seems to have been withdrawn anyway ! Ah ah..
--Ivan
2) Your desciption of what you are calling "Proceedurla Programming" actually sounds like Object Oriented porogramming (OOP). Once on the main features of OOP is getting rid of if/then/else code, another main feature is creating objects to deal with actions.
Perhaps using OOP "properly" is new to game programmers, or perhaps I just don't understand what you are saying because of the poor use of terminology. But to me you have said that Spore is written object orientedly.
#3 by blackperl on August 5, 2007, 1:12 pm Reply to this users post
If anybody ever runs across this article when doing searches for procedural programming, please understand this article is full of inaccurate and misleading information and you should discard the information presented here and continue your search elsewhere, or feel free to verify my statement through your own research. This does not accurately describe how Spore functions, what procedural programming is, or how code is written for games. So hmmm....maybe try again?
This is Slashdot! Give me the latest gadget, bug, or OS project! This ain't english class so don't confuse the two!
The site seems to be insanely huge and how is it that there can be an infinite amount of different comments commented in the site? The answer is Dynamic HTML Programming.
Immortalized for the horror.
--
If you are a maxis fan, you probably have heard of their new project "Spore." The game which was originally dubbed "Sim Everything" allows you to do just about anything you could think of, from evolving a single celled creature, to creating advanced space faring societies. Perhaps the coolest thing about this game though, is that no two player's creatures, buildings, vehicles, or even planets will be alike, and yet they are all still fully functional. How does this work when the basic building blocks of ANY of these things are just polygons? Well, to see that first we have to examine the game itself.
Spore is a game of editors. In each stage of the game, you will spend your points to change and improve different aspects of your society. You start with the cellular editor, followed by the creature editor, object editor, building editor, vehicle editor, until eventually you become able to terraform planets. The best thing about these editors: their sheer flexibility. Any number of body parts, with any number of joints and features can be stretched and pulled to any number of sizes and shapes and attached almost anywhere on your creature. The same thing goes for the tiny cell bits at the cellular stage, and the interacting material parts for buildings and vehicles. The key to making all this work? Procedural programming.
Procedural programming is a bit hard to explain, but I'll give it a shot. First lets look at what procedural programming is not. Many games and programs that you are used to use something caused "sequential" programming. Sequential programming is essentially a gigantic looped together tangle of If/Then statements. This may seem simple, but its true enough. Lets take an easy example, think back to the old days, such as street fighter 2. The If/Then statement for say, Ryu's fireball would be something like: IF your command input looks like Down, Down Forward, Forward, Punch, THEN throw a fireball, or IF the fireball image is overlapping the opponent THEN deal a certain amount of damage.
The basics of sequential programming are all object oriented. To explain this fuller, their basic building block is the object, or a thing. In the above examples, the objects were the command input, the fireball and the opponent. Programs can check whether certain objects are doing certain things by comparing their numerical values. For example if every space on the game screen is assigned a number, much like grid coordinates, the program can use simple greater than or less than comparisons to figure out where the characters, the fireballs, the floor, and everything else was.
So why can't this be used in games like spore? Well in games with so many options, the IF/THEN list becomes so long it becomes scrambled. Several calls to previous points in the list are made and the whole thing gets disorganized, something which programmers affectionately call "Spaghetti Code." Also, that much code and that many variables simply gets huge! Even though information technology has been growing at an exponential rate, there is only a limited amount of space you can put on a CD or DVD. On the PS1 there were 4 disk games, and on the PS2 there were 2 and 3 DVD games. It is only a matter of time before we have games which fill up 2 or 3 HD DVDs or Blu Ray disks.
The solution? Change the way the game thinks, and that is exactly what procedural programming does. Procedural programming dosen't use "things" as the basic building block of a program, but instead "actions." Taking the SF2 example from above "throw fireball" is one whole action, as is "Kick" "Jump" "Get Hit" and "Die" with all their particulars defined right there in the action itself. The interesting thing about procedural programming: modularity. Think of it like this: there is an action for jump and an action for kick, when you combine those two actions at once, you get jump kick. Of course its actually a lot more complicated than this, but this is perhaps the most simple
Coral cache link to a google cache of the full text article, in case this gem disappears:
e :fKB6z3DrHUMJ:www.bonafidereviews.com/article.php% 3Fid%3D224+Procedural+Programming-+The+Secret+Behi nd+Spore&hl=it&ct=clnk&cd=2
http://209.85.135.104.nyud.net:8080/search?q=cach
I almost hate to say it here, but Second Life has quite good and open-ended content creation. It's original building tools and scripting language have recently been extended with a three-D sculpting capability that can import externally generated 3-shape files. For all its faults, SL is one of the very few programming environments where you can be interrupted mid-edit by a lesbian vampire dominatrix looking for help because their scripted whip has just stopped working.
Okay, I will now animate my cute redhead avatar so it gnaws its own legs off as a punishment for me for posting this
Duke Nukem SporeEver
expandfairuse.org
If you were 1/2 as prolific a coder as you are a writer, the games would be finished (and probably well-commented).
Hear, hear. I, too am annoyed whenever some feature works only as a special case, and not as a generic part of the underlying engine. I also have dreams of building a game engine that is a comprehensive environment first and a set of particular things second. I have partially designed a pure relational data model to support it, but the code is far from being complete. The description of your game sounds just like what I want in mine.
One reason I think many games rely on small scale features is because it's a lot safer than deep widespread features. Small features with all usage paths known can be exhaustively tested, but deep features either have the potential to be unpredictable or need careful design time planning. In your climbing example, the levels probably have a certain linear progression the player is supposed to follow, and allowing the player to do that at any time might allow him to evade that order in a way the map designers didn't anticipate. The underlying problem is that the game needs to follow such a rigid and fragile structure in order to have its storyline.
Another reason may be related to the choice of programming language in most games: the model of small pieces with limited scope connected by a simplified base, each with a predefined set of behaviors is common to both imperative programming and rigid game design. Those that overcome that effectively build some kind of custom functional or declarative system to run the game on, in my experience (sort of like the adage that any sufficiently large project re-implements LISP, badly). From what I could tell from the article, Spore is no exception. If the designers started with a good functional or declarative language (and program in a higher-order style) it would be a big help. It's much easier to create functions that are known to work under any circumstances without having to check every combination, in higher level languages. I know that historically, such languages were too slow, and it is hard to find programmers for them, so I'm not holding out much hope for the near future. I will, however, put some more work into my project. Hopefully, one of us will have something to release soon.
"The answer is Procedural Programming."
a ge)
Oh my, Procedural Programming! They must have been the first company to use the C programming language, like, ever.
http://en.wikipedia.org/wiki/C_(programming_langu
Someone should slap the Slashdot editors.
its quite artificially limited in the first place. a spore planet filled with porn stars would be brilliant, but you couldn't do it based on what i've seen so far.
Wow, way to be a dick. I'm sure there were many other ways you could have said that - without sounding like a douche.
in girum imus nocte et consumimur igni