Archive for the ‘Sandy 3D’ Category

Nimian Garden Open Beta

with 7 comments

Screenshot of the Action Adventure Garden game, Waterfall Woods

I’ve just posted an open beta version of Nimian Garden : Waterfall Woods here:

http://www.protopop.com/games/waterfallwoods/

I’m going to be listening to feedback and watching it over the next little while to see what works and what doesn’t. I like to think of it as an Action-Adventure Garden game – that’s a nice little niche genre that remains relatively unexplored so far.

It takes place in the Continent of Nimia, the setting for some of my other games like Nimian Hunter and Nimian Flyer Legends (are you starting to see a theme here?). The game was created using the free Sandy 3D API for flash http://www.flashsandy.org/ , a very game-friendly/artist-friendly way to get 3d into your flash games.

Written by protopop

January 11th, 2010 at 4:29 am

Flash Flight Simulator in Sandy 3

with one comment

Flight simulator version
http://kiroukou.media-box.net/demos/sandy/flightsim/

There’s a few additions checked of the list of things id like the engine to achieve:

COLLISION DETECTION
3 center mountains have collison detection.

1) function tests distance from camera to object center
2) use height of camera to determine the intersection with the mountain slope. The higher you are, the closer -you can come to the mountain side

PROCEDURAL GROUND
grid of 4 seamless terrains regenerate in front of the camera providing endless ground textures to fly across

I wanted to use mode7 but couldnt find an as3 version yet. Then I decided to just use regenerating ground planes. They cover the area immediately in front of you, while the distant ground is covered by a lower resolution, larger plane. The distance between you and a ground plane is measured only in two dimensions (x and z) since the height you are flying at has no impact on where the terrain should generate below you. Given some tweaking, i think there might be no need for a mode7 hack (unless an elgant one sows up) and i like the idea of using just sandy’s features for all aspects of the landscape.

OBJECT GENERATION
Objects respawn in new locations once a new area is entered

The idea is to load the scene with a certain number of objects (i.e. trees, mountains) that the engine cn handle. When you fly to a new sector the objects in the old one are deleted and regenerated in the new area. This keeps the amount of polygons etc the same no matter where you go.

Example: fly towards the volcano. The forest and two of the mountains will regenerate in front of it as you approach

RAFAJAFAR’S TERRAIN CLASS
provides mountainous terrain – very very cool!

Originally all distant mountains were pictures on planes. now ive replaced 2 of them with terrain using Rafajafar’s terrain class .

  • cpu impact is relatively low
  • need hittest. will try to figure out something based on the height of the nearest vertex?
  • Im wondering if the class could be modified to use a black and white bitmap as the heightfield as well as the perlin noise. This would allow terrain import from a variety of sources into Sandy
  • Only problem is lack of ‘zero edges’. It would be nice if the edges of the terrain touched down to the ground around all sides.


CAMERA FOLLOWS FLYER
i added the camera and flyer to the same transform group. Its this transform group that is flying around as one, rather than the flyer flying and the camera following it seperately. I did this because i couldnt figure out how to place the camera always ‘behind’ the flyer object

USE SINGLE CONTAINER
I heard Sandy may remove this feature. Please dont – it really improves the performance of my secene. Its nice to have the option. As long as objects dont intersect (which many dont) its not a problem. BTW i added a usesinglecontainer tag to rafajars terrain class so i could enable this function on his terrain

LEFT TO DO

  • figure out how to oad sprite2D textures from library bitmaps instead of at runtime from external jpgs. Whenever i bypass the loader function and try to use a display object directly as the sprite2d image, all the sprites merge into one area and there 3d placement is totally off
  • Terrain Sectors: create an overmap that keeps track of where you are in the world to control the local sceneray
  • Optimization: i think the scene is handling a lot of stuff really well, but optimization tips are always welcome


Overall Im loving Sandy 3d

Written by protopop

August 18th, 2007 at 7:55 pm

Posted in Sandy 3D

3D Flash World in Sandy 3.0

without comments

I’ve been waiting for 3D in Flash for a long time. Now Flash 3D engines like Sandy, Papervision, SWFZ and Away 3D have appeared, ive started to develop a 3D engine that focuses on handling landscapes for Flash games.

This example was created using Sandy 3D 3.0. Thanks to Sandy 3D engine!
http://www.flashsandy.org/

3d model import is from shirotokoro’s really, really useful 3ds import. You can embed models into the .fla without having to load them at runtime. This will let you create games with 3d models entirely in one .swf file
http://seraf.mediabox.fr/showcase/as3-geom-class-exporter-for-3ds-max-english/

Notes:

  • movieclip material for center mountain with waterfall
  • movie clip on plane for smoke, with embedded flv with alpha encoded
  • sun, distant mountains, smoke are on a plane
  • couldnt figure out sprites so this is a modified version of sandy’s spritetest.as
  • hold down the mouse to fly through

To Do:

  • Hit test for objects
  • How can i reference created objects?
  • How can i remove an object when it gets far enouh behind the camera and regenerate a new one in front of the camera?
  • how can i use a library material for sprites? *** this is the big one, right now it uses the loader class code in spritetest.as. I dont know how to create a new sprite from a library png
  • actionscript 3 mode7 engine to incoporate into scene for endless flat terrain (anyone know of any with code?)


Written by protopop

August 16th, 2007 at 7:39 pm

Posted in Sandy 3D