Saturday 18 June 2011

Magic Carpet re-release

On Thursday evening I discovered, after being alerted by a Facebook 'mention', that Magic Carpet had been re-released for Windows on gog.com. As I hadn't played it for a long time I paid up the $5.99 and downloaded it. It turned out it was 'just' the original packaged up with DOSBox but the price was right and I was very unlikely to get round to setting it up myself. That would have required all sorts of hassle like trying to work out where my boxed copy of the original is for a start.

Screenshot from the Edge review


It was weird to be playing a game I wrote the graphic engine for seventeen years ago and once I'd checked the manual to work out how to turn all of the options on, several things struck me. 

  • The reflections and animated water were pretty cool for the time. 
  • Stereo 3D with red/cyan glasses was (and still is) cool.
  • Stereogram mode was a stupid idea, specially when I got the maths so very wrong (1/z not z you idiot).
  • Sean had done a pretty good job of moving all that stuff around at a decent speed.
  • What to do at the start is so much more confusing than games these days.
  • DOSBox emulation of the 640x480 Vesa mode we used for 'high' resolution is really, really slow.
  • The draw distance is pretty pathetic.

Sadly, that last one is the thing that strikes you the most as you try to play. The fog really does seem to start just in front of your nose. I think I should warn anyone reading this that most of the rest of this post is probably going to turn into an excuse for this pathetic draw distance.

I had been working the Graphic Engine for Magic Carpet for a while. In fact, for the a year or so I was the only programmer working on it. It was aimed at 50+ Mhz 486 CPUs and pretty well optimised when you consider it textured with gourad shading and translucency. In my prototype version the tiles/triangles that made up the landscape were about 20 metres across and it drew, I think, 20 tiles before the fog faded it out completely. This meant you could see 20x20 = 400 metres before the fog faded the 'horizon'. Characters, trees, the lumps in the landscape and the speed of the carpet were all scaled accordingly.

then some smart arse decided it would be cool to make castles and things out of the landscape itself. These looked kind of cool but suddenly the tiles had to be the width of a castle wall or the walkway that the archers patrolled to defend it. Now the tiles were only about 2 metres across. The engine still only drew 20 tiles to the 'horizon' (I couldn't up this number and expect a decent frame rate on the target hardware) but 20x2 is only 40. The fog now kicked in at just 40 metres. characters were scaled up accordingly, the landscape smoothed out and the carpet's speed scaled up by a factor of 10. Suddenly it only took about a second or so to fly to the 'horizon'.

This sort of thing doesn't happen when you code games on your own...

Since trying to play it I've downloaded the mac version of DOSBox but haven't got round to trying it yet. Hopefully I'll be able to play in glorious 640x480 'HD' when I'm only using one level of emulation*. I had previously been running DOSBox (an emulator*) on Windows7 running on VMWare (an emulator*) on my iMac.

*Is it emulation when it's all related Intel CPUs? I really don't know. 

34 comments:

  1. My understanding is that a virtual machine running on a modern computer will just pass on the CPU/memory 'stuff' to the host hardware.

    DOSBox OTOH does emulate the hardware in software, hence we can run it on something like a PSP.


    In case the mac version of DOSBox is still slow, remember that you can increase the amount of instructions it tries to emulate each millisecond; use Ctrl+F12 to increase and Ctrl+F11 to decrease.

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
  2. I suspect there is something wrong with the VESA emulation though. 320x200 runs silky smooth. 640x480 is 2 or 3 FPS. I could understand it being almost 5 times slower but it seems to be at least 10x

    ReplyDelete
  3. Just want to say what a legend you are Glenn. The stuff you were producing back in the late 80's early 90's was utterly fantastic. I love Ground Effect too. Very underrated.

    ReplyDelete
  4. @robaal You were completely correct about the cycles thing! Thanks.

    ReplyDelete
  5. Cheers for the reminder for gog.com. I had forgotten the site existed.

    I'm going to have to go through my back catalogue now, starting with Evolva, the first game I ever tested.

    Happy days

    ReplyDelete
  6. can't you do something about that draw distance? i mean you did code the grafx engine, there must be a way to hack it up.
    or re-release an enhanced version ;)

    btw, there is a custom dosbox build with glide and d3d acceleration. with that, even mc2 is pretty fast in 800x600.

    ReplyDelete
  7. It would be trivial to fix with access to the source code, probably almost impossible without it.

    By the way, I can now name the 'smart arse' who decided to make those Castles out of the landscape and cause the reduced draw distance.

    He was bragging about how it had been a good idea! Barry Meade of http://fireproofstudios.com/

    ReplyDelete
    Replies
    1. Any chance to pursuade Bullfrog/EA to let you do this?

      Delete
    2. "probably almost impossible without it"

      Does it mean that EA still holds the source code of a 20+ years old game? Bastards.

      Delete
  8. I loved watching the castles rise out of the ground. It was one of the coolest parts of the game!

    ReplyDelete
  9. Magic Carpet 2 was (and actually, still is!) one of my most beloved games! It's a pity that no one had created remake or modern engine modification of this game. :(

    3D engine of this game was way ahead of its time when the first game was released. And some features (terramorphing) still amazes me to this day!

    I must thank you Glenn Corpes for countless hours of fun gaming!

    ReplyDelete
  10. This comment has been removed by the author.

    ReplyDelete
  11. What is better Laminate or real wood floors?
    wooden leg protection

    ReplyDelete
  12. I've been replaying this thanks to the GoG and DOS box version and it is such a nostalgia trip!

    At the time I didn't understand the game very well and mostly just watched my older brother play it but it was a wonderful early PC Gaming memory.

    ReplyDelete
  13. Wow just it is not just cool but also amazing. Thanks for sharing. You can read my article about
    Carpet Tiles Dubai
    Office Carpet tiles
    Office Carpet tiles in UAE

    ReplyDelete
  14. Nice and appreciable post. I love the stuff which you have been shared. Thanks for sharing
    We also deals in
    mosque carpet suppliers in dubai

    masjid carpets dubai

    along with Office Carpets
    Office Carpet Tiles Dubai

    ReplyDelete
  15. Worth to read! thanks for sharing, everyone will surely gain a knowledge from this! Keep posting an informative and helpful work like this. Btw, here’s also the office carpet cleaning service, you can visit and message our website offering services in affordable prices! thankyou!

    ReplyDelete
  16. It was gobsmacked blog! Don’t you know it? This work is kinda unique with others, my friends must see this. I will tell it when we have time for office carpet cleaning service.

    ReplyDelete
  17. This is a very unique writing! It’s really a nice day
    for me because I was searching about office carpet cleaning service then I ask my friend about it and recommend this blogs which
    I agree now that this is really unique and helpful to me!

    ReplyDelete
  18. Why your thoughts are so brilliant!? I really want what you're doing seems like you bring out the best in other people. Because lots of blog’s I’ve encountered was good but it doesn’t really encouraged people, for that I want to give you this office carpet cleaning service Singapore maybe you find it helpful somehow.

    ReplyDelete

  19. A really appreciable article related to carpets which contains really helpful material. keep blogging and thanks for this one.carpets in low price Dubai

    ReplyDelete
  20. This comment has been removed by the author.

    ReplyDelete
  21. for quality carpets, rugs and flooring stuff click here on carpets

    ReplyDelete
  22. Our store have huge collection of carpets. you can visit us just clicking on our site here. carpetsstore

    ReplyDelete
  23. amazing carpets at our store visit the site carpetstore

    ReplyDelete
  24. Our store have huge collection of carpets,rugs. Here we are introducing hand made rugs. you can visit us just clicking on our site. ModrenRugsDubai

    ReplyDelete
  25. Nice blog and absolutely outstanding. Keep trying for the best. Curtain Size Calculator

    ReplyDelete
  26. Here we are introducing hand made rugs. you can visit us just clicking on our site. ModrenRugsDubai

    ReplyDelete
  27. to know updated grossry rate click here pak utility

    ReplyDelete