Three 3D games launched

March 6th, 2010

The last couple of weeks I have spent a good deal of time with Flash’s open source 3D engine Sandy. I think Sandy has the easiest API to work with and offers all the tools needed for the developer to make his/hers Flash game. The code, in my opinion, is a lot cleaner and easier to read as well among the others: Papervision and Away3D. But of course, each have their own pros and cons. The only con I can think of off the top of my head for Sandy is the z-sort (I am sure there are many others and we could argue about them all day, but I don’t want to do that).

Anyways, the last 3 games I have developed were all using the Sandy engine. One of the three games is using MochiAds API so it could be distributed through hundreds of Portals sites, so it thousands of hits compared to hundreds of hits.

Here is the list of games I have developed, I really appreciate your feedback on the games:

Neo Rider (72,000 plays – uses MochiAds)
Tunnel Rider ~400 plays so far – exclusive to Zumspiel (to play) at the moment
Squirrel Dodger ~40 plays so far – exclusive to Zumspiel (to play) at the moment, launched last night

What I think has really helped with the games is that they all have a high score list built into it. High Scores REALLY add an impact on re-playability… hmmm… I need to start working on an multiplayer game next…

AS3 > Games > Zumspiel

Prototype RPG Game – Part 2

January 3rd, 2010

A while ago I posted a Prototype RPG Game using the Sandy engine. Well, today I am not going to share the code, but how I managed to make it (I spent about 1 hour on it)… and you will probably slap your head and then go crazy making your own 3D prototype RPG game.

I suggest you go check it out first before you continue reading.

Looking at the level, you will see that there are cubes on a plane; or blocks on the ground if you prefer to call it. Also, moving your character around the stage you will notice that the blocks are randomly placed, yet evenly spaced. It’s almost like a grid of cubes/blocks on the X and Z axis. Hopefully that makes sense.

So how do you think I am managed to do the collision detection with the character? Some physics library like JigLib? No. That could have been possible, sure, but that also would have required more files, reading another documentation, praying flash doesn’t use more memory (haha, yeah right!), just to do some collision detection for some cubes.

So what did I do? I use the classic tiled based approach to accomplish this!

Go look at the Prototype RPG Game again and you will see it. I have had a lot of time developing tiled based games for fun (not any published though, ahh!) and a good amount of time on Tonypa’s tutorials on how to make the classic engine in flash. One day I decided it would be nice to make a 3D rpg game using flash, but I didn’t know how to do any collision detection… and that’s when I thought of combining the two.

The rpg prototype I presented has the camera behind the character and above the head. Its easy to change the camera to be above the character instead to give it the grand theft auto 1 and 2 game style approach. Or you can make an isometric game if you position the camera probably – and let the 3D engine do the depth sorting for you ;). Or you can make a 3D like mario platformer game. You may even be able to make a FPS (first person shooter) like this… just a thought though.

I am almost certain that most of the tutorials on Tonypa’s site can be used to make a tiled based 3D game. You would just need to rule out one of axises when doing collision detection, like I did in the prototype game. I used the Y axis for only setting the cubes and planes, then I used the X and Z axis to check for the tile collisions with the hero/character. For a mario like platformer, you wouldn’t use the Z axis and just use the X and Y axis.

A final note before you get started: don’t forget to adjust the code to consider the center points of the objects. For example, in a tiled based game the center point (or registered point) is the top left corner, the plane or a cube using anything is in the middle.

Again, I will share the code of what I done soon.

Share your thoughts on what you would now you know about this, lack for a better for word, trick.

AS3 > Flash > RPG

Speed Optimization, and updates for GOOPJS

October 5th, 2009

Yesterday I discovered something interesting in programming. When the owner/lead programmer of a framework/project writes code, he/she don’t optimize it after wards. The programmer just continues to develop on top of the existing code, adding enhancements, without improving the existing code.

I found an article on OSFlash that discusses how to optimize Flash’s Actionscript 3 language. There are several other links on that page that link to other developer’s blog experiences and finds on speed optimization. I HIGHLY suggest ALL developers to read and look into it, as well as doing their own speed test experiments (it can be quite fun actually).

I used the tips and tricks in the OSFlash article towards my GOOPJS framework, to optimize speed and memory. Using the keyword ‘var’ less when declaring a variable to save memory and time was a big help. It seems to run the tween method/animation a bit smoother. Other little fixes I did to save file size, was removing unneeded quotes for objects properties. I also implemented an Object called Overlay which opens a div on top of the page, a Class called AllowTabs, to allow tabs in textareas, rewrote the DOM Object to run more efficient and be called sooner, and other little small fixes.

GOOPJS still remains as one of the smallest Javascript frameworks out there, with a lot of commonly used effects, functions, methods, objects, and classes for programmers when developing their site. The others don’t have them built in (some do, some don’t). I believe MooTools is around 65KB, jQuery is around 55KB, and GOOPJS is 42KB at the moment.

Blog > GOOPJS > Javascript

Prototype RPG Game

October 3rd, 2009

This was requested. A request of a 3D RPG game. Well, what I to present to everyone isn’t a RPG game, but its a great prototype, and as you can see, it has great potential.

I am using the great Sandy 3D engine to accomplish this feat. What I really like about Sandy compared to the other flash 3D frameworks out there, is the simple, clean, and quick API. It has its drawbacks, but you usually can find a work around for it – sometimes.

In this example, all the hero does is walk around the stage, doing simple collision detection. Of course, this little stage can be expanded to be a small village with people walking around, people to talk to, items to pick up, trees, doors, etc. I might be able to get to this eventually, depends on the high demand.

Read the rest of this entry »

AS3 > Flash > Games > RPG

PHP Framework, and CMS… in the works

September 22nd, 2009

I have been working on a PHP framework of my own this past couple of weeks, and I would like to share it with everyone, once I have it more completed. Its highly based of the popular CodeIgniter framework, but scaled down in file size, memory usage, and its easier to find your way around the core to manipulate or change it if you please. It also allows you to the global $_GET variable. Something that annoyed the hell out of me when using CodeIgniter.

While I am developing the PHP framework, I am developing a Content Management System (CMS). The CMS I am developing was inspired by WolfCMS, which used to be FrogCMS (which is no longer in development), and TangoCMS… and myself. I am getting tired of writing code from scratch. I would say at least 60% of the code I use to write is the same from one client to the next, so the CMS I am developing will cut all that time to zero, because it will be already written and ready to go.

So far my CMS is not quite up to par with either of the CMS’s I mentioned, but it will be. Now thinking about it, the PHP framework I have doesn’t quite have all the classes as CodeIgniter either, but it has the same structure of it.

In a couple of weeks I would like to share with you my framework when its ready, and a sample demo of the CMS I am working on.

Just thought to share that with everyone, to let everyone know I am still here ;)