News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: On a scale of 1-10, the difficulty of randomizing a NES game is... 9?  (Read 706 times)

Torvik_Zith

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
Heya,
I'm suddenly captivated by the idea of playing a randomized Maniac Mansion for NES.  Would probably results in a broken game 9 times out of 10, but I think it would be loads of fun to try.
Of course, I can find no such hacks out there.
Nor can I find any information on how to create such.
Leads me to think it's a complicated endeavour.  Is that accurate?
Thanks!
Alan

Jorpho

  • Hero Member
  • *****
  • Posts: 4549
  • The cat screams with the voice of a man.
    • View Profile
Technically, it would probably be a lot easier than most things. ScummVM can interpret the data from Maniac Mansion NES, so even if you didn't want to start with one of the computer versions instead, it might be feasible to move things around.

But conceptually? Can you give even one example of how that would work?  Changing even two items around can easily render the game completely unwinnable.

Also your subject line is frustratingly ambiguous and if you want to ask about Maniac Mansion, you should title your thread accordingly.
This signature is an illusion and is a trap devised by Satan. Go ahead dauntlessly! Make rapid progres!

FAST6191

  • Hero Member
  • *****
  • Posts: 2898
    • View Profile
A randomiser is basically a level editor* and maybe item placement editor with a bit of further logic (usually done in the editor itself and thus whatever language and performance restrictions you have for that, or basically infinite if doing it for a modern PC with a modern language) to ensure a path to winning the game, and maybe a couple of cheats to smooth things out.

*maybe not even that. In the average game if you can find the teleporter code that doors/exits/... function as and mess around with what sends what where then no great need to know all the rest of the items and their functionality if sticking with sliced up versions of the stock game, if doing further tweaks then that would mean further info.

For what is essentially a point and click type game where objects are made to interact with others to solve puzzles then yeah if one item is essential to unlock a door but will not be obtainable for a given layout then you are hooped. However as mentioned above you can chain some logic together to ensure something works. The setup can be broken down to unlock and door location for it so that is a reasonably simple thing to determine or maybe pair off in the randomiser itself.

Torvik_Zith

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
Technically, it would probably be a lot easier than most things. ScummVM can interpret the data from Maniac Mansion NES, so even if you didn't want to start with one of the computer versions instead, it might be feasible to move things around.

Cool, cool. 

But conceptually? Can you give even one example of how that would work?  Changing even two items around can easily render the game completely unwinnable.

I've won the game before.  The fun isn't in winning.  The fun is in playing my favourite childhood game in a new and SUPER challenging way.

Also your subject line is frustratingly ambiguous and if you want to ask about Maniac Mansion, you should title your thread accordingly.

Well, my subject line is extremely precise.  I know nothing about hacking roms.  Why bother asking about a specific game when (for all I know) the general process is WAY beyond my reach. 

So, for someone who knows nothing about hacking ROMs, randomizing MM would be "Really, really hard" or "regular type hard"?  In your opinion.  :)

Torvik_Zith

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
However as mentioned above you can chain some logic together to ensure something works. The setup can be broken down to unlock and door location for it so that is a reasonably simple thing to determine or maybe pair off in the randomiser itself.

So, if I don't know anything about ROMs and have little spare time, I should day dream about a different project?  ;)

Jorpho

  • Hero Member
  • *****
  • Posts: 4549
  • The cat screams with the voice of a man.
    • View Profile
I've won the game before.  The fun isn't in winning.  The fun is in playing my favourite childhood game in a new and SUPER challenging way.
You can't call it "challenging" if an item gets stuck somewhere where it can't be reached.

The way I see it, there's no way to do this except to completely map out every item and every interaction in the game and determine exactly which ones can be switched around while still allowing the game to be completed. You don't need any kind of hacking skills to do that – you could do it with pencil and paper if you wanted to. I think you'll find there are very few things that can be safely "randomized". (Also, by the time you are finished with the analysis you will probably be quite weary of your favorite childhood game.) This part isn't "hard"; it's just excessively tedious.

Quote
Well, my subject line is extremely precise.  I know nothing about hacking roms.  Why bother asking about a specific game when (for all I know) the general process is WAY beyond my reach.
Because every ROM is different.  In this case the game is already very well-understood compared to the overwhelmingly vast majority.
« Last Edit: July 30, 2020, 12:00:11 pm by Jorpho »
This signature is an illusion and is a trap devised by Satan. Go ahead dauntlessly! Make rapid progres!

FAST6191

  • Hero Member
  • *****
  • Posts: 2898
    • View Profile
So, if I don't know anything about ROMs and have little spare time, I should day dream about a different project?  ;)

If it was a random brawler type game with no expectation of carried pickups, experience or the like then that is one thing. Start moving into things where the design expects you to have stronger moves, unlocked existing items or the like and that gets harder to ensure a path (or at least you then also get to make a bunch of cheats or if doing it properly some kind of sense of your abilities/stats and nerfing accordingly a la left4dead or various things in elder scrolls).

As a my first hack type setup, ignoring the ensuring a path stuff, is it not unreasonable. Sure it will be harder than learning about tables and sprite editing but easier than a lot of other things, it essentially being a form of level editing. If it is the sort of thing that gets and keeps your interest then even better. I would also note boss rush is basically this without necessarily going to the extent of full bore randomisation so you can get much of it done and then move onto randomisation.
Start to have to account for the pathing type things and that gets far harder, however you can work out what needs to be where yourself and write code to handle that in whatever high level language you have going for you rather than having to do things within the confines of the system in question.

Torvik_Zith

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
You can't call it "challenging" if an item gets stuck somewhere where it can't be reached.

Sure I can!  Watch.  :D

"I'd really enjoy the challenge of figuring out if it's possible to achieve Objective A, even if it ends up impossible."

The way I see it, there's no way to do this except to completely map out every item and every interaction in the game and determine exactly which ones can be switched around while still allowing the game to be completed.

I was actually thinking about it in the shower today.  Like, if the front door key was inside the house... Game over.  (And, I'd agree: no fun.)
But if there was a zone labelled "Front of house" that covered, the opening 2 screens, and the parameters were Front Door Key had to be in "Front of House" then problem solved.  ("Damn, it was in the bush this time.  But the hamster was under the door mat!").
Then expand that out to the next set of locks (Pool door / Lab door / Green Tentacle landing) and all the ingredients for those doors were within "First floor" zone.
Then the last few items would just have to be negatives:
  • Glass jar cannot be in observatory
  • Can of Pepsi can't be in observatory
  • I think that's it.  Oh, small red key can't be inside an arcade game
Yeah, it's actually not that crazy.
  • Silver key can't be in pool area or garage
  • Wax Fruit and Fruit drinks can't be past Landing or in pool or garage
  • Anything to open the security door (tools, flashlight, radio, glowing key) can't be beyond the security door
I can probably think of a couple more, but...

(Also, by the time you are finished with the analysis you will probably be quite weary of your favorite childhood game.)

Ha.  Cute.  You underestimated me and my love for MM.  (I spent a month of night shifts adapting the whole game into a board game.  Tons of fun, except that I couldn't devise a mechanic to move the Edisons around the house properly.)

Growing up I didn't have the tenacity or grit to get good at games that challenged your skill.  Had to stick to games where dying was very hard, or else I would give up.  Look at me now, mom!  :woot!:

(Also, in grade 7, I made an audio recording of myself ... "doing the music" of Razor's theme.  That way, if I ever forgot how it went, I could listen to it remind myself how it went.  So lonely.  So pathetic.  :D )

This part isn't "hard"; it's just excessively tedious.

Now that I've started thinking about it, I can't stop.  :)

  • Do you think the radioactive zaps from the Meteor are tied to its sprite or location?  If location, then you could find him in the mailbox outside, and spend the whole game running around with him, looking for the yellow key
  • You'd have to be careful to make sure that an essential item isn't tied to giving Ed his package.  If the package was in the lab (I think the radioactive suit is the only pick-up in the lab), then whatever is in the film canister's place wouldn't show up until the end of the game
  • If Book Contract was swapped for an essential item, and you weren't playing with Wendy, you'd be hooped.  Contracts and developed plans would have to stay the same.  (Unless there was a way to swap out one character for another.  That'd be nuts.)
  • This would have to apply to just items placed in the game.  If you put the manuscript in the typewriter and have Wendy work on it, you can't have it produce Canned Goods, right?  Totally, because there would be no sprite for Improved Manuscript, because it doesn't get placed in the game.
  • "Ding dong". That must be my package.  Nope, it's a slimy, murderous meteor with some uncanceled hamster stuck to it.  (Like, what triggers Ed to pick-up the package?  "If package.location = front.house then remove package"?  In which case, if the postman dropped off batteries instead, Ed wouldn't pick them up, right?)
  • Since the bottle of developer fluid isn't an actual item, how would that work?  It would still be on the shelf, but when you pick it up, then a dime appears under the house, which you can pick up normally.  BUT in the desk drawer, there would be a puddle of developer fluid that you would need the sponge to pick-up.  the sponge would turn to developer fluid like normal after picking it up.
  • Waters wouldn't change, because again, it's not a placed item.  It just alters the glass jar when interacted with it.
  • Batteries would stay in the radio because they aren't placed in game; just in inventory.  Quarter would stay in the envelope. 
  • Would have to be careful about what could go into Edna's safe.
  • Make sure the paint remover wasn't in the attic.
  • Ohhh, I always wanted to know if there was something in the locker in Fred's office (game says it's locked).  I'm sure there isn't, but you'd have to make sure it's still not wired up as an item location since it's not openable.

See?  I didn't find that tedious at all.  :D

Using the cut-scene glitch, you can by-pass Purple Tentacle.  So the only REALLY essential items are:
  • the Front Door Key
  • wax fruit
  • fruit drinks
  • silver key
  • Yellow Key
  • Glowing Key
  • Key Card
  • Radioactive Suit

Would need to spend 6 minutes to rewatch that speedrun to double check that.  If memory serves:
  • Get past Green
  • Use hunk-o-matic
  • Get Silver key
  • Get Yellow Key
  • Drain pool
  • Get glowing key
  • Get key card
  • Go to dungeon
  • Use Glowing Key
  • type in 0000
  • Stand in Purple's room (I called in "the Vestibule" on my board game map)
  • ring door bell to trigger cut scene
  • Walk past Purple
  • Finish game using the car

Don't know if he did that all in 6 minutes, but it's a possible route, if not the shortest route.

Because every ROM is different.  In this case the game is already very well-understood compared to the overwhelmingly vast majority.

Fair.  I'm glad that something from so long ago still holds interest.  (I just assumed anyone looking at this would have been a 20-something year old and really into "classic" games you could only play on Play Station.  (Turned 40 a couple days ago.  Feeling old.  :) )
« Last Edit: July 30, 2020, 04:30:47 pm by Torvik_Zith »

Torvik_Zith

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
Start to have to account for the pathing type things and that gets far harder, however you can work out what needs to be where yourself and write code to handle that in whatever high level language you have going for you rather than having to do things within the confines of the system in question.

Do people still use QBasic??  In grade 8 (that's 1993 for those following along from home) I had SO MUCH FUN doing stuff in QBasic!

And a drip of HTML.  (Just find an example of what I want it to do, copy/paste/tweak, and I can get by.).

That's the level of proficiency I'm talking about over here.  :D

And I'm willing to learn stuff.  Just curious to know how steep this curve is before investing too much into it.


Torvik_Zith

  • Jr. Member
  • **
  • Posts: 6
    • View Profile
- For all intents and purposes, Edna's safe would be in the same zone as the observatory.  Don't place anything in there needed to grow the plant.
- Maybe essential items stay put.  That would eliminate a pick-up happening in the lab, I believe, since the suit would be in that locker.
- I wonder if they key card is actually under the hamster, or does it only show up after you pick it up?  I bet the former.
- Hamster guts is a placed item with its own sprite.  How crazy would it be if you had to put the hamster in the mircrowave in order to get a different item??  It's like a Kinder Surprise Egg.  You'll never know what's inside until you open it up!
- I just love the idea of the Meteor popping up in random places around the house.  Behind the loose panel.  On Edna's nightstand.  On the dining room table. 

- There's a text glitch that occurs when you open the envelope the first time.  It says that it ripped and is unusable.  I think in a previous build of the game, you would get that message if you tried to open it AFTER you sealed it.  I believe that option had been subsequently removed, but the line of text remains and is applied the first time you open it.  It'd be so gratifying to fix that.  (For a number of years I would stress over not being able to mail in the demo tape because the envelope always ripped when I tried to get the quarter out.  Never understood how to get around that or why it didn't affect the gameplay.  Now I understand better.)

Ok.  That's an hour and a half I'm not getting back.   :o

Jorpho

  • Hero Member
  • *****
  • Posts: 4549
  • The cat screams with the voice of a man.
    • View Profile
Re: On a scale of 1-10, the difficulty of randomizing a NES game is... 9?
« Reply #10 on: July 31, 2020, 12:05:42 pm »
Okay then.
I'm glad that something from so long ago still holds interest.  (I just assumed anyone looking at this would have been a 20-something year old and really into "classic" games you could only play on Play Station.  (Turned 40 a couple days ago.  Feeling old.  :) )
You are familiar with ScummVM, right? People are sufficiently enamored with these old games that they wrote from scratch a new interpreter for the game's data. It was principally made for the computer versions, but it also happens to support the NES version of Maniac Mansion.

Unfortunately, the developers were never interested in expanding it to develop new games and I kind of doubt they would be very helpful in this enterprise. But ScummVM is what you should start with, I think: look at the ScummVM code, see how it loads everything from the game's data into memory, and then see how you can re-arrange things after they've been loaded into memory. Like I said, this is already much, much easier than most typical ROM hacking since the human-readable source code is already at your disposal – but if you've never coded before and don't like modifying other people's code, then it's still tremendously difficult.

Once you've figured that out, then if you still wanted to, the last step would be to figure out how to write those changes into the game's data file before they get loaded.  And the very last step would be to figure out how to write those changes back to the NES ROM.  That could get tricky and I don't think there would really be much to gain above just running everything in ScummVM.

Do people still use QBasic??  In grade 8 (that's 1993 for those following along from home) I had SO MUCH FUN doing stuff in QBasic!
It has enough fans that there's something called QB64 (among others). But I would recommend Python to anyone looking for a programming language to start with these days.
« Last Edit: July 31, 2020, 12:26:39 pm by Jorpho »
This signature is an illusion and is a trap devised by Satan. Go ahead dauntlessly! Make rapid progres!