3D Library Adventure

mdotedot

  • *
  • Posts: 1449
Thanks for the feedback.

I had a random light placement :D I was experimenting with the  positioning and dropping shadows. Just this morning I found more information about this.  So far I can see it doesn't have anything todo with ordering. But I need more experiments to be sure...
Also I noticed a generational error. When the marching square routines finds the continuous edge of the shape it doesn't 'see'  possible shapes inside the shape. But it would generate tiles for them. So I need to change this procedural generation. Hopefully I have some time tomorrow to work on it.

Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

mdotedot

  • *
  • Posts: 1449
My ProcJam entry page

Changed random generator to an iterative generator so that each time the same level is generated, but you still have endless amounts of levels. (Might cause repetition at some point)

Changed lighting.


Click image to play the game:






Another screenshot




Animation:



« Last Edit: November 13, 2017, 12:23:31 am by mdotedot »
Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

merrak

  • *
  • Posts: 2093
Works pretty well on my end, although I think the draw distance isn't far enough to be believable. Is there a performance issue if the draw distance is further out? Fog would be more believable to me than darkness. Nevertheless, impressive work!

ChristianEs

  • *
  • Posts: 213
This is soo cool, i have a question lets say you release this extension some day, do you think it would be possible to use normal stencyl blocks also when making something in 3d or it only would be possible with the 3d extension blocks. i mean we would need to learn everything from scratch if we want to make some sort of 3d game for example or we would be able to use some traditional stencyl  blocks in combination with the new blocks?

mdotedot

  • *
  • Posts: 1449
It takes me a lot of time learning this 3D stuff. It is fun, but not very productive.


Unfortunately there are no examples on most of the library functions. There are some showcase examples that I ported to Stencyl but things like camera movements, lighting, animations and ‘regular’ gaming mechanics are hard to find.
There seems to be a ton of methods/shader possibilities but many of them need specific ways to call / use them. Or, I still need to figure out what the underlying methodology is.

@Merrak: I still don’t have a satisfactionary fog method working; although Away3D seems to support several shadow methods.
Some lighting effects only work on Directional Lighting :(   One Fog method that looked fine works on Directional Lighting!
The flash-light effect (PointLight) that I’m using for the maze game doesn’t seem to support this.

@ChristianEs :

Most of the work I’m trying to do is to mix/match the 3D stuff with the 2D way of Stencyl

For instance the Maze Game works with tiles and actors. So the collision detection and positional display of the actors are the foundation of the game.
I’m trying to use the Away3D library to display the 2D stuff in a 3D view. So I played around with lots of camera rotation/placements.

Take for instance the Maze Grid:



Those are ‘just’ tiles from Stencyl. The target objects (BeachBalls) are actors on that grid and the player is also an actor. And even the spotlight (flash-light) is an actor that is moved when the player moves. Afterwards I hide the actors and tiles.

What I do is to create an actor and bind the 3D object to the actor using this block:


When the actor is moved the extension will make sure that the position of the 3D object will reflect the position of its actor.
I will need to do a lot of experiments with this, because I think only a limited number of game-mechanics will be able to support this method.

But for now using the actor properties combined with the 3D functions gives (in my opinion) a nice ‘stencyl-way’ of doing things:

Rotating Beach Ball:


Hopefully the learning experience for extension-users will not be as hard as what I need to go through to make the extension .. we will see

I’m currently making a demo game with most of the core blocks/functionality in separate scenes, with separate behaviors, so hopefully it will be easy to learn / use the different parts of the engine.

And to conclude: ‘I am a proud member of the League of Idiotic Stencylers; doing things in Stencyl that probably shouldn't be done.’
But I can’t resist doing them!
Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.


mdotedot

  • *
  • Posts: 1449
Just a preview of what I'm working on inspired by LD40. Tomorrow I hope to work on it a bit more and turn it into a little game. And update this Journal as well with some new things I've done with the Extension.
Mostly turning 2D into 3D stuff.

Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

mdotedot

  • *
  • Posts: 1449
Time for a new update on the Journal.
Live got in yesterday which prevented me to complete the Ludum Dare entry. I will work on it some more as I wanted to explore the
Tile aspects of the 3D.

For the past two weeks I’ve been working on turning a 2D game into a 3D game.

I think it would help migrating from 2D programming into 3D if it could be done with less blocks than I previously started out with.

So, I’m breaking things down into smaller demos that users might be able to pick from and copy / export the behavior.

What I found when working on converting a 2D game to a 3D game was that I had to repeat a lot of blocks.

So I present to you the following prototype:


You would be able to use this block together with regular Stencyl blocks.

For instance:


What this does is to create a 3D object with the arguments supplied and binds it to the Stencyl Actor.
So when the Stencyl actor is moving it will move along with it. The benefits are that more regular Stencyl ways can be preserved
as well as we can use the Box2D engine for physics.

This is a Demo for a 2D game where four people can share a keyboard (or in my case would use 4x blue tooth keyboards)
to move snakes around that can eat the apple.

2D version:


3D version:

The 3D version really has 4 Away3D blocks: Init engine, Remove object, create and bind, Remove engine

Next you can add more 3D features as you go along. You can play the final version I've made:

Play with WASD, Arrow Keys  and to navigate snake 2 and 3 : TFGH, IJKL


http://htmlstarter.com/Away3D/Demo/Snake/3D/Flash/


To switch views you can use the 'm' key

Next: Game with tiles

(With thanks to SadiQ for creating the 2D snake game)
Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

mdotedot

  • *
  • Posts: 1449
It is time for an update.
I’ve been taking a break from development and started last week playing with a 2nd hand Xbox 360 with its controllers and Kinect.
The Xbox itself has problems I’m still not able to fix: E66 error & firmware incompatibility

I had to buy a PC Wireless Gaming Receiver to get the xbox 360 controllers working on the computer.

The Kinect is really what I’m going to talk about in this journal.

I’m still not satisfied with the pipeline to do animations. There is the MD5 route, but I struggle immense with Blender.
So I’m trying to get some motion capture going on. It appears to be working in 2D and I’m not sure how it will come out once
I use the data to make a 3D animation with it; and how I can optimise things.

There is an awesome openfl resource that Chris Porter wrote which I am porting to a Stencyl Extension.(Ref: https://github.com/chrisporter/OpenFlKinect)

This is some current 2D output that I made with Stencyl:




Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

mdotedot

  • *
  • Posts: 1449
Since I wanted the camera to rotate rather than the 3D objects themselves I spend way too many time to get it to work with math. Only to find out that there was a built-in library method to do this.  :o

But the results aren't what I was expecting. This is the recorded skeleton data:
They are the joints for the bones to be attached to.
The head needs to be attached to the upper-block. It appears to have a small head now :D


When rotating:

I still can't figure out why the skeleton data seems to be working from the original recording position.
When rotating the camera the skeleton doesn't look natural to me.

I have to experiment with this further and maybe even get on a treadmill to stay stationary. But I'm not sure if the motion captured data is usuable or not.

Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

merrak

  • *
  • Posts: 2093
I'm not really sure what I'm looking at. The skeleton seems very bouncy to me--but is that just the animation in your clip recycling?

mdotedot

  • *
  • Posts: 1449
I am moving forward in the motion caption hence the skeleton moves towards the viewer. And yes, when the animation cycles it moves back again very quickly.
That is why for the front-view I want to use my treadmill to see if that makes a difference.
But this will not solve the rotation view. I have to do more experiments in using for instance  a combined mesh for all the joints in one frame.
Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

mdotedot

  • *
  • Posts: 1449

Treadmill gave better results!!!


Past weeks I've been working on:
* 3D Lines
* Combined Meshes
* Kinect Skeleton

Current state of the skeleton is:



I need an editor to adjust some bone-animations that weren't captured correctly,
but for now I'm concentrating on the integration into Stencyl.


Next on the To Do list is:
* Bind the kinect data to an actor
* Animation Switching


Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.

bonzero

  • *
  • Posts: 487
wow, this is amazing, is there any chance this could be considered to be included in the official release of Stencyl? not expecting a full-blown 3d engine from stencyl, but the possibility of eventually and 3d elements is very cool and a steap ahead the competition

mdotedot

  • *
  • Posts: 1449
MD5 Animations

OK. So I have my Kinect Data but I really want to connect the Kinect data to a mesh.
I'm not there but what I did find was a nice tool : noesis
It allows m.e. to motion capture data and map it to a mesh. I haven't found a good model yet which seem to be possible according to a youtube video on it.
It took me a while to figure out that the easiest path was to use the kinect and the tool on Windows 7 !!!


What the tool enabled me was also to export stuff from and to other 3D files.

It allowed me to use some examples which I used to create this:



This demo is really created with these blocks. You create a regular Stencyl Actor. Add some dummy animations to it.



And for the animation switching:



The Away3DHelper blocks are on the chopping block. I am not sure if the helper blocks help all that much since there are way too many of them.

Hopefully the examples scenes/scene behaviors will be the way to document/use the library. We will see.
Hanging out in the Chat:  http://www.stencyl.com/chat/

Proud member of the League of Idiotic Stencylers! Doing things in Stencyl that probably shouldn't be done.