2.5D techdemo

miaubian

  • Posts: 99
i just had a idea that came to my mind after working on a point and click behaviour for a project for university.

i just did a really quick demo, you can find it here:
http://www.stencyl.com/game/play/23482
controls: arrows
Can you find the player? :D


only 2 actors with 1 frame each
it needs some work, but i cant remember the formulars from the math lessons :P


remember my old "demo"? (http://www.stencyl.com/game/play/21477)
i think i could get this to work with this

« Last Edit: January 02, 2014, 02:55:17 pm by miaubian »

Photon

  • Posts: 2697
Pretty nifty, although I'm not sure that's what's considered technical "2.5D".
Do NOT PM me your questions, because I likely will not respond. If I have replied to your question on the forum, keep using that topic. Thanks!

dude99999

  • Posts: 121
Visit Power Spark to play more of my games.

miaubian

  • Posts: 99
thanks, about the 2.5D term, i looked that up last time :)

»2.5D (...) used to describe either 2D graphical projections and similar techniques used to cause a series of images (or scenes) to simulate the appearance of being three-dimensional (3D) when in fact they are not, or gameplay in an otherwise three-dimensional video game that is restricted to a two-dimensional plane.»

source: wikipedia






dude99999

  • Posts: 121
The second test looks so cool! All it needs is some tweaking with the tree formulas, and you've got some '2.5D' Stencyl games!

I've seen a couple games in StencylForge that attempt to mimic 3D games, and this is probably the closest we'll get to 3D Stencyl games (at least in 3rd person view).
Visit Power Spark to play more of my games.

Turbo Assassin

  • Posts: 37
Someone had already played with this idea but they don't seem to have followed it through;


http://www.stencyl.com/game/play/11400


There is a lot of un-tapped potential here!

 :P
"I imagine one of the reasons people cling to their hates so stubbornly is because they sense, once hate is gone, they will be forced to deal with pain."

NobodyX

  • *
  • Posts: 1228
These are pretty cool!

This is something I was working on before:

Each actor actually exists in 3d space (has x,y,z coordinates) and for a funky effect it pushes the blocks way near the camera when you go near them. There is even the ability to rotate the camera around the centre of where it's pointed, so in this case it'd make the world "spin". You can see that at the end of the gif when the camera pulls out and the camera also rotates to a more top-down view.

miaubian

  • Posts: 99
dude99999:
thanks, yes it needs a lot work to look correct. but it needs some math, and i know what i need to do, but i cant remember the formulas :D
the closest to 3D is propably NobodyX, see above


Turbo Assassin:
ah yes, i saw that when i started 3 months ago, same mechanism


NobodyX:
just awesome. is it playable somewhere? i thought of using values to place the actors to get a "parallax" effect in it.

miaubian

  • Posts: 99
NobodyX:
i know stencyl cant do this, but imagine placing "points" like this with x,y,z and connect them to rectangles, then defining the color of the rectangles bases on their angle and distance to a lightsoure

then just add rayscasting, add textures, collisions and BOOM 3d engine! :D

NobodyX

  • *
  • Posts: 1228
Nah it's not playable because I've had lots of plans to use the system in "real" games (not tech-demos) and they haven't materialized fully yet. It's kinda of a scrappy 3d effect with math that isn't entirely correct. For example when the object go into the distance they kinds just stop shrinking at a certain point, instead of going off in the distance forever as you would think they would.

It shouldn't be too hard to get a simpler version of what I made going. With a fixed camera it'd be easy-peasy, to have it rotate around the X axis or the Y axis wasn't too hard either but I remember having it able to do both at the same time was a huge f'ing pain in the ass because I wasn't smart enough to figure it out for hours.

I've been thinking it'd be amazing to have a 3d system where you can turn the camera around, like the same as how in an FPS you can look in different directions. I have no clue how I'd do that though. What I made is basically you can move the camera around on a "sphere" while it always points to the centre, you can't actually turn the camera.

NobodyX

  • *
  • Posts: 1228
NobodyX:
i know stencyl cant do this, but imagine placing "points" like this with x,y,z and connect them to rectangles, then defining the color of the rectangles bases on their angle and distance to a lightsoure

then just add rayscasting, add textures, collisions and BOOM 3d engine! :D
Haha you can go ahead and try that if you want. :P

miaubian

  • Posts: 99
to have it rotate around the X axis or the Y axis wasn't too hard either but I remember having it able to do both at the same time was a huge f'ing pain in the ass because I wasn't smart enough to figure it out for hours.

i try to think how i would do the rotation on 1 axis and it seems to be quite hard :D

hm to rotate around with a angle of lets say 30, a point would have to go from its initial point √2*(initial distance to the point from camera)*(1-cos(30))
and all this with an angle of 180-30/2 so 75

and with this you can build a right triangle to determine how much the initial point has to move on the x and y axis


is that right?



edit:
well, maybe  x=cos(angle/180*Pi)*(initial distance)  and y=sin(angle/180*Pi)*(initial distance)   is better :D

« Last Edit: January 03, 2014, 01:54:24 pm by miaubian »

NobodyX

  • *
  • Posts: 1228
Yeah the edited in part of your post is along the lines of what I did. It needs to factor in 2 coordinates though and not just one "distance" value.

Thinking back I have no clue why trying to do both rotations needed to be so confusing to me after I got one working, all it needs to do is just get new xyz values for the first rotation and then use those as the base for the second but I think I was trying to fit it all in one process or something which was a stupid thing to do.

Yeah I just took a look at what I had (attached as an image to this post) and instead of doing each rotation as a separate step I combined them and all it does it make it confusing as hell. :p

miaubian

  • Posts: 99
yes, i forgot about the radian. "distance" just as placeholder, you have to make a right triangle, at least here :D

yep, its just like rotating in 1 plane, and then rotation in the new plane again. i really need to refresh my math skills, things i thought i would never need again :D

« Last Edit: January 03, 2014, 01:58:30 pm by miaubian »