Quantcast
Viewing all articles
Browse latest Browse all 669

Physics in Small Basic

What is Physics

According to SmallBasic.Dictionary, physics is “study of physical forces and qualities”.

Velocity Model

I once wrote about velocity in a blog post Small Basic Game Programming – Game Math.  This is the basic of physical simulation.  A program JLF545-1 illustrates the relation between time and velocity.

Image may be NSFW.
Clik here to view.

A program KXQ212-2 is a simple sample of physical simulation.  You can accelerate the moon lander with up arrow key.

Image may be NSFW.
Clik here to view.

Inverted Pendulum

Writing physical simulation program is not so easy.  But there are some physics engines that supports physical simulations.  Box2D is one of them and LitDev Extension contains LDPhysics object that wraps Box2D physics engine.  I wrote a sample ZFJ443 which simulates inverted pendulum.  You can move the inverted pendulum with left and right arrow keys. 

Image may be NSFW.
Clik here to view.

See Also

These are links to Small Basic blog posts about physics.

Viewing all articles
Browse latest Browse all 669

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>