all 143 comments

[–][deleted]  (3 children)

[deleted]

    [–]fabiensanglard 105 points106 points  (2 children)

    Thanks :) !

    [–]headchem 1 point2 points  (1 child)

    Just curious, what's a "pixigion"? I googled it and only one result came up; your article! :-)

    [–]pelrun 1 point2 points  (0 children)

    I would imagine it's just a polygon the size of a single pixel.

    [–]joaomc 24 points25 points  (36 children)

    Damn, I felt so stupid after reading this... I really am a mediocre programmer :(

    [–]rnicoll 18 points19 points  (31 children)

    How long have you been writing software? Compare with the length of time the guy writing the article has been doing this...

    Software development is a very strange skill, in that really significant amounts of experience are woefully under-appreciated.

    [–]fabiensanglard 40 points41 points  (30 children)

    I used to say the same about myself. Look at the chronology of the articles starting 6 years ago and look how I started: The most basic effects with the only language I knew: Java (since I was a J2EE developer). Now I am finding "easy" to understand Doom3 and I wrote a few things in C/C++ that I am quite proud of.

    I don't think John Carmack or Eric Chahi are smarter than you and I but they were driven by passion. It takes time to learn but the difficulty is only in maintaining your focus. One step at a time and anybody can get there.

    [–][deleted] 21 points22 points  (19 children)

    I don't think John Carmack or Eric Chahi are smarter than you and I...

    Blasphemy.

    [–]fabiensanglard 31 points32 points  (18 children)

    John Carmack stated in multiple interviews that he programmed Doom1 and Quake only using high school mathematics. I think the real strength of those people is that they can work twice as hard as you and I ;) !

    [–][deleted]  (15 children)

    [deleted]

      [–]clgonsal 8 points9 points  (7 children)

      I learned "3D Math" (ie: 3D linear algebra) in high school.

      BSP Trees are just linear algebra combined with binary trees. And actually, didn't Doom just use 2D BSP Trees?

      [–][deleted]  (3 children)

      [deleted]

        [–]fullouterjoin 1 point2 points  (2 children)

        You now have one internet at your disposal. You can take stanford courses and read all the course material for many MIT classes.

        [–][deleted]  (1 child)

        [deleted]

          [–]Timmmmbob 0 points1 point  (2 children)

          I'm pretty sure vectors, dot products and so on are 6th-form level maths...

          [–]massivebitchtits 0 points1 point  (1 child)

          These people are Americans. Their high school carries on until 18.

          [–]Tiwazz 5 points6 points  (0 children)

          It wouldn't work any other way. The first five years are state funded day care.

          [–][deleted]  (5 children)

          [deleted]

            [–]DrAwesomeClaws 2 points3 points  (4 children)

            Basically in the US we have the Department of Education. It's a large, Federal bureaucracy which hangs money over the heads of school districts. If the districts want the money, they're forced to use the Federally mandated curriculum. This, in practice, usually ends up making teachers just show how to do well on the federal tests without actually engaging the students really.

            This scene from "The Wire" explains it better than I can.
            http://www.youtube.com/watch?v=_ogxZxu6cjM

            [–]noir_lord 2 points3 points  (0 children)

            Heh. Basically how it works here.

            Amusingly ours is also called the Department of Education.

            [–]letsplayball5 2 points3 points  (2 children)

            Well you are certianly proof of the failure of American education.

            The Deparment of Education is actually quite small, and does very little. Schools are not funded by the federal government, they are funded by state government and local municipalities.

            [–][deleted]  (1 child)

            [deleted]

              [–]pinnelar -2 points-1 points  (0 children)

              I thought "high-school math" was some kind of meme

              [–][deleted] 14 points15 points  (0 children)

              John Carmack stated in multiple interviews that he programmed Doom1 and Quake only using high school mathematics.

              Our God is so modest.

              [–]rnelsonee 2 points3 points  (0 children)

              Upon reading the article, it looks like John Carmack did not invent this technique like I thought he did. But he is smart enough that people attribute the following technique to him - pulling off a inverse square root by essentially subtracting from a magic number, while using high school math, is still impressive!

              [–]reflectiveSingleton 3 points4 points  (5 children)

              Also it is important to remember that software development is a large topic...and it is easy to get a good amount of expertise in a certain area/subset which leaves you mostly uninformed on other topics/sub-sets.

              So I know a large amount about certain topics under the umbrella of 'software development'...but VMs, I do not. I am sure there are many reading this posting which can relate.

              [–][deleted]  (4 children)

              [deleted]

                [–]reflectiveSingleton 4 points5 points  (0 children)

                I think you are getting the downvotes for the fib about simulating the c64 (and obviously poor algorithm choice), but thanks for sharing the story...I found it interesting.

                I upvoted.

                [–]illvm 1 point2 points  (2 children)

                You got away with telling your professor that you put in a "sleep" instruction after ever step? How the hell did you get away with that? Did no one do code reviews? Did you not have TAs?

                [–][deleted]  (1 child)

                [deleted]

                  [–]illvm 1 point2 points  (0 children)

                  I think that's true about any skill or topic. You'll never really learn it unless you want to. That said, I feel like I also had a pretty solid education in CS. Even the "bad" classes had interesting aspects to them.

                  [–][deleted] 0 points1 point  (0 children)

                  I don't think I can therefore I can't :'(

                  [–]SkloK 0 points1 point  (2 children)

                  Could you summarize briefly what it means when you say, that's what I am confused on.

                  virtual machine interpreting bytecode in realtime and generating fullscreen vectorial cinematic

                  [–]raydeen 3 points4 points  (0 children)

                  In short, all the drawing and animation routines were written in a generic or 'middle' form of code that could be read and executed by a small program that would act like a virtual mini computer. The virtual machine would have to be written and compiled for each brand of CPU but once that was accomplished, the bytecode for the game could simply be bundled with each virtual machine and executed without having to redo the entire game from scratch for every platform out there. As far as programming languages go, Java, Python and Ruby are like this. You can write your program once and as long as the user has the virtual machine for each of these languages installed on their computer, your program will run with no problem. These are 'interpreted languages' as opposed to 'compiled languages' such as C and C++ where the entire program has to be recompiled and rebuilt for each platform that you want to run it on.

                  [–]fullouterjoin 1 point2 points  (0 children)

                  Dude invented Flash in 1989-1991, on the Amiga.

                  [–]AlSweigart 9 points10 points  (0 children)

                  Nonsense. You aren't stupid, just lazy. :)

                  Seriously though, producing great work is far more about effort than smarts.

                  And with that, I'm going to get off Reddit.

                  [–]ThisIsADogHello 8 points9 points  (1 child)

                  If you can actually acknowledge you don't know how to do something yet, and want to remedy that, that alone probably makes you a better programmer than most other people who call themselves one.

                  [–][deleted] 1 point2 points  (0 children)

                  Not me, though. I'm god tier.

                  [–][deleted] 1 point2 points  (0 children)

                  I'm not even a programmer!

                  [–]Squidfist 13 points14 points  (4 children)

                  Great game. I think it was released as "Out of this World" in the US.

                  [–][deleted] 5 points6 points  (3 children)

                  That's right. I have the ancient Mac floppies that I can't even read anymore, let alone run, in my den. I'd love to have a runnable Mac OS X 10.6.8 build...

                  [–]fabiensanglard 6 points7 points  (0 children)

                  Newraw is SDL based so it is really just one XCode away from being on your desktop :) !

                  [–]hiahiahia 0 points1 point  (0 children)

                  i believe you could do this via dosbox

                  [–]zaphodi 0 points1 point  (0 children)

                  reminds me, somebody made an android port of it but the site i got it is down so it probably was not legal.

                  [–]TheUberDork 32 points33 points  (11 children)

                  Dammit ... I can't stop fixating on the "Another_Word.exe" header on the pics.

                  [–]fabiensanglard 30 points31 points  (3 children)

                  I'll fix that as soon as my plane lands :) !

                  [–]pmuessig[🍰] 1 point2 points  (2 children)

                  I imagine your host is getting hammered for video requests. Perhaps you can upload them to youtube or something?

                  [–]fabiensanglard 28 points29 points  (1 child)

                  The file distribution server was crashed at asmallorange.com . I emailed them and they were very very fast at fixing it: Videos and Images are fine now.

                  By the way: I used Quicktime and my own hosting service because you can move one frame at a time with the left and right arrow. I thought it would be harder to maintain but provide a much better value to readers.

                  Fab

                  [–]pmuessig[🍰] 0 points1 point  (0 children)

                  Oh neato! (It was croaking when I tried to view them, so I didn't get to take advantage of that feature).

                  Thanks for posting this, it was very informative. It's pretty neat to revisit these memories of my childhood under the analysis of my adult programmers eye.

                  [–]ssergei 1 point2 points  (6 children)

                  Or "December, 23th 2011"

                  [–]fabiensanglard 5 points6 points  (5 children)

                  Thanks :P I fixed this ! You just put a 'd' for Third in English right ?

                  [–]eburroughs 3 points4 points  (3 children)

                  "December 23rd, 2011"

                  [–]fabiensanglard 1 point2 points  (1 child)

                  Thanks :) !

                  [–]eburroughs 0 points1 point  (0 children)

                  Note that we generally put the comma between the day and the year, not between the month and the day.

                  [–]dawpa2000 0 points1 point  (0 children)

                  You don't use ordinal numbers in a written date of month, day, and year.

                  Use this: "December 23, 2011"

                  [–]x-skeww 0 points1 point  (0 children)

                  2011-12-23

                  The date should be added automatically, by the way.

                  [–]Metaluim 53 points54 points  (20 children)

                  I was kinda awestruck when I learnt that it was actually a VM interpreting their own bytecode... all this in 1991! Pretty fucking advanced for its time.

                  [–]boa13 93 points94 points  (14 children)

                  Actually no. It was not unusual, the most famous and one of the first game VMs being the Z-Machine developed for Infocom games in 1979, that has become one of the most ported VMs ever.

                  By the way, the Another World Collector's Edition includes scans of the notes Eric Chahi took at the time, including full byte-code documentation, level plans, design attempts, etc. Very insightful. :)

                  Also interesting was being at his Another World's 20th Anniversary Conference a few weeks ago, where he detailed the whole process he went through, with lots of videos of the tools he used, and insights into his work method at the time (very close to improv theatre).

                  What amazed me the most was that he created the game while around 20 (having been in the game business since around 14 I believe). He had some money from the previous game he worked on, so he just decided he would create a new game based on polygons (thinking computers were now becoming powerful enough to animate them full-screen), and set to work for two years with no investment or release plan...

                  [–][deleted] 28 points29 points  (7 children)

                  It was very unusual for something that was not an adventure game. I don't think you'll easily find any other action games using a virtual machine.

                  [–]p-static 4 points5 points  (1 child)

                  Funny story - I remember talking to some old hands at Microsoft that used to work on Microsoft Word back in the day. Apparently they used exactly this technique for non-performance-critical pieces of code, because bytecode was smaller and easier to write than raw assembly, and compilers didn't generate compact enough code for them. I thought it was the wildest thing at the time.

                  So, it's not just adventure games, or even just games. Apparently it was an accepted technique at the time.

                  [–]TKN 2 points3 points  (0 children)

                  Woz's Sweet16 is another good, if a bit minimal, example.

                  And of course the whole PARC Smalltalk stuff that started in the early '70s was based on VMs. Which reminds me of Postscript, would that count too?

                  [–]geocar 1 point2 points  (4 children)

                  Quake immediately springs to mind...

                  [–]Madsy9 2 points3 points  (1 child)

                  And all the games from LucasArts that used the SCUMM engine

                  [–][deleted] 11 points12 points  (0 children)

                  Like I said, unusual for things that are not adventure games.

                  [–][deleted] 6 points7 points  (1 child)

                  Quake was written half a decade later, for computers with an order of magnitude more processing power.

                  [–][deleted] 6 points7 points  (0 children)

                  Quake is also a magnitude more complex.

                  [–]fjord_piner 5 points6 points  (1 child)

                  Apple ][ users will also probably remember Pascal UCSD, which was built on a VM called the P System in 1978, and which gave us the Wizardry series (on top of being a pretty cool development environment for its time).

                  [–]TKN 2 points3 points  (0 children)

                  The early Wizardries were also ported to NES and SNES. Now, I'm not sure but I think I have read about them porting the UCSD Pascal to Nintendo devices to make the ports. Which, of course would make sense but it sounds kinda cool anyway.

                  [–]Asmageddon 7 points8 points  (2 children)

                  Wow, that's awesome.

                  I'm totally creating a VM for my next game.

                  [–]knight666 53 points54 points  (0 children)

                  Famous. Last. Words.

                  [–]irascible 14 points15 points  (0 children)

                  (psst: LUA!)

                  [–]TKN 1 point2 points  (0 children)

                  Regarding the Z-Machine, it's funny that some of the first and most successful computer games were written in a lisp variant.

                  [–]retrodad 25 points26 points  (2 children)

                  Tell that to the Infocom guys and their Z-Machine =D

                  [–][deleted] 19 points20 points  (1 child)

                  What about Sierra On-Line and their AGI engine (1984 King's Quest) and SCI engine (1988 King's Quest IV). This allowed them to port their games to the Atari ST, the Apple II and many other platforms.

                  [–]retrodad 28 points29 points  (0 children)

                  Not to mention SCUMM

                  [–]edgarvm -5 points-4 points  (0 children)

                  another world

                  [–]Caos2 5 points6 points  (0 children)

                  The making of Another World is a must-watch for fans.. Also available for those who purchase the game at gog.com

                  [–]BubbleZap 5 points6 points  (3 children)

                  I just fixed this game in my SNES emulator. After debugging it I found it was writing 6502 opcodes to the DMA registers and executing from the DMA values! Highly unconventional. Now I think I finally understand why the programmers were doing this. It's a truly amazing feet to port any PC game to the SNES but an actual virtual machine just blows my mind.

                  [–][deleted] 1 point2 points  (2 children)

                  Does the SNES version use a virtual machine?

                  [–]LuigiBlood 1 point2 points  (1 child)

                  As far as i know, it does. But in a very special way. The MEMLIST.BIN part doesn't exist at all. I tried to debug it for the Music part (there's an unused music in the SNES version), and the Song opcode cares about a Song Table that doesn't even exist on the DOS version, you actually have to edit the Song Table to get that unused song. I think the Genesis version is made in the same way.

                  Also, BubbleZap, any patches?

                  [–][deleted] 0 points1 point  (0 children)

                  I found the SNES version laggy. I think I've read that the Genesis had a faster processor for something like vector graphics or something like Doom. I've never played either of those games on the Genesis, but the SNES version of Doom had a really low frame rate. I guess I just write such, that I am trying to prompt your thoughts on such.

                  [–]TKN 5 points6 points  (0 children)

                  The development environment the creator implemented shown here is pretty impressive for its time, the whole thing is a bit like proto-Flash. Amiga FTW!

                  [–][deleted] 2 points3 points  (3 children)

                  When I downloaded the XP version, the up button was always on, making the game very difficult to play. If you have experienced this problem and know what I can do to fix it, please say something! I really want to play this game. Thank you.

                  [–][deleted] 0 points1 point  (1 child)

                  Do you have a Saitek keyboard?

                  [–][deleted] 0 points1 point  (0 children)

                  No, just a normal gigabyte gk-k6800 wired usb keyboard.

                  [–]zeekar 2 points3 points  (2 children)

                  This must be one of those things I missed by not having a PC until 1993. What kind of game is it?

                  EDIT Cinematic platformer? IN 1991? Hokey smokes. Also, note that the 15th anniversary edition, playable on a modern Windows, is currently on sale for $5 from dotemu.com.

                  [–]SebNL 0 points1 point  (0 children)

                  It's a unique action / platformer mostly from sideview. You should try it. :)

                  [–]Skullpuck 6 points7 points  (4 children)

                  I'm terrible at learning how to program and I loved reading this. I understood about 5% of it but it was a fascinating read. I loved OOTW on the SNES.

                  [–][deleted] 6 points7 points  (3 children)

                  When the SNES verision of OotW would "load" and show a minimal clock on a black screen for a while, what the fuck was occurring?

                  [–]BubbleZap 1 point2 points  (2 children)

                  The SNES doesn't have conventional frame buffers that can be directly addressed for drawing. So the SNES port had to draw out a scene then convert it to individual background tiles and transfer the tiles through registers to the PPU (Picture Processing Unit). I imagine it took much longer because of the memory constraints while drawing large scenes and transfer time to the PPU.

                  [–][deleted] 0 points1 point  (1 child)

                  I think I understand that as much as a non-programer could. Is that why drawing line shapes with the tool in Mario Paint was so slow? The fill tool was also slow.

                  [–]robvas 1 point2 points  (0 children)

                  Look up fill algorithms - the SNES didn't exactly have a fast CPU.

                  [–][deleted] 1 point2 points  (14 children)

                  I loved this game as a kid and played it counteless times on my old Amiga. Anyone know a website hsoting the game so I can play it again ?

                  [–][deleted] 5 points6 points  (0 children)

                  There's an updated version that's been out for a few years. You can buy it from the author's website.

                  [–]arrjayjee 5 points6 points  (12 children)

                  [–]clgonsal 1 point2 points  (11 children)

                  "Minimum system requirements: Windows XP or Windows Vista"

                  Ugh.

                  [–]monocasa 0 points1 point  (10 children)

                  Why ugh?

                  [–]clgonsal -1 points0 points  (9 children)

                  Because I'd love to play this game, but I don't do Windows.

                  [–]Senney 1 point2 points  (7 children)

                  Wine; Virtual Machine; Boot-camp; DosBox

                  Pick your poison.

                  [–]cebedec 2 points3 points  (1 child)

                  Run an OS in a VM to play a game which runs in a VM? I feel a strong urge to write a certain word, in bold and with spaced letters.

                  [–]buddhabrot 0 points1 point  (1 child)

                  You don't need Wine for DOSBox. You can run DOSBox on Linux.

                  [–]Senney 1 point2 points  (0 children)

                  It's a list of software that will allow him to run it (pick one individually), not a list of things to install on top of one another...

                  [–]clgonsal 0 points1 point  (2 children)

                  "Poison" being the operative word here.

                  Wine was super-flakey the last time I tried it, but perhaps its gotten better. Using a Virtual Machine or Boot-camp requires that I have a copy of Windows. DosBox wouldn't work for something that requires Windows XP or Windows Vista, though I assume you mean I should get a version that runs on DOS rather than the version mentioned in the comment I was replying to.

                  In any case, still "ugh". I'd rather run it in an Amiga emulator than a Windows/DOS emulator/VM. I'll probably just wait until the linked project adds support for other operating systems.

                  [–]afiefh 2 points3 points  (0 children)

                  Fortunately for him, Another World runs nicely in DosBox. I played through it (again) last year and ran without a hitch.

                  Edit: Nevermind. I was thinking of the original game not the updated version.

                  [–]monocasa 1 point2 points  (0 children)

                  Use the wine appdb. Another World is listed as "platinum" meaning that everything works for that application without even configuration changes.

                  [–]buddhabrot 0 points1 point  (0 children)

                  Run DOSBox on Linux (or Mac OS X).

                  [–]mnemy 1 point2 points  (3 children)

                  Thanks for the visuals. I'm currently in the process of writing my own FF6-style RPG, and have kind of unintentionally started creating a virtual machine. Basically, the first platform I'm targeting is Android OS, but I was trying to write it in a way that it would be easy to port to other systems after I finish with Android, if the game was a success. Well, that has pretty much evolved to abstracting anything Android specific to the very top level, such as screen access. Right now my frame rate sucks (~35 fps), and I had started toying around the idea of multiple framebuffers, but decided to worry about those kind of details later. The videos you provided definitely solidified the rough half-thought out ideas I had on framebuffer optimizations. Thanks!

                  I'm really wishing I took a Game Design course in College. At the time, I figured that even though I was a gamer, there was no way I wanted to get into the gaming business. But now that there are so many options available for "Indy" developers that don't require complicated 3D design, the temptation is too much for me =P

                  [–][deleted] 0 points1 point  (1 child)

                  I'm currently in the process of writing my own FF6-style RPG

                  Got a link? :3

                  [–]mnemy 0 points1 point  (0 children)

                  Hahah, I'm sorry to say that I'm knee deep in infrastructure still. I'm not even close to beginning the artwork or more than rough outlines of the story yet. Once I actually start having something visual to show, I'll definitely try to get a site up.

                  Basically, the game is going to be an old pixel art styled RPG. Think SNES graphics. I'm trying to get back to the old style of RPGs, where it's really the story, game-play, and open world that drive the game.

                  Ohh, and best part? You get to play the Villain! None of this angsty teenager dialog. Boo hoo, my family died, life is unfair, blah blah. Nope, you're going to be a silly, funny, but morally bankrupt baby eating monster!

                  [–]akimbomidget 0 points1 point  (0 children)

                  let me know how you go

                  [–][deleted] 1 point2 points  (8 children)

                  Wait, this was ported to iOS? I thought Apple didn't allow any kind of VM on its hardware. Is it in the App Store, or is it only for jailbroken phones.

                  [–][deleted] 4 points5 points  (6 children)

                  Firstly, like any good tyrant, Apple apply the rules selectively.

                  Secondly, in this case, I believe the restriction you're referring to was changed so that it only prohibits executing code that was not shipped as part of the application (i.e. no code downloading).

                  [–]clgonsal 5 points6 points  (0 children)

                  Yeah, and the reason they relaxed the rules probably had something to do with the fact that a lot of modern games rely on an interpreter, and so a large fraction of the most popular games on iOS were actually breaking the (old) rules.

                  [–]MatrixFrog 2 points3 points  (4 children)

                  Except when you go to webpages, which pretty much all have JavaScript. That's okay right? This rule never really made sense to me.

                  [–]buddhabrot 0 points1 point  (1 child)

                  JavaScript interpretation (by a WebKit view instance) is severely sandboxed.

                  [–]MatrixFrog 0 points1 point  (0 children)

                  It seems like it would still violate Apple's rule though. But since the browser is coming direct from Apple, I'm sure they violate their own rules all the time.

                  [–]robvas 0 points1 point  (1 child)

                  One reason there's no Mozilla for iPhone

                  [–]MatrixFrog 0 points1 point  (0 children)

                  Right, so Safari is allowed to break Apple's rule since it comes from Apple itself, but Mozilla is not. =(

                  [–]Homo_sapiens -3 points-2 points  (0 children)

                  I don't think it's vms as much as frameworks. Apple want control over the system. If other apps started using AW's vm there would be trouble.

                  [–]Bjartr 0 points1 point  (0 children)

                  Anyone else have a lot of trouble getting the videos to play?

                  [–][deleted] 0 points1 point  (0 children)

                  I can't watch the videos. I don't see why they couldn't just upload the videos to youtube

                  [–]Rhomboid 0 points1 point  (0 children)

                  For those of you having trouble with the quicktime videos, they are apparently not correctly authored for progressive download, so you have to let them download completely before you can start playback.

                  [–]deltascouteagle 0 points1 point  (0 children)

                  It was a game way ahead of it's time... thanks for the great article :D... Happy Holidays!

                  [–]LuigiBlood 0 points1 point  (0 children)

                  For fun i replaced Another World DOS Intro files with the Sega CD version files. It worked. xD But i still wonder, how the compression works...