HintMachine / hintMachine

HintMachine is a program giving hints for your Archipelago games.
MIT License
9 stars 11 forks source link

New Game: Super Hexagon #27

Closed chandler05 closed 8 months ago

chandler05 commented 8 months ago

Adds support for Super Hexagon

Quests:

nbrochu commented 8 months ago

Doesn't work for me. timeAddress is 0. Steam Version.

(Great choice of BK game this being said!)

chandler05 commented 8 months ago

Huh OK, I'll have to take a look at it. I tested in on the itch.io version so that may make it different? I don't know if that makes a difference or not. (Also, just to make sure, the quest doesn't start counting until more than 10 seconds have passed in a round)

chandler05 commented 8 months ago

Just pushed a change with a new (simpler) memory address that works for me. Give that a try and let me know if that still doesn't work for you.

Dinopony commented 8 months ago

I tested in on the itch.io version so that may make it different? I don't know if that makes a difference or not

It usually does. Itch.io provides DRM free versions of the games, whereas Steam versions usually initialize the Steamworks API to protect the game from being run without owning it on Steam + setting up overlay, achievements & stuff.

This means the binary (the .exe file) is usually not the same in the 2 versions, and since memory is not initialized in the same order, it doesn't end up at the same place.

chandler05 commented 8 months ago

Gotcha. Do we have a system for setting up different addresses for each platform in Hint Machine yet?

Dinopony commented 8 months ago

We don't have a magic method of doing it, but I like the way it was implemented in Metroid Prime Pinball.

1 Detect which version you are dealing with 2 Behave differently depending on the version

chandler05 commented 8 months ago

Ok, well the current version only works for itch.io then. I don't own the game on Steam, so if someone who did could implement it, that would be great

Dinopony commented 8 months ago

I could do it for Steam, but the timer is not easy to get since you cannot pause, and I wasn't able to find any pointer path because of that. Do you have any advice on how you found it for the itch version?

chandler05 commented 8 months ago

The time is stored as milliseconds, where each second is 60 milliseconds. The timer Memory is not reset after a run ends, so I end the run, calculate the integer value from the time I got, and use that to find the address after a run is over.

nbrochu commented 8 months ago

That makes me think @Dinopony, for multi-platform support, we could have some form of hashing based on the file path of the attached process, and decide on a pointer (or raise that's it's an unsupported version) based on that. Would be nicer than having duplicate entries in the game selection

Dinopony commented 8 months ago

The time is stored as milliseconds, where each second is 60 milliseconds. The timer Memory is not reset after a run ends, so I end the run, calculate the integer value from the time I got, and use that to find the address after a run is over.

Damn, that's what I did but I always ended up with several addresses and I could not find a single match for crossed pointer scans. I might try again later, but I'm a bit busy right now.

That makes me think @Dinopony, for multi-platform support, we could have some form of hashing based on the file path of the attached process, and decide on a pointer (or raise that's it's an unsupported version) based on that. Would be nicer than having duplicate entries in the game selection

A game should never have several entries in the game selection list / window, even if it supports several versions. It's up to the (unique) connector class to handle the various game versions. Having a hash could be useful though to quickly identify if we're facing the right version of the game 👍 I'll add an issue for that.