Physics Engine Progress

I’ve recently discovered that APE (Actionscript Physics Engine) lacks a lot of basic features that I really wanted to use in the game I was going to make with this, which is a shame as it was so easy to program. The biggest problem I found with the engine was the lack of any rectangle physics, so I stuck it out and attempted to learn Box2DFlashAS3 which I found needlessly complex and required to many lines to get the desired effects (in other words I’m too lazy!).

So instead I found a substitute called QuickBox2D which is a library built on top of Box2DFlashAS3 which makes everything a lot easier as well as adds a couple more helpful features. But on top of that the creators website has LOADS!!! of examples of the engine working which makes it so easy to learn from references.

So check it out if you are looking to learn an AS3 Physic Engine as it is definitely the easiest to pick up and play with. Also here are two examples to compare APE and QB2D.

(Make sure you click the file to focus on it and not switch to the next file through shadowbox)

APE-Demo
QB2D-Demo

October Update!

Well I haven’t posted for awhile so I thought I’d keep anyone who cares updated. I’m currently halting work on EvoCannon 2 due to me being lazy and that I’m back at college doing my A Levels, some more useless than others…

…But anyway after much frustration I’m finally making head-way with learning a AS3 Physic Engine called APE (Actionscript Physics Engine).

So far I’ve just been getting to grips with the engine by messing around with demos and creating my own. But I was thinking a physics based puzzle platformer or PPP as I like to call it :P would be interesting.

So anyway this is what I have so far and is just a short demo:
PPP-Demo

Controls:
Up = Jump
Right = Roll Right
Left = Roll Left

Source:

package {
import org.cove.ape.*;
	import KeyObject;
	import flash.events.Event;
	import flash.display.Sprite;
 
	public class APETest extends Sprite {
 
		public function APETest() {
			var angVel:Number = 0;
			var angAcc:Number = 0.1;
			var keyP:Boolean = false;
			var keyU:Boolean = true;
			var key:KeyObject = new KeyObject(stage);
 
			APEngine.init(1/4);
			APEngine.container = this;
			//Gravity
			APEngine.addMasslessForce(new Vector(0,2));
 
			var defaultGroup:Group = new Group();
			defaultGroup.collideInternal = true;
 
			var wp:WheelParticle = new WheelParticle(250, 200, 15, false, 1, 0.1);
			defaultGroup.addParticle(wp);
 
			var cp1:CircleParticle = new CircleParticle(448, 300, 72, true, 100, 0.1);
			defaultGroup.addParticle(cp1);
 
			var cp2:CircleParticle = new CircleParticle(52, 300, 72, true, 100, 0.1);
			defaultGroup.addParticle(cp2);
 
			var rp1:RectangleParticle = new RectangleParticle(250,400,200,20,0,true);
			defaultGroup.addParticle(rp1);
			var rp2:RectangleParticle = new RectangleParticle(230,400,200,20,0.2,true);
			defaultGroup.addParticle(rp2);
			var rp3:RectangleParticle = new RectangleParticle(270,400,200,20,-0.2,true);
			defaultGroup.addParticle(rp3);
			var rp4:RectangleParticle = new RectangleParticle(210,400,200,20,0.5,true);
			defaultGroup.addParticle(rp4);
			var rp5:RectangleParticle = new RectangleParticle(290,400,200,20,-0.5,true);
			defaultGroup.addParticle(rp5);
			var rp6:RectangleParticle = new RectangleParticle(190,400,200,20,0.8,true);
			defaultGroup.addParticle(rp6);
			var rp7:RectangleParticle = new RectangleParticle(310,400,200,20,-0.8,true);
			defaultGroup.addParticle(rp7);
			var rp8:RectangleParticle = new RectangleParticle(170,400,200,20,1,true);
			defaultGroup.addParticle(rp8);
			var rp9:RectangleParticle = new RectangleParticle(330,400,200,20,-1,true);
			defaultGroup.addParticle(rp9);
			var rp10:RectangleParticle = new RectangleParticle(150,400,200,20,1.2,true);
			defaultGroup.addParticle(rp10);
			var rp11:RectangleParticle = new RectangleParticle(350,400,200,20,-1.2,true);
			defaultGroup.addParticle(rp11);
			var rp12:RectangleParticle = new RectangleParticle(130,400,200,20,1.4,true);
			defaultGroup.addParticle(rp12);
			var rp13:RectangleParticle = new RectangleParticle(370,400,200,20,-1.4,true);
			defaultGroup.addParticle(rp13);
			var rp14:RectangleParticle = new RectangleParticle(250,280,180,5,0,true);
			defaultGroup.addParticle(rp14);
			var rp15:RectangleParticle = new RectangleParticle(0,200,20,400,0,true);
			defaultGroup.addParticle(rp15);
			var rp16:RectangleParticle = new RectangleParticle(500,200,20,400,0,true);
			defaultGroup.addParticle(rp16);
			var rp17:RectangleParticle = new RectangleParticle(250,0,500,20,0,true);
			defaultGroup.addParticle(rp17);
 
			APEngine.addGroup(defaultGroup);
 
			addEventListener(Event.ENTER_FRAME, eachFrame);
			function eachFrame(e:Event):void {
				APEngine.step();
				APEngine.paint();
				moveWheel();
			}
			function moveWheel() {
				if(key.isDown(key.UP)){
					if(!keyU){
						wp.addForce(new Vector(0,-40));
						keyU = true;
					}
				}else{
					keyU = false;
				}
				if (key.isDown(key.LEFT)) {
					wp.angularVelocity = -angAcc;
					keyP = true;
				}
				if (key.isDown(key.RIGHT)) {
					wp.angularVelocity = angAcc;
					keyP = true;
				}
				if (!key.isDown(key.RIGHT) && !key.isDown(key.LEFT)){
					keyP = false;
				}
				if(!keyP){
					wp.angularVelocity = 0;
				}
				if(key.isDown(key.SPACE)){
					trace(defaultGroup.collisionList);
				}
			}
		}
	}
}

Enjoy and leave a comment with your ideas and thoughts!

EvoCannon 2 (Camera Demo)

I have final programmed the game to accommodate a game level bigger than what you can actually see.
EvoCannon 2 (Camera Demo)
There is still a slight bug where you can move out of the game level but thats what I’m currently fixing.

Controls:

WASD/Arrow keys = Movement
Left Mouse Button = Shoot
Space = Spawn enemy (more than 20 will lag considerable)
P = Pause

Vista and Seven 3DMark Vantage Comparision

As promised here are the results of the upgrade from Vista Ultimate to Seven Ultimate.

Vista Options
Vista Score
Seven Options
Seven Score

Leave a comment and tell me what you think! :)

Update!

Hey everyone who bothers to read this blog. I just thought I’d keep you up-to-date on my daily going-ons. I recently bought Skewb and Megaminx from www.PUZL.co.uk and they have awesome quality and there UK-delivery time was pretty good to. I’ve just gotten my hands on the new Wolfenstein game for PC and have being playing quite alot of that today. In short it is pretty good and really fun to play so if you liked RTCW pick this one up you won’t regret it.

Also you’ll be happy to know I’m still working on EvoCannon 2 but I’ve come across a hitch/bug that I’m trying to solve right now with help from the kirupa.com forums. Lastly I’ll conclude with some up and coming info; I’ll be running the 3DMark Vantage benchmark on my PC today and then posting the results. Then I will be installing Windows 7 shortly after, and then running the benchmark again so all you techies can see if it really makes a differences to the performance of your PC.

:D

EvoCannon 2 (To Do List)

Ages ago back in 2007 when I first released EvoCannon I got a massive amount of positive and negative feedback. But one fan called Brian went above and beyond and wrote me two pages worth of ideas and improvements. As I was stuck when thinking of new ideas for the game I dug it back up and condensed it down into this list:

  • Enemies now drop money instead of bullets (Used in the upgrades shop).
  • Money gravitate towards the player.
  • New Health Regneration System.
  • Bullet limit (A limit to how many bullets can be fired at once).
  • Grid based level selection such as:

|01 | 02 | 03 |04 | 05| (All the ones along this line have arena design 1)
| 11 | 12 | 13  | 14 | 15| (All the ones along this line have arena design 2) you get the idea.

  • Cannon Customization (New weapons and upgrades)
  • Primary Weapons (Changes the look of your ship):
  1. Cannon (1 Bullet on-screen, 4 Bullets on-screen, 8 Bullets on-screen)
  2. Machine gun (Low accuracy, Medium Accuracy, High Accuracy)
  3. Beam (Small width/lasts  1 second, Medium width/ lasts 2 seconds, High width/ lasts 3 seconds)
  4. Shotgun (Small spread, Medium Spread, High Spread)
  • Secondary Weapons (Switched through the use of the F key)
  1. Rocket (fires one big rocket, big splash damage, long charge time)
  2. Mines (drops a random minefield around your ship, you can’t hit your own mines, long charge time)
  3. Bomb (Causes everything with a certain radius to explode, long charge time)
  • Passive Upgrades (Constantly effecting your ship):
  1. Better Regeneration of Health
  2. Shield Upgrades
  3. Auto Protection Turrets (Automatically target and shoot down enemies)

EvoCannon 2 (Bullet Demo)

Another update on EvoCannon 2, I have just finished getting the bullets to spawn, make them move, then check for hitTests against enemies, and if a collision occurs they both remove themselves from the display list and their parent array. In other words you can now shoot and the enemies will disappear when the bullets hit. Also to make an improvement on my original design. I’ve made it so only 5 bullets can be on-screen at one time, this prevents against people spamming the cannon like a machine gun (kind of).

EvoCannon 2 (Bullet Demo)

Controls:

WASD/Arrow keys = Movement
Left Mouse Button = Shoot
Space = Spawn enemy (more than 20 will lag considerable)
P = Pause

Checklist Time!

Well looks like my site needs a couple of things fixing so here is the todo list:

- Change Uncategorized to Uncategorised (I’m not American). [x]
- Sort out portfolio page.* [x]
- Learn how to launch ShadowBox plugin from within a .swf.* [ ]
- Setup a “Internet Explorer not supported download a decent browser” page.* [ ]
- Fix Page Footer. [x]
- Upgrade WordPress from 2.8.2 to 2.8.3. [x]
- Finish About Me Page. [ ]
- Backup Site. [ ]

If anyone has any info on how do any of the *’d issues, please leave a comment on this post it will be most appreciated. :(

A Real Job

Today I had my interview and it appears that I have the job. I’ll be working as a kitchen assistant in a carehome. Also the pay isn’t half bad and I done a bit of math and I should be able to save £1100 by the end of the school holidays meaning I’ll be able to get a nifty laptop when I go back. :D

EvoCannon 2 (Ai Demo)

In the process of creating a sequel to EvoCannon, I realised that the original Ai for the Dumb Enemies was pretty unintresting. Previously they would follow the player around in the same direction, eventually overlapping. I therefore decided to re-code the Ai so that the enemies now bounce off each other and reacted to each others presence, instead of getting entaggled together. As well as this I’ve made them all move at different speeds every frame, so here is the result:

EvoCannon 2 (Ai Demo)

Controls:

WASD/Arrow keys = Movement
Space = Spawn enemy (more than 20 will lag considerable)
P = Pause

Search
Categories