June 2009
24 posts
3 tags
Box2D: Collision Space in Level Editor
I stayed up late and wrote code. Holding ‘B’ in the level editor draws collision boxes which create static Box2D shapes. These save and then load in-game and prevent Box2D objects from wedging between what would have been joins between touching tiles.
This removed a major glitch from the game (and Box2D engine?) allowing for a smoother game experience. Now I need to work out a few...
4 tags
Major Change: Physics
I’ve done a lot of work over the last couple of days rewriting buggy code. I scraped a lot of the in-game physics and brought in an external engine, merging it with the engine we already had. I don’t think the transition could have been any smoother, which is all any programmer could hope for.
The outside code is open source, so we aren’t limited in its uses. I used the Java...
4 tags
4 tags
2 tags
5 tags
[Solved] Friction Problem
Solved: See this post.
So, now that I have drag, expressed as:
k1=.09;
k2=.01;
drag=(k1*accAccumX)+
(k2*(accAccumX*Math.abs(accAccumX)));
accAccumX-=drag;
grandVelX=accAccumX;
My objects will reach a maximum velocity and slow down accordingly. However, they don’t slow down appropriately when on the ground. What I need to devise is a...
6 tags
Drag as a Result of Speed
I was having a lot of problems trying to create a drag force as a result of speed. I finally got it after realizing that you don’t multiply the drag to the acceleration you add it as it’s an opposing force.
For anyone interested the code looks like this:
k1=.09;
k2=.01;
drag=(k1*accAccumX)+ (k2*(accAccumX*Math.abs(accAccumX)));
...
Fixed my update problem
If you haven’t seen my problem check the post below. I was having a problem where objects affecting each other (in terms of force) wouldn’t show their effects on the second object until the next update cycle. The objects being affected would appear to lag because it wouldn’t be until the next update cycle that the changes were shown.
By adding a list of all the forces acting on...
3 tags
[SOLVED] Great game physics book not helping
I’m reading Game Physics Engine Development by Ian Millington. It’s helping me figure out lots of collision and force related equations. However I still have a code problem this book isn’t helping to resolve. Let me break it down:
The game has a main cycle…
1. Update every object
2. Draw the result
3. Repeat
A problem occurs when an object applies force to another...
4 tags
Video capturing = yay!
It turns out my video codecs were corrupt. I reinstalled them and got my hands on Camtasia, it’s an awesome program for capturing and editing video. I won’t be uploading crap videos anymore.
-James
2 tags
Glitch-free
I just spent a couple of hours toying with the level editor trying to remove glitches. At this point all known bugs are dealt with and the level editor is extremely stable. This is good. very good. :D
That doesn’t mean there are no bugs, though. Building a game from the ground up is a long treacherous road and it’s inevitable that you’ll build bugs into your system you...
James is working on getting a screenshots page up. Most of them are from older versions, with older art work.
-Zach
3 tags
a little progress today...
James added some streamlined tools to the level editor. Meanwhile I made a couple more tiles today. Hopefully later today I can get a small map made to test out the new art.
-Zach
3 tags
DevBlog Updated
Added a custom twitter feed and a contact page for the Development Blog. Send us a message!
-James
3 tags
Major Update: Physics
Yesterday I took a chance and made the physics code independent from the main character. To test that it worked I threw it on some other objects… and after some minor debugging I got it to work! This means very good things. We can throw physics on boxes, or badguys, or even switch player control from one object to another. It’ll be interesting to see what kinds of puzzles and traps the...
Hey!
Hey, its our first day of having the Dev blog up! There is much in the works and this blog was number one on the list.
-Zach