Author Topic: Metroid (NES) source code released  (Read 25369 times)

0 Members and 1 Guest are viewing this topic.

Offline Zera

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 737
  • Rating: +82/-7
  • Monochrome Artisan
    • View Profile
Metroid (NES) source code released
« on: April 14, 2010, 11:23:36 pm »
Relevant link

Just thought someone might be interested in this, possibly for reference or educational value. I know there have been a few Metroid-based projects for TI.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Metroid (NES) source code released
« Reply #1 on: April 14, 2010, 11:32:47 pm »
Nice, did Nintendo did the release? I wonder how legal it is to provide any ROM hacks that contain parts of this code? That said, maybe it doesn't matter much though, else that site may not have hosted it :P. It could be useful if someone wanted to do a calc Metroid indeed

Offline Zera

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 737
  • Rating: +82/-7
  • Monochrome Artisan
    • View Profile
Re: Metroid (NES) source code released
« Reply #2 on: April 14, 2010, 11:56:22 pm »
I'm pretty sure it was created through reverse-engineering. I recall a utility being released a while back that could basically reverse-engineer the source code of NES games through a mostly automated process.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Metroid (NES) source code released
« Reply #3 on: April 14, 2010, 11:58:36 pm »
Interesting. I bet hardcore programmers could find rather funky stuff in some games sources, such as how randomizing works for example

Offline willrandship

  • Omnimagus of the Multi-Base.
  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2953
  • Rating: +98/-13
  • Insert sugar to begin programming subroutine.
    • View Profile
Re: Metroid (NES) source code released
« Reply #4 on: April 15, 2010, 12:26:17 pm »
Honestly, though, the Metroid NES engine sucked. No offense, but even the GB version let you shoot low to the ground. The best one was probably the SNES version,

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Metroid (NES) source code released
« Reply #5 on: April 15, 2010, 04:25:27 pm »
Yeah true. PLus some maps were so repetitive. Old games engines are typically crappy, since the old consoles were so limited in power, they had to keep collision detection to a minimum. This is why for example in SMB you could go through walls when jumping backwards and stuff like this. But hey, it was in 1986 after all :P, back in the days this was probably the best platforming shooter around :P. IN 1986 I just came to birth and the Atari 2600 was still around.

Offline TravisE

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 182
  • Rating: +33/-0
    • View Profile
    • ticalc.org
Re: Metroid (NES) source code released
« Reply #6 on: April 16, 2010, 09:31:55 am »
Nice! I like to collect stuff like this whenever I come across it. :) It's always fun to look at how classic games were designed and programmed. Looking at this file, it looks like this was disassembled and reverse-engineered by somebody. Pretty well commented, too, so you can get some insight into how it works even if you don't know that particular ASM language.

I can think of many games I'd love to see files like this for but haven't found any yet. But I can imagine it takes a lot of time and work to document them like that.

Yeah, many classic games tended to have repetitive maps in order to conserve space. Games like Zelda I and II tended to reuse rooms a lot too. Super Mario Bros. I used a fascinating approach where patterns of blocks were defined and then levels were built using those patterns to save space. (I remember reading a discussion about that lost deep within the ticalc.org comment boards around a decade ago. Fun memories :)) Actually, Metroid does something similar IIRC. Actually, I think quite a few games used these types of schemes in general.

The cool side-effect of methods like that, though (especially in Metroid's case) is that if you take advantage of bugs in the game (or hack/cheat) to go outside the map and make the game load arbitrary non-map data as maps, you tend to see stuff that sort of makes sense and is more fun to explore, rather than just pure completely-random-looking gibberish.
ticalc.org staff member—http://www.ticalc.org/

Offline Zera

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 737
  • Rating: +82/-7
  • Monochrome Artisan
    • View Profile
Re: Metroid (NES) source code released
« Reply #7 on: April 16, 2010, 01:26:46 pm »
Quote
Super Mario Bros. I used a fascinating approach where patterns of blocks were defined and then levels were built using those patterns to save space.

A lot of NES games took this approach - including Metroid. Every object in a level could only consist of some predefined pattern of elements, as opposed to a single element (block) by itself. A single room was often mapped to several locations, which accounts for a lot of the redundancy. A palette-swap and the appearance of different enemies and / or items gave the room some discernible difference from other rooms like it.

This really must have saved some space, I imagine. If you think about rendering a level as hundreds of individual elements for each 16x16 block that makes up the ceiling, floor, platforms, etc. - it would reserve quite a lot of memory. Strictly defining entire patterns of elements as a single object would cut down on the number of objects significantly.

Offline Galandros

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1140
  • Rating: +42/-10
    • View Profile
Re: Metroid (NES) source code released
« Reply #8 on: April 16, 2010, 01:35:59 pm »
It would be cool to be released by Nintendo. :P

I don't remember any notable company releasing some source code of some old software or game but sometimes they release freely some old classic. One example is an Elders' Scrolls old game for DOS by Bethesda, IIRC. You can freely play now with DOSBox.
Hobbing in calculator projects.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Metroid (NES) source code released
« Reply #9 on: April 16, 2010, 05:07:20 pm »
Didn't Doom became open-source? I recall seeing it in the free FPS games section of Wikipedia before, but since it's Wikipedia maybe it was just misleading info.

Offline Zera

  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 737
  • Rating: +82/-7
  • Monochrome Artisan
    • View Profile
Re: Metroid (NES) source code released
« Reply #10 on: April 17, 2010, 03:19:47 pm »
Doom's source was released in '97, I think; but it wasn't released for DOS. I think someone had to port it over and then release the modified source.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Metroid (NES) source code released
« Reply #11 on: April 17, 2010, 05:07:21 pm »
IIRC it also required DOSBox, right? I remember trying Doom demo under Windows XP and getting like 4 fps x.x

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Metroid (NES) source code released
« Reply #12 on: April 17, 2010, 06:02:27 pm »
I know there is a Flash version of Doom somwhere on the internet...  I'll see if i can find it...

*runs off*

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55941
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Metroid (NES) source code released
« Reply #13 on: April 17, 2010, 06:36:24 pm »
On my side, if I get my hand on a full doom copy, I just use some mod normally with enhancements so it looks better and stuff. There's also the SNES version but I don't remember if it had aiming up/down
« Last Edit: April 17, 2010, 06:36:47 pm by DJ Omnimaga »

Offline Stephan

  • LV2 Member (Next: 40)
  • **
  • Posts: 23
  • Rating: +4/-4
    • View Profile
Re: Metroid (NES) source code released
« Reply #14 on: April 25, 2010, 12:48:02 am »
heh heh. Metriod source code.....many of these games consistently used repititive images and maps in order to save space. think how much more space would be needed to incorporate seperate images for EVERYTHING. i mean we are talking about an old low-memory 8-bit NES cartridge. Not a PS3 blueray disc. XD