Is mode 7 possible?

Get help using Construct 2

Post » Wed Jan 30, 2013 5:23 am

@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 ;)


B
45
S
12
G
7
Posts: 339
Reputation: 7,899

Post » Wed Jan 30, 2013 5:53 pm

Well she's lucky to have you, its a great way for you two, to connect in the future

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

[QUOTE=damainman] @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 ;)


[/QUOTE] retrodude2013-07-03 22:31:47
B
18
S
4
G
3
Posts: 436
Reputation: 4,801

Post » Thu Jan 31, 2013 6:21 am

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/
B
45
S
12
G
7
Posts: 339
Reputation: 7,899

Post » Thu Jan 31, 2013 7:34 am

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:
http://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

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


[QUOTE=damainman] 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/[/QUOTE]   retrodude2013-07-03 22:31:58
B
18
S
4
G
3
Posts: 436
Reputation: 4,801

Post » Thu Jan 31, 2013 5:52 pm

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!

B
45
S
12
G
7
Posts: 339
Reputation: 7,899

Post » Thu Jan 31, 2013 6:08 pm

@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!
B
15
S
5
G
7
Posts: 877
Reputation: 5,650

Post » Fri Feb 01, 2013 12:13 am

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.
B
45
S
12
G
7
Posts: 339
Reputation: 7,899

Post » Thu Jun 06, 2013 7:10 pm

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.
B
7
S
1
Posts: 33
Reputation: 623

Post » Thu Jun 06, 2013 7:11 pm

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
B
7
S
1
Posts: 33
Reputation: 623

Post » Mon Mar 03, 2014 9:46 pm

procrastinator wrote: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 ?
B
16
S
4
G
4
Posts: 179
Reputation: 4,688

Previous

Return to How do I....?

Who is online

Users browsing this forum: HeinRich, Zakeru and 24 guests