Is mode 7 possible?

1 favourites
  • hot diggity dog...

  • retrodude

    The way CC and C2 handle this stuff is different.

    CC actually has a Z plane so there is no extra crap required to do what I did for fake 3d. Like I said in an earlier post, it's nothing but converting the Y axis into Z and that's it. The Z plane is handled by CC. I posted the code in an older post above for CC. There is more to it than that like everything that needs to be on the Z plane is in a family and I believe the Z variable is part of the family as well. Then you add a number to Z like z=z+5 and that zooms the bits. Y converted to Z becomes the distance from the "Camera".

    None of this is technically "mode 7" except i use the mode7 plug in for the ground and sky in the C2 - it doesn't look nearly as good as the CC version though.

    My engine isn't finished. The CC one in theory can rotate 360 degrees but I have no need of doing that.

    The C2 one is only a few days old and completely unfinished. The way I'm handling the sprites angles of movement is an illusion. Everything is on a sprite that is 2000px wide and 224 high. The image point is set dead centre so when you zoom in on it, depending on where the actual image is placed within that 2000px sprite will depend on what angle it appears to be coming from.

    I'll post the C2 engine when I have it working to a level I'm happy with, as it is, it isn't handling the z plane for sprite properly and any attempt to correct it so far has cut the framerate down to 1/10th of the speed.

    I miss the CC sprite feature of for the z plane of placing an object in front of another etc. Most of the Z actions for sprites are gone. So this is a lot harder than it needs to be.

    Here's a vid of the CC version of my engine.

    Go!Go!Maddi! Welcome to the Fantasy Zone!!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Amazing work, I actually came across Go!Go! Madi! quite awhile ago and it looks professionally made, something you would see in a classic sidescroller, I absolutely love the design <img src="smileys/smiley4.gif" border="0" align="middle">

    Also I remember procrastinator mentioning something similar about a feature in CC that C2 does not have yet about displacement being possible in CC but not in C2. That would probably be vectors that aren't possible in C2 yet, I wonder if we can request it to Ashley or Tom.

    One more thing, its a bit off-topic, but JESUS do you know animate all your sprites? Because there well made.. It reminds me of the classic super nintendo graphics we all know and love <img src="smileys/smiley17.gif" border="0" align="middle">

    retrodude

    The way CC and C2 handle this stuff is different.

    CC actually has a Z plane so there is no extra crap required to do what I did for fake 3d. Like I said in an earlier post, it's nothing but converting the Y axis into Z and that's it. The Z plane is handled by CC. I posted the code in an older post above for CC. There is more to it than that like everything that needs to be on the Z plane is in a family and I believe the Z variable is part of the family as well. Then you add a number to Z like z=z+5 and that zooms the bits. Y converted to Z becomes the distance from the "Camera".

    None of this is technically "mode 7" except i use the mode7 plug in for the ground and sky in the C2 - it doesn't look nearly as good as the CC version though.

    My engine isn't finished. The CC one in theory can rotate 360 degrees but I have no need of doing that.

    The C2 one is only a few days old and completely unfinished. The way I'm handling the sprites angles of movement is an illusion. Everything is on a sprite that is 2000px wide and 224 high. The image point is set dead centre so when you zoom in on it, depending on where the actual image is placed within that 2000px sprite will depend on what angle it appears to be coming from.

    I'll post the C2 engine when I have it working to a level I'm happy with, as it is, it isn't handling the z plane for sprite properly and any attempt to correct it so far has cut the framerate down to 1/10th of the speed.

    I miss the CC sprite feature of for the z plane of placing an object in front of another etc. Most of the Z actions for sprites are gone. So this is a lot harder than it needs to be.

    Here's a vid of the CC version of my engine.

    Go!Go!Maddi! Welcome to the Fantasy Zone!!

  • So THAT'S why you're struggling with it now. I was trying to figure that out.

    From my experience in the past (multimedia fusion), working from the image point is not the way to go. you leave that on the base of your object.

    I start out with a center point sprite that represents the point of origin, when the object rezzes at the horizon, the X and Y instances are set to their destination X and Y (where they will be when they reach the front of the screen. the Z variable will be the percentage of the path from the point of origin to the destination. when an object is at 0, it will be a the horizon, and 100 will be at the front of the screen, scale at max. objects on the ground have a Y value as the bottom of the screen...

    the hard part is getting the formula right to make it look like 3D. when I'm not busy, I'll send you what I know

  • Jerbens

    That's the math I was messing with and gave up. I needed a way to figure out how to move the sprite from the horizon to the front and have it angled to the camera's pov. With your formula I can already see how to shift left and right which I can't do with mine...

    I'll give your formula a try tomorrow. I've worked all day and then sat down and tackled (and won) the z-order issue I was having without compromising the speed of the program. Far too much computer screen for my eyes...

    retrodude

    Thanks! Studied animation when I was younger, Haven't stopped drawing for fun since I could hold crayons. Used to try to make c64 games when was very young too. Took programming about 15 years ago... yup. I thought it would be cool to put a game together for my daughter when she's a little older - I've actually built an arcade cabinet from scratch for it too. Needs to be finished but she's only 2, I've got at least another year to spare ;)

  • Well she's lucky to have you, its a great way for you two, to connect in the future <img src="smileys/smiley17.gif" border="0" align="middle" />

    And as for the item displacement, I'll probably look into it a bit later seeing as I don't need it now. But I am still curious to know how it works so I will eventually give it a go.

    Jerbens thanks for your input, now we have some basis to work around with <img src="smileys/smiley4.gif" border="0" align="middle" />

    Jerbens

    That's the math I was messing with and gave up. I needed a way to figure out how to move the sprite from the horizon to the front and have it angled to the camera's pov. With your formula I can already see how to shift left and right which I can't do with mine...

    I'll give your formula a try tomorrow. I've worked all day and then sat down and tackled (and won) the z-order issue I was having without compromising the speed of the program. Far too much computer screen for my eyes...

    retrodude

    Thanks! Studied animation when I was younger, Haven't stopped drawing for fun since I could hold crayons. Used to try to make c64 games when was very young too. Took programming about 15 years ago... yup. I thought it would be cool to put a game together for my daughter when she's a little older - I've actually built an arcade cabinet from scratch for it too. Needs to be finished but she's only 2, I've got at least another year to spare ;)

  • Well - I've done the end bit and the start bit but not the middle bit LOL!

    I've created a demo with the objects set to invisible. I've now created a grid with a start point on the horizon with 11 image points - one for each row. And then at the bottom of the screen there is a similar object but much bigger also with 11 image points.

    I've created lines to show the angles from sprite1's image point to sprite 2's image point. I've manage to get everything lined up with the mode7 plugin sprites. You can rotate and move up down left and right.

    The object speed is 98% correct. But here is the problem:

    How the heck to I move a sprite by it's main image point along a line like that without using the bullet behavior? Bullet causes a crazy effect and half the time it doesn't detect what it's supposed to be doing...

    So yeah, there are two image points. I want to move a sprite from one image point to another without using Bullet Behavior. The other option is following the grid sprites but I don't think that's possible. I did it just to show that everything aligns according to the POV.

    Here is a link to the 3d grid demo, arrow keys move pov:

    http://designchris.com/3dtest2/

  • I'm not sure if this makes sense or if it will help you in anyway, but would it be possible to start off with a small object at a distant which then begins to increase in size. (I'm assuming your scaling the object anyways as it gets to the bottom of the screen)

    Then you calculate the width of each grid line and compare it to the sprites width. So if the sprites width is greater then the width of the line, or if the sprite is overlapping between the grid lines, then stop scaling sprite object.

    Heres an image of what I meant:

    img854.imageshack.us/img854/8827/gridlines.png

    I'm guessing every tick the object will have to be set in the same x coordinate between two of the grid lines.

    And as for the object moving, you can do

    Event: every tick

    Action: Sprite, Set Y to Sprite.Y + 1

    And then maybe an if statement if it goes past the grid lines when pressing left of right:

    Event: If Sprite.imagepointX is not overlapping grid line or

    If Sprite.X > Gridlines.X + 5

    Action: Sprite, Set X Sprite.X - 1

    If Sprite.X < Gridlines.X - 5

    Action: Sprite, Set X Sprite.X + 1

    So the sprite object would be doing two things to simulate the effect. One, its scaling in size as it gets bigger, and two, its going down the screen. Then using if statements we can avoid it from getting too big or getting past the grid lines which gets complicated as you might have to work with the instances of the gridlines to find out which gridlines to compare to which sprite.

    I guess its something we have to play with, I'm not quite sure yet since I have just recently started to play around with Rojos mode 7 plugin. Also I'm still fairly new with this concept idea of fake 3D.

    But you seem close damainman. I would be willing to give it a shot as well but I'm currently working on something else <img src="smileys/smiley5.gif" border="0" align="middle">

    But definitely keep us posted if you have any luck with it, it would help alot of people out

    Well - I've done the end bit and the start bit but not the middle bit LOL!

    I've created a demo with the objects set to invisible. I've now created a grid with a start point on the horizon with 11 image points - one for each row. And then at the bottom of the screen there is a similar object but much bigger also with 11 image points.

    I've created lines to show the angles from sprite1's image point to sprite 2's image point. I've manage to get everything lined up with the mode7 plugin sprites. You can rotate and move up down left and right.

    The object speed is 98% correct. But here is the problem:

    How the heck to I move a sprite by it's main image point along a line like that without using the bullet behavior? Bullet causes a crazy effect and half the time it doesn't detect what it's supposed to be doing...

    So yeah, there are two image points. I want to move a sprite from one image point to another without using Bullet Behavior. The other option is following the grid sprites but I don't think that's possible. I did it just to show that everything aligns according to the POV.

    Here is a link to the 3d grid demo, arrow keys move pov:

    http://designchris.com/3dtest2/

  • I don't that would quite work but it's very close.

    I don't have time to try this until after work but I think bumping the Ypos down at the speed of the zoom and getting the distance between certain grid lines at the scaling sprites Ypos might do it...

    If you just add 1 to the zoom or y pos it wont match the speed of the mode7 sprite. The y would be steady and the zoom slows down. The mode7 sprite scales on an angle and appears to go faster as it gets to the bottom of the screen despite the scale speed being steady.

    I have poor math set up to mimic the speed of the mode7 sprite but it's not 100% correct.

    Thanks for that math idea though, I think with my tweak it might work!

  • damainman, sweet Space Harrier example. You got much further than I did. I get bored easily ;p Looking forward to seeing this when you're done!

  • I've got it half working but calculating the distance between the two grid line sprites at the scaling sprites Y pos I'm doing wrong. Also the math for y=self.y+zsize isn't working every other sprite is jumping around like crazy... a long ways to go yet...

    How do I get this distance properly? In my head I see:

    Get spritegrid1xpos spritetree1ypos, get spritegrid2xpos spritetree1Ypos, subtract answer 2 from answer 1, divide new answer by 2, add this to spritegrid1xpos spritetree1ypos for spritetree1xpos...

    Makes sense to me... I also needed a nap a few hours ago.

  • This is really amazing Damainman looked through the file, I was thinking of faking it. I have a project I'm working on for the sake of learning construct and was thinking of using a colored block having it go up and down in the Y axis. From there I was going to funnel in a looped animtion of about 6 frames of the animation coming towards you and when the road would turn left or right randomly I would then funnel in another animation pass of the road turning left or right. Using another colored block going back and forth on the x axis.

  • Hoping you could share the capx with the working file once it's complete I would love to take a look at it and study it <img src="smileys/smiley1.gif" border="0" align="middle" />

  • Yeah I was being sarcastic with the screenshots, meaning if done with the canvas object, it'd be so slow it'd be like a slideshow ;p

    Well, the way I seen it done in Construct Classic was to take a sprite object and warp its vertices so it conforms to the perspective, so it looks like mode 7 ground. Pretty neat actually.procrastinator2013-01-12 02:12:26

    Hi , any news on your space harrier experiments ?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)