Showing posts with label El Poho. Show all posts
Showing posts with label El Poho. Show all posts

Monday, November 8, 2010

Small engine update

Hello!
Sorry for the complete lack of updates (in case anyone reads this blog) but I've been dead busy with real life, most notably with my university and finding money to live. But never mind that.
I have made a little upgrade in my engine, namely: it now supports polygon casting.
What is poly casting you say?
Poly casting works just like ray casting except with a poly. Basically it smears a (convex) poly along a line and looking for collisions along it, giving you the time each of them (if any) happened.
In simple terms:
Let's say you have a large 16px ball that's travelling at 200 px/frame. any wall that's in between the balls' current

position and the next one is probably gonna be missed, and so the ball will glitch through them.
frame 1:





frame 2:




Using polygon casting we can prevent that as it will detect all the walls the ball went through and also record the time at which the ball entered and exit each one of them, making this perfect for fast moving objects for which a simple ray cast wouldn't be enough for.

Frame 1:




Frame 2:




Note how in the second frame the ball didn't get past the walls since it detected the collision beforehand.

Here's a video in which I show the latest updates:
1-Webs
2-Lazer
3-little demo of a triangle being cast from the player to the mouse position
4-some bullets





When I get some free time I'll make a tutorial on ray and polygon casting, in the meantime I'll also update my engine to support an entity IO system which will allow the communication between various entities. It'll prove to be mighty useful when I want for example a door triggered by a button, or to make explosions at specific events.

Till next time!
~Spliter

Sunday, December 6, 2009

El Poho going good

btw El Poho is the name of my game engine until I find a better name.
Ok, I finally added polygon collisions into it. It's a smaller version than the previous one but it's very easy to add features in it. For now the main features of it are:
-great scalability (should be easier to make a game in it now)
-Polygon-based collision system
-compact (most unnecessary features like GUI and a great number of other stuff was not implemented)
and as a bonus:
-simple yet powerful particle engine!

However I'm still planning on adding a simple GUI system for things like buttons and text at the very least, I should probably add an event system as well.
Another feature I'm working on is quite an important one: Scheduling.
So far it runs at 30 frames per second and it just waits some time between every frame to mantain that, but I need to add a feature that skips the drawing step completely if it runs too slow. So far every object in the game has a few functions like draw() and think(). With the scheduler I'll be able to set every object to think at diferent time periods, like every 1 second or every 1/20 seconds, which will make it a lot faster when I'll have to add AI support to it. With scheduling I can have AI's in Idle states that think every 5 seconds or so, or think every 1/20th second if on full alert, this'll be an enormous performance boost.

For testing the engine out I'm making a small game where you control a dust cloud. Not much to do for now as I'm having some trouble in porting things to the new collision system (what worked back then doesn't work now).


Ok, that's all for now.
maybe I'll update thig blog later this week.
-Spliter