Archive for December, 2008
Flow3D Beta, Something for the holidays :)
FLOW BETA IS HERE!!!
We had a tenative release date for Christmas, it’s been a bit of a rush but we have the Flow beta for windows ready for download.
For those new to Blitzmax and installing mods, there is a guide on the Wiki at:
Blitzmax demo and Flow3D install guide
For those coming from Blitz3D there is a basic guide to migrating to Flow/Ogre which outlines a few key principles that are different to Blitz3D.
Blitz3D to Ogre3D/Flow3D guide
This beta release does have some code examples, they were mostly designed to test features and aren’t supposed to impress visually.
There’s a page on the wiki with links to various exporters listed. Here
Today in Flow3D development: Particles!
Note: The code types specified in the code boxes is not correct.
BlitzBasic was just the most syntactically accurate highlighting scheme available at the moment.
Hey there! I’ve been busy at work with Flow3D all day today, as the Flow3D demo release is coming up and we all want to make sure there are no documentation and implementation holes. Today I spent a lot of the day tightening up the basic Particle System handling and I thought I’d give you a little preview of how particles work in Ogre and thus in Flow3D!
First off, the most common way to handle particle systems in Ogre is to use a template file, which can hold multiple particle system definitions. Template files look a little something like this:
File: Spark.particle Spark { quota 50 material PE/lensflare particle_width .5 particle_height 7 cull_each true renderer billboard billboard_type oriented_self emitter Point { angle 99 colour 1 1 0.821918 1 colour_range_start 1 1 0.821918 1 colour_range_end 1 1 0.821918 1 direction 0 1 0 emission_rate 50 position 0 0 0 velocity 30 velocity_min 30 velocity_max 70 time_to_live 0.3 time_to_live_min 0.3 time_to_live_max 0.3 duration 0.3 duration_min 0.3 duration_max 0.3 } affector LinearForce { force_vector 0 -100 0 force_application add } } |
And whew, that was a mouthful.
And while it seems that that would be painfully difficult to type by hand, if you check the Tools section of our site you’ll find plenty of Ogre particle generator tools out there - most of which are excellent for getting the effects you want. In fact, Spark.particle was generated with such a tool.
To load Spark.particle in Flow3D using fG is relatively painless. First you make sure that the .particle file as well as the material (PE/lensflare) that it references are in a resource directory that Ogre can get to, and then you simply call:
Global ps:TParticleSystem = fG.loadParticleSystem("myParticleSystem" , "Spark") fG.PositionEntity( ps , 0 , 50 , 0 ) |
The code above will create a spark particle system, and then set it to (0, 50 ,0) in world space.
I could have left off all of the positioning information, but it is rather unlikely that you are going to want to create a particle system at (0,0,0) all the time.
Now let’s discuss a few of the things I added in today. That is, let’s discuss manually spawning in particles from a blank particle system that we have created using fG. The code below is the full code, which compiles and runs on a BlitzMax install that has the flow.main module installed.
Import flow.main fG.init() 'Create our empty particle system and give it a mask texture Global ps:TParticleSystem = fG.createEmptyParticleSystem("ps") ps.setMaterialName("jet") 'Call to renderWorld to init the created particle system fG.renderWorld() 'Spawn four particles in a cross shape 'fG.createParticle( TParticleSystem , Direction , Size ) fG.createParticle(ps, Vec3(0, 100, 0) , 75.0) fG.createParticle(ps, Vec3(0, - 100, 0) , 75.0) fG.createParticle(ps, Vec3(- 100, 0, 0) , 75.0) fG.createParticle(ps, Vec3(100, 0, 0) , 75.0) 'Basic renderloop Repeat fG.renderWorld() Delay 1 / 60 Until KeyDown(KEY_ESCAPE) Or fG.appTerminated() |
The basic visual generated by the code is below:

While the render loop is a bit crude, the application successfully spawns four particles which spread across the screen in four directions. It is fair to say that if you find that the params for setting position, direction and velocity are not enough with createParticle(…), createParticle(…) also returns the TParticle that was created, which you can manipulate like so:
Global p:TParticle = fG.createParticle(ps, TVector3.Create(100, 0, 0) , 75.0) p.setTimeToLive(2.0) |
Anyways, that’s all the time I have for now! I hope this has been of some interest to you!
Lina
Simple Hierarchy and Rotation Snap
This video demonstrates the link and unlink tools on some robots.
Shift clone was used to clone/instance the robots in the scene.
Linking works by activating the link button. At which point the transform gizmo disappears.
When you mouse over a object it’s bounding box appears indicating your selection.
Left click + drag from the child mesh over to your parent object (again Bounding box will appear).
When you let go of the mouse button the new hierarchy is established.
At the end of the video is a short section on rotate snaps. Which shows how setting a ° Degree angle will constrain the rotation gizmo to increments of th value you set.
Using scale
This Video shows the scale function in Flowed, and how it works with gameplay objects including those simple heirarchy (note the wheels).
Scale along an axis is performed using the transform gizmo with the scale button enabled
Uniform Scale is performed by by dragging on the actual object with the scale button enabled.
Snap to Grid with 3D tiles video
This video demonstrates the snap to grid function along with:
Selection
CTRL Add to selection (multiple selection)
SHIFT drag instancing,
Right click 90° rotation.
NOTE: Remember many functions can be combined, you can drag and clone and rotate multiple selections, so long as you hold down the CTRL key whilst doing them.
Minor bugfix release
I updated the download file on the server with a new version incorporating a couple of bug fixes.
A bug where merging a couple of the scenes caused flowED to crash. You should now be able to load TerrainONLY.OSM and merge in tiles.OSM etc without flowed crashing.
The zoom has been reversed and works more intuitively now.
A few typos in the manual were also fixed.
FlowED Beta Version 0.8 Released!
As promised the FlowEd Beta is officially out today at version 0.8! Our team has been working quite heavily the past week to ensure that the Beta release goes as planned! Even so, keep in mind that FlowEd is currently beta software, and any input you can give will be greatly appreciated! Any issues you may encounter or features you may desire can be reported on the forums here. Without further verbiage, you may proceed to the download page here:
And thank you for helping us improve FlowEd in the future!
Lina
The FlowEd Beta and How It’s Going
While we haven’t paraded the release date everywhere, we’re hoping to release the FlowEd beta sometime this weekend ( December 12-14, 2008 ). Slowly, we’ve worked our way down the checklist of features and issues until it was empty, and now we’re primarily in the internal testing phase. After release, you’ll be able to test out FlowEd for yourself and any feedback you can provide will be greatly appreciated. The fastest way to give the team feedback will be to post in the FlowEd -> Issues and Requests forum so that we can itemize desired features and catalog the issues users encounter.
I will keep this post short and sweet - so I leave you with a random sceenshot of the current FlowEd SVN build. A little smoke on the water never hurt anyone. Well, yes it has, but you get the idea.

“Do crab cars have steering wheels on the side?”
-Lina
Forums and Online Docs
FLOW3D ON IRC …..
You can come and visit us on IRC if you like!
Chat Now Via Browser!
Server : irc.blitzed.org:6667
Channel : #flow3d
Please Note: IRC Chatrooms can be joined by anyone and the views expressed are solely those of the author or speaker and do not necessarily represent the Flow3D team.
FLOW3D DOCS …..
Click HERE to open Flow3D Ogre docs in a new window.
NEWTON DOCS …..
Click HERE to open Flow Ogrenewt docs in a new window.
__ 3rd Party Community Links __
Blitzmax DOCS …..
Click HERE to open Blitzmax Online docs in a new window.
Flow related downloads
Links to dependencies required to get Flow running, as well as useful third party tools for creating content. Also sample demos.
FLOW3D DEMO
Addon Module for Blitzmax. Download
FLOWED BETA
Flow3D’ss easy to use Object Placement Scene Editor. FlowED was made using Flow3D!
Mirrors:
code-kitty.com : Download!
BlitzMax
BlitzMax is a cross platform game programming language from Blitz Research. BlitzMax retains the BASIC roots of Blitz3D and BlitzPlus, but adds a ton of cool new features and abilities.
Enhanced BASIC language
BlitzMax is BASIC…but with a few twists, including:
- Function pointers
- Fully dynamic arrays
- Inheritance and polymorphism
- ‘By reference’ function parameters
- Byte, Short, Int, Long, Float and Double numeric data types
- Array and string slicing
- Flexible ‘collection’ system for dealing with linked lists etc
- Low level pointer handling
- UTF16 strings
- The ability to ‘Incbin’ binary data and access it as easily as if it were a regular file
- External language support for interfacing with C/C++/ObjectiveC or assembly code
A 30 day trial version of Blitzmax is avaliable from the Blitz Research site HERE
BLIDE
The best IDE for Blitzmax. The Flow team adopted BLIDE early on and makes full use of BLIDE’s intelliprompt and code completion functions making learning Flow and getting upto speed with Blitzmax so much easier. Although BLIDE is free we highly recommend the Plus version which includes many helpfull extra features. Download BLIDE HERE.
CEGUI relates Tools and Utilities
The Crazy Eddie User Interface library integrated in flow includes a selection of tools to make the UI designers life easier.
- CEGUI Layout Editor
- CEGUI Imageset Editor
Avaliable from the main CEGUI site HERE
Ogre Bitmap Font Maker
A tool for creating bitmap font resources for Ogre Avaliable from HERE
Ogre .Mesh exporters
Early Flow Compatibility Demo

Click on the Code Bar below to see Blitzmax Code. Download Demo
'Header Import flow.main '/Header 'Initializing Ogre AppTitle = "Flow [Escape to exit - C to toggle Shadows, R for offset normal ground in D3D only]" fG.init(True) HideMouse() EnablePolledInput() 'Setting the Scene 'Main scene light positioned to the right- Global Light:TLight = fG._light Light.Setposition(- 40, 600, - 20) Light.setDiffuseColour(1, 1, 1) Light.setSpecularColour(.5, .5, .5) 'Turn on shadows- fG._scene.setShadowTechnique(SHADOWTYPE_STENCIL_MODULATIVE) 'Load the Robot OSM- fG.LoadOSM("walkie.OSM") 'Grab the robot legs entity and node- Global robot:TEntity = fG._scene.getEntity("Walkie") Global robotnode:Tscenenode = robot.getParentSceneNode() 'Grab the robot head assembly ( head, weapons, mounts ) node- Global robotHeadAssembly:tscenenode = fG._scene.getentity("Box03").getParentSceneNode() 'Get the robot's spine for attaching the head assembly to- Global spine:TBone = robot.getSkeleton().getBoneWithName("MechPelvis") 'Get the robot leg's animations, enable standing by default- Global animWalk:TAnimationState = Robot.getAnimationState("Walk") Global animStrafe:TAnimationState = Robot.getAnimationState("Strafe") Global animStand:TAnimationState = Robot.getAnimationState("Idle") animStand.setEnabled(True) 'Main Camera Setup Global cameraNode:TSceneNode = RobotNode.createChildSceneNode("cameraNode", 0, 0, 0) cameraNode.setInheritOrientation(False) fG._camera.setPosition(0, 15, - 30) cameraNode.attachObject(fG._camera) 'Set up the floor Global Floor:TEntity = fG._scene.createEntity("floor", "Plane01.mesh") Global floornode:TSceneNode = fG._rootnode.createChildSceneNode("floornode", 0, 0, 0) floornode.attachObject(Floor) Floor.setMaterialName("Rocks") '/Setting the Scene 'Variables used for mouselook- Global yaw:Float = 0 Global mousepos_x:Int = fg._ogre.GETwidth() / 2 Global mousepos_y:Int = fg._ogre.GETheight() / 2 Global currMouse_x:Int = fg._ogre.GETwidth() / 2 Global currMouse_y:Int = fg._ogre.GETheight() / 2 Global mouserel_x:Int Global mouserel_y:Int Global rotyaw:Float = 0 Global rotpitch:Float = 0 cameraNode.rotate(TVector3.Create(0, 1, 0), 180) Global shadows:Int = True Global showRocks:Byte = True 'Ad these are for you! Global animSpeed:Float =.03 Global strafeSpeed:Float =.5 Global walkSpeed:Float = 1 Repeat fG._camera.lookAt(robotnode.getPosition().getX() , robotnode.getPosition().getY() , robotnode.getPosition().getZ()) 'Increase the animation timer each frame- 'animState1.addTime(.005) 'Capture relative mouse coords- currMouse_x = MouseX() currMouse_y = MouseY() mouserel_x = currMouse_x - mousepos_x mouserel_y = currMouse_y - mousepos_y MoveMouse(mousepos_x, mousepos_y) 'Transform the camera based on these coords and keyboard activity- cameraNode.yaw(rotyaw + (mouserel_x * 3 *.025) , TS_LOCAL) 'cameraNode.pitch(rotpitch + (mouserel_y * 3 * -.025) , TS_LOCAL) 'Instead of actual movement, set up animations- 'Check input to determine the states of the robot- animStand.setEnabled(False) animStrafe.setEnabled(False) animWalk.setenabled(False) 'The following variables contain movement details: Local Strafe:Int = KeyDown(KEY_D) - KeyDown(KEY_A) Local Walk:Int = KeyDown(KEY_W) - KeyDown(KEY_S) 'Actually move the mesh: robotnode.translate(Strafe * strafeSpeed, 0, Walk * -walkSpeed, TS_LOCAL) 'Set the head assembly node's position to that of the spine bone. Get spine bone by transforming spine's local position 'From it's parent bone by the leg entity's world transform. robotHeadAssembly.setPositionWithVector3(robot._getParentNodeFullTransform().mulWithVector3(spine._getDerivedPosition())) 'Lets reset animation type to keep animations synced together. If KeyHit(KEY_D) Or KeyHit(KEY_A) Or .. KeyHit(KEY_W) Or KeyHit(KEY_S) Then animStrafe.setTimePosition(0) ;animWalk.setTimePosition(0) If (Strafe Or Walk) Then If Strafe Then animStrafe.setenabled(True) animStrafe.addTime(animSpeed * strafe) End If If Walk Then animWalk.setenabled(True) animWalk.addTime(animSpeed * walk) End If Else animWalk.setEnabled(False) animStrafe.setEnabled(False) animStand.setenabled(True) animStand.addTime(animSpeed *.1) EndIf 'If user hits "R" then toggle between offset materials and standard ( Direct3D Only! ) If KeyHit(KEY_R) If showRocks = True Then showRocks = False Floor.setMaterialName("OffsetMappingSample") Else showRocks = True Floor.setMaterialName("Rocks") EndIf EndIf 'If user hits "C" then toggle shadows If KeyHit(KEY_C) Then shadows = 1 - shadows;fG._viewport.setShadowsEnabled(shadows) 'Render one frame every 60 seconds- fG.renderWorld() Delay 1000 / 60 Until KeyHit(KEY_ESCAPE) Or AppTerminate() |
This was a simple compatibility test demo we released several months ago. Not designed to wow but does test basic rendering, fixed function, stencil shadows and PS 2.0 shaders. The code isn’t supposed to impress and could have been far shorter if the entire scene including camera, lights etc were included in the scene that contains the robot.
I think it does give you an idea of how to load geometry and set up a basic scene in Flow. Most people would probably want to create the scene in Flowed making most of the source here redundant.


