Previous Blog Next Blog
Prev/Next Blog
by date

Pong in Blockland!

Pong in Blockland!
Name:Eric Hartman
Date Posted:Feb 12, 2008
Rating:3.5 out of 5
Public:YES
Comments:YES
RSS Feed:GarageGames Blog feedor Subscribe with .
Profile Page:View profile page for Eric Hartman

Blog post
This weekend, I made pong in-game using the event system in the Blockland v9 Beta.

Video:

Recent Blog Posts
List:07/02/08 - GameDev.net Article #2!
04/03/08 - GameDev.net Article!
02/12/08 - Pong in Blockland!
09/05/07 - Blockland > 1,000,000
03/02/07 - Blockland Released...
11/01/06 - Blockland Halloween

Submit ResourceSubmit your own resources!

Tom Feni   (Feb 12, 2008 at 03:54 GMT)
Nice :)
So does that mean building your own simple games or is this a mini game that can be joined in game?

looks cool..

TomFeni

Phil Carlisle   (Feb 12, 2008 at 08:28 GMT)
Tell us more about the event system please Eric, I'm always interested in hearing how others implement thier engine architecture.

Joshua Dallman   (Feb 12, 2008 at 22:34 GMT)
Very awesome. I especially like the red buzzer at the end and how its lighting reflects on the player avatar when it goes off. Nice work.

Justin DuJardin   (Feb 13, 2008 at 00:25 GMT)   Resource Rating: 3
Quality! :D

Eric Hartman   (Feb 13, 2008 at 18:30 GMT)
@Tom: It means that you can build a device out of bricks that is, in fact, a pong game. You walk up to it and push buttons on it to play it.

The event system works via a registered list of input and output events associated with each object class. For this iteration, the only thing that can take input events is the brick class. So the input events for bricks are things like onPlayerTouch, onProjectileHit, onActivate (player clicking it), etc. Then for each of those input events, there is a list of potential targets for outputs. For example, the onPlayerTouch input event has the player, the client who owns that player, and the brick that was touched all as potential targets. Then once you choose a target, you can choose to fire any output event that is associated with that target's class. For example the player class has output events like setVelocity, damage, setScale, respawn, etc.

So if you want to make a jump pad say, you select your brick and say onPlayerTouch->Player->addVelocity 0 0 10
If you want a collapsing bridge you say OnPlayerTouch->self (thats the brick you touched)-> fakeKill 5. The brick will break on contact and respawn 5 seconds later. You can also add a delay in there for a more interesting effect.

There's a bunch of stuff you can do and I'll probably have more detailed videos when I get closer to pushing this update out.

Pat Wilson   (Feb 13, 2008 at 18:32 GMT)
Heartwarming

You must be a member and be logged in to either append comments or rate this resource.