idea for rotating large tile-map-like objects

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
idea for rotating large tile-map-like objects
by on (#145238)
Use a bunch of 32x32 sprites, arranged in a rotating grid. Each 32x32 sprite will represent a rotating 22x22 tile, but spaced 21 pixels apart so there are no cracks or holes between tiles.
Re: idea for rotating large tile-map-like objects
by on (#145239)
What now? Are you looking to do something like the title screen of After Burner II, except for no sprite scaling? If you are actually making it a textured surface with now holes in it, you won't be able to "tilt" it much before it starts to look crazy. What are you actually trying to use this for?
Re: idea for rotating large tile-map-like objects
by on (#145245)
I was thinking about having a boss bust a wall down.
Re: idea for rotating large tile-map-like objects
by on (#145246)
Like this?

EDIT: Here's a smoother hacked version.
Re: idea for rotating large tile-map-like objects
by on (#145251)
Busting down a wall sounds more like this.
Re: idea for rotating large tile-map-like objects
by on (#145264)
tokumaru wrote:
EDIT: Here's a smoother hacked version [of Sonic 1's special stage].

Wow, the hacked version is awesome, coming close to mode 7 of Cameltry/On the Ball.
Re: idea for rotating large tile-map-like objects
by on (#145268)
Sik wrote:
Busting down a wall sounds more like this.

Cool, I didn't know Ristar could do that.

Anyway, I was replying to the general rotating grid idea, not the specific wall busting example.

tepples wrote:
Wow, the hacked version is awesome

Interestingly enough, it seems that the code for the smoother rotation was in the ROM all along, and it can be enabled with a very minor modification. I wonder why they went with the choppy animation if they could have this.
Re: idea for rotating large tile-map-like objects
by on (#145274)
Because there aren't enough sprites for the walls to not look like crap while rotating - that hack is using double the amount of sprites for them I think (and even then it's noticeable, although if they used rounding when determining the angle to use it'd be less noticeable). Doesn't sound like much, until you realize that was right in the wake of mode 7 so any hint that it wasn't a true rotating map would have made Sega look really bad.

Also apparently the controls play a part on it too, although let's face it, those Special Stages are hell to control smooth or not =P
Re: idea for rotating large tile-map-like objects
by on (#145284)
The hack only remove a single asm instruction to get the smooth rotation up so the number of sprites is exactly identical to the original. Honestly the smooth rotation looks far better imo and even if they changed it for gameplay reason i believe they should have keep it smooth anyway, as you said control is crap even in the original, it probably does not make a big difference here.
Re: idea for rotating large tile-map-like objects
by on (#145292)
I mean the specific hack shown in the video, I know that to get the smoothness you only need to remove an AND instruction (or replace its operand with $FF, meaning it's doable with a Game Genie code if you want).
Re: idea for rotating large tile-map-like objects
by on (#145295)
I'm blown away that that smooth rotation is actually coded into Sonic 1 and not used. I think I can see why - it's hard to see in the video because the jerk playing it keeps jumping, but you can kind of see tiles slip slightly out of place as it rotates, making flat walls look not perfectly flat and such. It makes sense that they'd limit it to only increments that look perfect, but I'm still disappointed that they did it because it just looks SO GOOD rotating smoothly...

Seems like that's how you'd do rotating objects though, I can't think of a better way.
Re: idea for rotating large tile-map-like objects
by on (#145297)
You all realize that that's the iOS version, right? (I'm sure you guys already know you can't be Knuckles in Sonic 1, even with the Sonic and Knuckles cartridge.) The code isn't even based on Sonic 1's, it's based on Sonic CD's, so the bonus stage code was built from scratch.
Re: idea for rotating large tile-map-like objects
by on (#145303)
Oh.

Uh.

Is there video of actual Sonic 1 with the actual rotation hack?
Re: idea for rotating large tile-map-like objects
by on (#145306)
Khaz wrote:
Oh.Uh.

Not very impressive anymore. :lol:

Khaz wrote:
Oh.

Uh.

Is there video of actual Sonic 1 with the actual rotation hack?

It's only been made for iOS. The code apparently did something to where it inhibited the rotation from progressing for about 1 second and then it allowed it to jump to that position and then do the same thing. The person just got rid of that little bit of code so that it rotated smoothly. As for the original Sonic 1 doing the the same thing, I don't think anyone has even attempted it. It is definitely different from the iOS version when it comes to the code, so it wouldn't be as easy to make the hack because you'd have to code it from scratch. It's certainly feasible, it would just take a lot more animation.
Re: idea for rotating large tile-map-like objects
by on (#145308)
Ah. So there was never any smooth rotation in actual Sonic 1. I see...
Re: idea for rotating large tile-map-like objects
by on (#145311)
Yeah, sorry to be a buzz kill... :oops:

You did know that Knuckles wasn't playable though in Sonic 1, right?
Re: idea for rotating large tile-map-like objects
by on (#145313)
Oh of course, I've just seen so many hacks of the sonic games with Knuckles, Tails, even Amy in place of Sonic I just figured it was one of those. I thought the tiles looked a bit different.

But if we're taking about an iOS version here then it really has nothing to do with rotation on SNES or Genesis, right...? I'm assuming it would be trivial in whatever they programmed it in...?
Re: idea for rotating large tile-map-like objects
by on (#145314)
Khaz wrote:
Oh of course, I've just seen so many hacks of the sonic games with Knuckles, Tails, even Amy in place of Sonic I just figured it was one of those. I thought the tiles looked a bit different.

How did they get about the palette limitation? That's apparently why they didn't allow knuckles to be playable using the Sonic and Knuckles cartridge.

Khaz wrote:
But if we're taking about an iOS version here then it really has nothing to do with rotation on SNES or Genesis, right...? I'm assuming it would be trivial in whatever they programmed it in...?

Yeah, pretty much. I read that they used Sonic CD's source code, which obviously wasn't in asm if they could easily convert it to iPods and what not. I'm guessing it was written in C, which I imagine would be able to use on both.
Re: idea for rotating large tile-map-like objects
by on (#145317)
I guess I too misunderstood the deal with the smooth rotation.

Espozo wrote:
I read that they used Sonic CD's source code, which obviously wasn't in asm if they could easily convert it to iPods and what not.

What? SEGA hired a couple of Sonic fans to develop these games, and they used their own engine. Before making Sonic 1 and 2, they made Sonic CD, so that's probably what you read. No code from the old Sonic CDs (Sega CD or PC) was used.

[quoteI'm guessing it was written in C, which I imagine would be able to use on both.[/quote]
AFAIK, the original Sonic CD was coded in assembly, and the original PC port was in C, partially converted from assembly by an automated tool.
Re: idea for rotating large tile-map-like objects
by on (#145320)
tokumaru wrote:
What? SEGA hired a couple of Sonic fans to develop these games, and they used their own engine. Before making Sonic 1 and 2, they made Sonic CD, so that's probably what you read. No code from the old Sonic CDs (Sega CD or PC) was used.

Oops. :oops: Yeah, I must have misinterpreted it.
Re: idea for rotating large tile-map-like objects
by on (#145321)
Espozo wrote:
You all realize that that's the iOS version, right? (I'm sure you guys already know you can't be Knuckles in Sonic 1, even with the Sonic and Knuckles cartridge.) The code isn't even based on Sonic 1's, it's based on Sonic CD's, so the bonus stage code was built from scratch.

And you do realize that's precisely what I meant that this isn't a hack with only that line modified, right? (the font in the stage select is a dead giveaway)

If I recall correctly the line in question is basically AND #$FC, D2 or something like that (it trims off the bottom bits of the angle, basically). Deleting it or replacing the value with #$FF removes the artificial jerkiness.
Re: idea for rotating large tile-map-like objects
by on (#145322)
Sik wrote:
And you do realize that's precisely what I meant that this isn't a hack with only that line modified, right? (the font in the stage select is a dead giveaway)

Vs. the iOS version, or the original Genesis one? I own the original game, but I don't have the iOS version so I wouldn't know.
Re: idea for rotating large tile-map-like objects
by on (#145327)
The original (the iOS one doesn't even look similar).
Re: idea for rotating large tile-map-like objects
by on (#145332)
Wait, can you get smooth scrolling on the Genesis game by commenting the AND or not?
Re: idea for rotating large tile-map-like objects
by on (#145334)
I'm totally confused at this point. :oops:
Re: idea for rotating large tile-map-like objects
by on (#145335)
Yes it works, it's just that the hack that was shown did way more than just comment out that AND (new graphics, etc.). But yes, I've seen it done in other hacks too.
Re: idea for rotating large tile-map-like objects
by on (#145336)
Well, than it should be easy to do it on real hardware. All that really needs to be done is adding the new frames for everything and making it to where they play at the appropriate time.
Re: idea for rotating large tile-map-like objects
by on (#145369)
tokumaru wrote:
Wait, can you get smooth scrolling on the Genesis game by commenting the AND or not?


Of course we were talking about the Sega Genesis version, the IOS version already has smooth rotation by default, it does not need any hack for that.
Re: idea for rotating large tile-map-like objects
by on (#145375)
Stef wrote:
Of course we were talking about the Sega Genesis version, the IOS version already has smooth rotation by default, it does not need any hack for that.

I guess Espozo threw us off by bringing the iOS and Android ports into the discussion. So, the hack I linked to changed much more than the rotation smoothness, but that doesn't change the fact that a simple modification to the original Sonic 1 can make the rotation smoother.
Re: idea for rotating large tile-map-like objects
by on (#145379)
Sorry. :lol: (It is the iOS version though, so I assumed that when the person said they removed a line of code, they meant the iOS version. I'm actually surprised a smooth rotation hack hasn't already been made for the original Genesis game.)
Re: idea for rotating large tile-map-like objects
by on (#145384)
Espozo wrote:
It is the iOS version though

In the video I linked to? I don't think so... The video description begins with "Like the iOS version of Sonic 1", meaning this is NOT the iOS version of Sonic 1. I think it's just a hack with a lot of new art, and Knuckles has been ported over.
Re: idea for rotating large tile-map-like objects
by on (#145388)
I already mentioned that's the MD version's level select screen with an altered font =P

tokumaru wrote:
I guess Espozo threw us off by bringing the iOS and Android ports into the discussion.

Yeah, I'd have cut it short had I caught it earlier >.>; Especially since I've seen before what line was being talked about. I mean, honest mistake, but it took like a whole page =P

Espozo wrote:
I'm actually surprised a smooth rotation hack hasn't already been made for the original Genesis game.

It has been implemented in other hacks already. Not sure if it was implemented as its own hack, although given you can achieve it with just a Game Genie code if you really want, maybe it's pointless (and it's not like many people are fond of Sonic 1's special stages either).
Re: idea for rotating large tile-map-like objects
by on (#145391)
Sik wrote:
(and it's not like many people are fond of Sonic 1's special stages either).

I think this is where the opinion differs. I think a game based around the rotation of that game's special stage might be interesting, and so might some people who watched a fight scene in the film Inception. With the rotation cleaned up, it becomes more feasible and less of a gimmick.
Re: idea for rotating large tile-map-like objects
by on (#145402)
Yeah but a whole hack made around it (which would end up being something like Cameltry) would be a completely different deal than a hack that takes Sonic 1 as-is and just makes the special stages somewhat prettier (not even different). I doubt there's enough people interested in the latter.
Re: idea for rotating large tile-map-like objects
by on (#145407)
Yup, you guessed right. I actually bought a copy of On the Ball (the USA version of Cameltry) after playing the ROM and falling in love with it.

So now, back to the topic. For a game inspired by Cameltry, if you have mode 7, you can use mode 7. But if you don't, or if you just want an occasional rotating thing like the falling tree in Ristar, you can use this technique. One problem with using it to replace mode 7 is that you can't make a wall spanning the whole screen, as the 16-bit consoles have close to 100% overdraw, and you need about 200% to make this technique work with a screen-width wall. It might be viable on Neo Geo though.
Re: idea for rotating large tile-map-like objects
by on (#145417)
On the ball isn't even a fraction as bad as Sonic 1's special stages. (I own both games by the way.) Sonic 1 is the only one out of the three sonic games I never got all the chaos emeralds in. (You never even get to be Super Sonic, so why would I go through hell and back for nothing except the thought that I went through hell and back?)