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

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

Happy Birthday to me and everyone else out there

September 27th, 2008

Today is my birthday, and that is all this post is about – its just an fyi for everyone out there.

I am still programming like crazy the past couple of weeks with Flash and PHP, brainstorming on an story for an exciting RPG game (which I am currently partnered with Dhryn, who’s site is still in the works), designing the graphics, etc. So I have been keeping busy but will share the next steps in the RPG game development shortly when things begin to settle a bit.

Anyways, the other day I had a spare minute to play with Papervision3D and come up with a “possible” 3D isometric game in the future… hopefully not to far off future. Here is a quick demo with some ugly looking graphics (sorry I didn’t have too much time to polish – but you should get the idea):

Use W, A, S, D keys to move

AS3 > Blog > Flash

The Next Big 3D Engine

June 7th, 2008

Just last week, a company from Russia called “Alternativa” released a 3D engine developed in Flash using the new Actionscript language, Actionscript 3. This 3D engine packs a powerful punch for what is capable of doing. To name a few: dynamic lighting and shadows, bum mapping, parallax mapping, automatic UV-mapping, sprite lighting, texture objects, animation system, 3D-objects interactivity, and many more. Tracking back as far as their blog lets me, the company and team have worked on this engine for over 2 years, and it currently on version 5.0.1. Very impressive if you ask me.

Well I downloaded the files to see what magic I can do. The files come in a SWC format to prevent you from peeking around in their code. Also with SWC, you need to manually place the files in the Configuration/Components directory of where you have Flash installed on your computer. After restarting Flash, I opened the Components tab and placed the packages in my Library, created a new Actionscript file, and got to work on some fun 3D stuff. Moving from 2D to 3D takes a little more thinking power, but it was a whole lot of fun doing so! Anyways, enough boring talk, let me show you what I accomplished over the past of days:

A – move left
D – move right
W – move forward
S – move backward
SPACE – jump
MOUSE – click and drag to look around

Its a small city with random color building blocks and cones. I also made sidewalks to give it a more city feeling ;). Not too much to show, I know, but again, its a new 3D engine that just came out so there is much to learn.

Blog > Flash

Star Field Optimized

June 1st, 2008

This sort of method is very useful for creating a star field. With a lot of stars. I thought of this method when reading through the book “Macromedia Flash Professional 8 Game Development” by Glen Rhodes. In his book he provides an example of creating a star field with a effect called “parallax”. A parallax effect is created by multiple objects moving at different speeds. For example, a small ball in the distance would move very slowing and a large ball would move more quickly. Both the balls are on the same level/depth, but the appearance of the different sizes and speeds give it the effect. Parallax effect is highly used to create a 3D environment.

Read the rest of this entry »

AS2 > Flash