How do I pseudo 3d run game

Get help using Construct 2

Post » Sat Oct 24, 2015 1:20 pm

I need tips how start doing that type of game
http://www.marketjs.com/item/giant-hamster-run/en

Maybe someone already make that game or have simpliest template capx ?

I will be grateful for any help
B
109
S
26
G
46
Posts: 1,886
Reputation: 35,168

Post » Sat Oct 24, 2015 2:14 pm

In the add-on section of this forum there is a "Outrun" demo, but I dont think it is released yet.

I have a psudo 3d engine template for one of my older games. If you are interested PM me and maybe we can work something out. l also have a 2.5d runner template.

There is also Q3D plugin, but it is actually easier to just use Unity or U4E.
B
29
S
8
G
4
Posts: 767
Reputation: 5,985

Post » Sat Oct 24, 2015 2:49 pm

There have been various threads on pseudo 3D. Here's one: viewtopic.php?f=147&t=152190&p=962214&hilit=pseudo+3d#p962214
ImageImageImage
B
71
S
21
G
231
Posts: 3,688
Reputation: 129,352

Post » Sat Oct 24, 2015 5:29 pm

Looks like this game would be pretty easy to make once you've got the sprites..
I told my dentist I had trouble with my teeth and asked her to fix it without looking in my mouth..
B
54
S
16
G
8
Posts: 6,160
Reputation: 19,775

Post » Sat Oct 24, 2015 5:38 pm

LittleStain wrote:Looks like this game would be pretty easy to make once you've got the sprites..



Yeah, it only looks complicated. I had my template made in an afternoon after I got the sprites rendered from Blender. Once everything was in the editor, it was easy to visualize what I needed to do.

My friend was doing an isometric game, and he refereed me to this:
http://bigspritegames.com/isometric-til ... me-part-1/

I did the Z order the same way.
B
29
S
8
G
4
Posts: 767
Reputation: 5,985

Post » Sat Oct 24, 2015 9:05 pm

To do any 3d scaling like that you need to take into account z position.

when z=1 then the object is at the screen, if z=0 then it's at your eye. Usually you want to destroy/hide the object before reaching the eye.

Consider this example:
https://dl.dropboxusercontent.com/u/542 ... edo3d.capx

I just drew up some simple graphics. I placed the road so it disappears at a vanishing point (320,240).
I then placed the "building" sprites on either side of the road where I'd want them to be if they were at the screen. I then resized them so the edges match the edge of the road.
Looking at just the right "building" it has a position of (556,426) and a size of (161,105).

Next is the math part. We want it to move and scale as the z changes.

Set position to ((556-320)/z+320 ,(426-240)/z+240)
Set size to (161/z, 105/z)

In the above equations 320 and 240 is the vanishing point,
556 and 426 is the object's original position,
and 161 and 105 is the original size.
z is how far into the screen you want the object to be.

Z sorting can be done with something simple like:
for each sprite ordered by sprite.z ascending
--- sprite: move to back

Collision detection can be done by seeing if the z is in range of the other's z:

sprite: on collision with building
building: z > sprite.z-0.01
building: z < sprite.z+0.01
--- destroy sprite
B
92
S
32
G
107
Posts: 5,274
Reputation: 69,959

Post » Mon Oct 26, 2015 8:30 am

@R0J0hound thanks!
B
109
S
26
G
46
Posts: 1,886
Reputation: 35,168


Return to How do I....?

Who is online

Users browsing this forum: jorgmaquoi, marcinkowski, tarek2 and 12 guests