Slashdot Mirror


Porting Lemmings In 36 Hours

An anonymous reader writes "Aaron Ardiri challenged himself to port his classic PalmOS version of Lemmings to the iPhone, Palm Pre, Mac, and Windows. The porting was done using his own dev environment, which creates native C versions of the game. He liveblogged the whole thing, and finished after only 36 hours with an iPhone version and a Palm Pre version awaiting submission, and free versions for Windows and Mac available on his site."

35 of 154 comments (clear)

  1. iPhone bandwagon by JustinRLynn · · Score: 5, Funny

    Pandering to the Apple fanboys like everyone else seems to be? Oh come on Aaron, would you jump off a cliff just because everyone else ... oh.

    1. Re:iPhone bandwagon by DamienRBlack · · Score: 5, Funny

      If only I hadn't spent all my mod points making my friends dig and climb.

    2. Re:iPhone bandwagon by TubeSteak · · Score: 4, Funny

      I think he's hosting the website on his iPhone.
      I managed to grab the page after hitting F5 a few times
      http://img713.imageshack.us/img713/8107/lemmings.png

      --
      [Fuck Beta]
      o0t!
    3. Re:iPhone bandwagon by Anonymous Coward · · Score: 3, Interesting

      I had a bad habit of bragging about my N900 -- WVGA screen, CortexA8 overclocked to 1.1GHz, and a touch-optimized Firefox derivative, it can do anything a laptop can do.

      The above link has cured me.

      (On second thought... does anyone's laptop actually handle that monster gracefully, either?)

  2. You can play coin-op arcade lemmings game in MAME by Joe+The+Dragon · · Score: 2, Informative

    You can play coin-op arcade lemmings game in MAME as well.

  3. Nice accomplishment! by Junior+J.+Junior+III · · Score: 3, Insightful

    See, this is what you can do with low level languages... IF you know your shit.

    --
    You see? You see? Your stupid minds! Stupid! Stupid!
    1. Re:Nice accomplishment! by SpazmodeusG · · Score: 5, Funny

      I'm getting old. I remember C being regarded as a high level language designed with portability in mind.

    2. Re:Nice accomplishment! by Junior+J.+Junior+III · · Score: 3, Informative

      Yeah, and it is, but it's still considered "low level" these days because it's awfully darn close to the metal. As compared to stuff like .NET or Java that runs on virtual machines or Common Language Runtimes.

      --
      You see? You see? Your stupid minds! Stupid! Stupid!
    3. Re:Nice accomplishment! by phantomfive · · Score: 4, Insightful

      Exactly.....I used to spend a lot of time learning different languages, comparing them, trying to figure out what was best, using all the features.......then one day I realized it isn't the languages so much that make the difference, it's how you use it. I don't regret learning a ton of languages because you learn new techniques and ideas from each one, but as long as you can encapsulate stuff and be flexible, the language is ok. With macros and functions and libraries, I can write code just as flexibly and nearly as quickly in assembly as I can in a language like Perl or Ruby.

      When the vast majority of your time writing code is taken up by debugging or refactoring, the language it's written in doesn't matter so much as the quality of the code that's written.

      --
      Qxe4
    4. Re:Nice accomplishment! by ToasterMonkey · · Score: 2, Funny

      iPhone apps are compiled using LLVM, which provides its own virtual machine, not unlike the JVM and CLR. Does that make C a high level language?

      That is just so wrong, it hurts to read it.

    5. Re:Nice accomplishment! by osu-neko · · Score: 2, Insightful

      I don't regret learning a ton of languages because you learn new techniques and ideas from each one...

      Eventually you reach the point where that's not really true anymore because you're pretty much seen it all. At that point, it doesn't matter which languages you "know" or don't, and have used in the past or not, you can sit down and write code in anything, even stuff you've never seen before, as long as you have a minimal syntax reference or some sample code handy.

      --
      "Convictions are more dangerous enemies of truth than lies."
    6. Re:Nice accomplishment! by Lifyre · · Score: 4, Funny

      Wrong as in factually incorrect or Wrong as in 350 pound man wearing a Sailor Moon costume?

      (You're welcome for that lovely image too)

      --
      I'll meet you at the intersection of "Should be" and "Reality"
    7. Re:Nice accomplishment! by Anonymous Coward · · Score: 3, Insightful

      Eventually you reach the point where ... [you've] pretty much seen it all

      That is so wrong on so many levels. The beginner thinks he knows everything. The well learned thinks he knows a lot. The expert knows that he knows nothing. This is true in programming as well. There are infinitely possible ways to design a language, and some are yet to come (though derived from current languages of course). There never EVER comes a point where one has seen it all.

    8. Re:Nice accomplishment! by TheRaven64 · · Score: 3, Informative

      Factually wrong. LLVM is a virtual machine in the sense of virtual architecture, not in the sense of virtual environment. Code for the iPhone is first compiled to LLVM intermediate representation (IR), which is machine code for a virtual architecture that has an infinite number of single-assignment registers and a structured (but simple) memory model. You can do various things with code in this form, but when you are targeting the iPhone, you generally run some optimisations, link a load of the modules together, run some more optimisations, and then compile the result to native code.

      Describing LLVM as not unlike the JVM or CLR is like saying that Pascal is not unlike Smalltalk.

      --
      I am TheRaven on Soylent News
    9. Re:Nice accomplishment! by GigaplexNZ · · Score: 2, Interesting

      Since when does C++ needs to be converted to C?

      Since it started - it was just a preprocessor. It's now changed though to compile directly. You could in theory write a compiler that goes straight from Java to machine code if you were really keen. In fact, that has already been done. It's not just the language syntax, the toolchain matters too.

    10. Re:Nice accomplishment! by jellomizer · · Score: 2, Insightful

      C was never a High Level Language. It was a more portable Lower Level Language. Sure it was above assembly (As Assembly isn't much of a program language, but but just a 1 to 1 translation to machine code) it was lower then COBOL, Fortran, Basic, Lisp, and many of the other popular languages at the time.

      The difference between higher languages and lower languages. isn't as much portability, while higher languages tend to be more portable, however a high level languge such as VB is less portable then a Low Language such as C. But more to the fact how much of the execution of the code is based on the compiler vs. the programmers understanding of the computer.

      Eg. in high level languges. you have string classes that do a bunch of cool things...
      in C. you have a pointer to a block of characters and any effects you need to do you need to code it yourself.

      Old Languages such as LISP where higher level and isolated the programmer from managing memory and handled it all itself.

      --
      If something is so important that you feel the need to post it on the internet... It probably isn't that important.
    11. Re:Nice accomplishment! by robthebloke · · Score: 2, Interesting

      - you don't know what code the compiler will emit, especially if you're optimizing. Given the bajillion optimization flags most compilers have, and the fact that they change across versions (for example gcc 4.4 has the graphite framework, gcc 4.5 has link-time optimization), you're either very smart and brave to take a guess, or just ignorant. You can look at the output of course, but that's hardly "predicting", and we're lazy anyway.

      Yes, but the more output you inspect, the more you get to know your compiler, and thus predicting the output becomes easier. (Actually you don't need to predict the output for 99.99% of cases, you only need to worry about C/C++ constructs that will cause performance problems. Once you've identified those sorts of bottlenecks [via a profiler of course!], avoiding them in future is fairly easy). I'm not sure about you, but personally I don't go and blindly enable every single new optimization flag with every time I get a new version of a compiler! I think the fact they change is largely moot to be honest

      - you don't know the state of RAM, with regards to swap
      - you don't know the state of the CPU cache
      - you don't know what microcode the CPU has, or what it's actually doing under the hood


      A touch pedantic imho (and not entirely accurate). Those are specific to programming on a modern CPU/modern OS, and apply to any language. If you want to know all of those things, don't use a modern CPU or os....

      - at any given point in time, you don't know how long it will take to execute the next instruction (hint: scheduling, possibly powersave)

      What does scheduling have to do with an instruction timing? It sounds like you are working on the assumption that a thread can be suspended mid-op? Anyhow, if an instruction executes, it executes in 'n' cycles, with a latency of 'p' and a throughput of 't'. Those are known values for all CPU's. If the CPU has been throttled back via speedstep, then it still takes 'n' cycles, with a latency of 'p' and the throughput remains the same. The only thing that changes is the time for a cycle, but do you really want to be measuring your code performance in seconds? Fine for us console developers i guess, but not so great for your average PC.

      Also worth pointing out, that there is always a counter-example. If you want to measure your code in terms of ops, get an ATOM ;)

    12. Re:Nice accomplishment! by csartanis · · Score: 2, Funny

      And the GP responds to AC as AC. Amazing!

    13. Re:Nice accomplishment! by Lunix+Nutcase · · Score: 2, Insightful

      I can actually predict what the machine is going to do when I write a line of code!

      Doubtful. With all sorts of branch prediction and pipelining going on in a modern CPU it is extremely hard to know what the cpu is really going to do at any moment. This is why when Intel, for example, publishes latency and throughput of assembly instructions that the numbers they provide actually just rough approximations.

    14. Re:Nice accomplishment! by wood_dude · · Score: 2, Interesting

      With a good macro assembler you can quite easily create your own higher level language. I've done that several times. Porting a game in the old 8/16 bit days from 6502/6809/z80/68000 was just a set of assembler macros for each low level operation of your game creation langauge. Only a few specific time critical bits of code ever ended up in true native, mainly the blit code. Porting games even in assembler was quite quick, you just had to start out with the correct technique. All thoses guys that wrote piles and piles of hand crafted native assembler without useing the macros we're just crazy.

  4. Copyright? by PyroMosh · · Score: 4, Interesting

    Okay, so Lemmings isn't public domain. The owners may have turned a blind eye to DHTML Lemmings, and other small projects, but how do you expect to get approved for the Palm and Apple App Stores?

    IIRC Psygnosis owns the rights to Lemmings. Also IIRC, Psygnosis is now owned by Sony. Unless Psygnosis was only the publisher for a third party I'm not aware of.

    Good luck with that.

    1. Re:Copyright? by Tacvek · · Score: 2, Informative

      I have no idea Who retained the copyrights, by if it was the developer, then Rock Star North would be the current identity of the developer, so Take-Two Interactive would be the people to ask, not Sony.

      --
      Stylish sheet to fix many problems in Slashdot's D3: https://gist.github.com/801524
    2. Re: Copyright? by alex4point0 · · Score: 2, Informative

      PC/Amiga classic 'Cannon Fodder' was also recently ripped off (certainly from a look and feel perspective, and all reviews mention the likeness) as an iphone/itouch game Warpack Grunts - with no credit to the original coders on their website. Considering the original devs have their own mobile phone development company I doubt they would have allowed this, and I hope they have sicced their lawyers onto them. I doubt Apple look too closely for prior art and are more interested in counting the filthy lucre their Jesus phone is piling up at their feet.

      --
      By the time you finish reading this sentence will end.
    3. Re: Copyright? by danielsfca2 · · Score: 3, Insightful

      I doubt Apple look too closely for prior art and are more interested in counting the filthy

      Oh, so today we're mad at Apple for dastardly approving apps that they should have rejected on the grounds of software look-and-feel... because that totally holds up in court, not to mention it's totally Apple's job to ensure that every app has no resemblance to any other software ever published. Got it!

      I'm glad you posted, because I think I missed that memo and was still cursing those Apple jerks for rejecting too many apps, because "All Apps Deserve To Be Approved" and "Apple Is Oppressing People With Their Walled Garden."

    4. Re:Copyright? by DreadPirateShawn · · Score: 4, Insightful

      IIRC Psygnosis owns the rights to Lemmings. Also IIRC, Psygnosis is now owned by Sony. Unless Psygnosis was only the publisher for a third party I'm not aware of.

      Good luck with that.

      Not a bad résumé tactic though, however you look at it. If I had an interviewee who ported a game for kicks in 36 hours, I'd certainly file that in the "pros" column..

    5. Re: Copyright? by blincoln · · Score: 2, Insightful

      Oh, so today we're mad at Apple for dastardly approving apps that they should have rejected on the grounds of software look-and-feel... because that totally holds up in court, not to mention it's totally Apple's job to ensure that every app has no resemblance to any other software ever published. Got it!

      This isn't a game that looks vaguely like the original Lemmings and has somewhat similar gameplay mechanics. It's an exact copy that uses the "Lemmings" name and logo.

      --
      "...always new atoms but always doing the same dance, remembering what the dance was yesterday." -Richard Feynman
  5. Re:But can he actually publish his iPhone version? by wampus · · Score: 3, Insightful

    Only if you are Adobe or someone else on Steve-O's shit list. They relaxed the rules to be even less consistent and harder to predict.

  6. CORAL CACHE by Qubit · · Score: 2, Informative

    Here's the link for the coral cache copy....now let's see if we can get the page loaded into the cache...

    --

    coding is life /* the rest is */
  7. Re:Android please? by lightversusdark · · Score: 2, Interesting

    After another 36 hours spent wrestling the Android audio APIs he will admit defeat.

    --
    "There is nothing nice about Steve Jobs and nothing evil about Bill Gates." - Chuck Peddle
  8. Re:Wrong language? by Graff · · Score: 3, Informative

    Didn't Apple have some anti-competitive rules that allowed only Objective-C to be used in programming for the iPhone?

    Objective-C is C. Objective-C is a strict superset of C so there's no difference between C code and Objective-C except for the extensions that Objective-C has added.

    Even if Objective-C didn't include all of C it would still be OK. Apple allows iOS apps to be written in Objective-C, C, and C++. These languages were chosen because they are supported under Apple's API for iOS.

  9. The Game that Made DMA Design by snap2grid · · Score: 5, Interesting

    One of my claims to fame is that I was working for DMA Design when they created the original Lemmings (Dundee, Scotland), released on Valentine's day 1992. I did some conversions of the Amiga graphics to the PC (EGA!) and Atari Lynx. In the victory screen, there's a pic of the developers including myself! Needless to say, a lot of what is written on the net isn't quite correct. Great to see that it's still well thought of and in fact it's even part of a museum exhibit in Dundee (McManus Galleries) (You *really* know you're old when your photo is in a museum!) You can find the history of Lemmings (and DMA) here. http://www.dmadesign.org/ and some of my musings from that time here http://www.stevehammond.org/

  10. Looking forward to the Android port by Spacelem · · Score: 4, Interesting

    It would be great if I could play my favourite game on my phone!

  11. I am older, I remember why C is called C by SmallFurryCreature · · Score: 2, Interesting

    You know you are old when B is more then just a brief bit of history in the front of a C book.

    To be fair I only knew it from a porting project. I am not THAT old... I am young enough to remember when C was new and exciting... no we did NOT ride dinosaurs to work.

    --

    MMO Quests are like orgasms:

    You may solo them, I prefer them in a group.

  12. Re:No love for Lemmings 2? by wjsteele · · Score: 5, Funny

    The basic problem is that One person liked Lemmings first... then everybody else followed him!

    Bill

    --
    It's my Sig and you can't have it. Mine! All Mine!
  13. Re:Android please? by lightversusdark · · Score: 2, Interesting

    Flamebait? Sheer fanboyism! Android bug 3434 is a showstopper.
    Audio is critical for telephony and the media functionality expected of a smart phone, and Android's basis in Linux is only highlighting the sorry state of Linux audio.
    Hopefully this may spur Google to develop something along the lines of CoreAudio that could be used in Linux as well as just Android and rid us of the ALSA, Jack, OSS, etc. mess that represents the worst of Linux.

    --
    "There is nothing nice about Steve Jobs and nothing evil about Bill Gates." - Chuck Peddle