Home  

     

MemoDroid is my recent work on Android platform.

It is a tool that can help you memorizing things, including words, idioms, laws, learning materials... anything that you don't want to forget. And it enables you to utilize piecemeal time for this task.

The theory is simple. We know that we need to repeat memorized things every time and often, and the newer the item is, the more often we need to repeat it. What MemoDroid does here is to take over the repetition process and help you manage the item's repeat period.

Rolling balls -- new progresses of RigidAPE

in

Since last release of RigidParticle, I've been working on it's restructuring.
And now there's finally some new progress I can share with you.

These are the major updates:

  • Hit point detection has been moved to CollisionDetector. I think that makes more sense to me.
  • Collision resolve of rigid body have been moved to a new class -- RigidCollisionResolver. And the collision resolve and rotation calculation has been completely rewritten. In the last demo, The RigidParticle is just "looks like" a rigid body, but now, it is a real rigid body.
  • RigidParticle has been removed. And there's 3 new classes -- RigidItem, RigidRectangle and RigidCircle -- taking its place. RigidItem is the root of all rigid bodies in this new framework, It provides common operations for all kinds of rigid bodies. RigidRectangle is just like the original RigidParticle, It simulates a rigid body in rectangle shape. RigidCircle is new, It simulates a circular rigid body. Maybe you think a circular object doesn't need to be a rigid body, You will see from this demo, a particle can never do that...

Flash 3D engine with "obj" file support

in


This 3D engine can load models in a standard "obj" file, and display it in real 3D.
Many 3D tools can export "obj" file format. I'm using SketchUp pro.
My 3D car simulation application was based on this engine.

Originally it was an open source 3D engine writen in AS1.0, I found it years ago, then I rewrote it in 2.0, and added some new feature to it. Different from other 3D engines use pixels graphics to draw polygons, This 3D engine use vector graphics to display polygons. This method is suitable for flash player 7, since it doesn't have bitmap abillity. And it's more good looking, because vector graphics are naturally anti-aliased by the player.
For flash player 8 or later, a pixel engine is a better choice.

The hidden surface removal is buggy, because most hidden surface removal method are not designed for vector graphics. So I took a shortcut. Although it's a buggy method, but you still can get perfect result if you spend some time refine your model. Load the model house.obj, you can see the engine is working very well on this model.

3D Car simulation

in


This is the 3D version of Car dynamics experiment.
They share the same rigid body engine (The rigid body engine uses 3D vectors), only this one is displayed in 3D.

Car dynamics experiment

in

This application simulates movements of a car.
There's a special physics system in this application. It's based on particles but you can use several particles to form a rigid body.
Every particle has its mass, and when they were formed into a rigid body, the system calculates the center of gravity and moment of inertia for the rigid body. When a force was applyed to a particle, the physics system calculates acceleration and rotational acceleration for the whole rigid body and make it move.
To simulate the car, I used 4 particles (one for each wheel) to form the car rigid body. Thrusts and frictions were applyed to these wheels.
The friction calculation is special. Since wheels have direction. In the same direction of their rotation, they are free to move. But on the perpendicular direction of their rotation, they tends to stop the movement (Actually it's this friction that makes the car turns).

Poor man's flash version control

in

Flash version control is a big topic, but the intention of this article is not. Since most source file version control system such as SVN does not handle binary files like fla or swf, it's really hard to keep track of the version of a fla file.

Is there really nothing we can do?

This article introduce a JSFL script that provides the basic functionality of version control by recording a version number (and increase it too), as well as by who and at what time a fla file is edited automatically.

Flash batch processing made possible using JSFL script

in

The feature of batch processing can't be found in any version of Flash. Maybe Macromedia/Adobe doesn't think it is very important. However, I think most professional flash developers will agree that the ability of handling multiple fla files automatically can really save you a lot of time in projects that contain a large amount of fla files.

Fortunately, flash has the powerful jsfl script, which has the ability to perform most of the functionalities in flash. With this tool, batch processing is no longer impossible.

Syndicate content