RPG Character Movement – Part 3

July 31st, 2008

This is the third part of the RPG Character Movement tutorial, if you are not caught up, you can check out the other two here: Part 1, Part 2

Today I would like to show how to make our hero jump onto platforms. I know from our gaming experience we usually don’t have a top down RPG hero jumping around, but in this game, we are going to have our hero jump. I will also discuss how we could have our hero swim on a later date. I think having our Hero jump around the stage can be really nice if you want to place some gold, or a hard to reach item. Speaking of which, there was a request for an item inventory which will be in the next tutorial of this RPG development series.

Before we begin making our Hero jump, we are going to have to do several updates and changes to our code and movie clips. If you follow the steps in order you should be just fine. So lets begin.

Read the rest of this entry »

AS3 > Games > RPG

Presenting Emerald and Apologizes

July 30th, 2008

Emerald CMS is no longer, sorry

First off, let me start with my apologizes for everyone not being able to post a reply or send in a request. I didn’t notice when someone tried to do either of the two that they were actually being sent to PayPal instead. This mistake was fix with the help from Shaun emailing me directly to notify me of the issue. I don’t want anyone to pay me to reply to a post or send in a tutorial request, I greatly appreciate any comments. That “Pay Me” button is for donations and clients only.

Again, sorry for that. So please fill free to reply or request away.

Now on to Emerarld CMS.

Emerald CMS at this point in time isn’t a CMS. As of now, its several files which you could download at look through, and its based of one of my recent tutorials, Basic File Structure, at the mean time. What I imagine Emerald to be, is not just an opened source CMS, but an open minded CMS where developers can share their ideas, advice, thoughts, opinions, code, and help into making it a CMS which they feel comfortable to use for their client work. I hope the programmers look toward the Emerald CMS as a kick start for their work to get all their sites going at first and only make a few adjustments to fit their, or clients, needs. I also imagine it being used by non-code heads for their shopping cart site, or a large message forum, or schedule management, etc.

Again, these are just my visions with Emerald, I am not set on it being one or the other or both. Right now, I do hope it turns out to be useful for both coders and non-coders.

Blog > Website


July 24th, 2008

When dealing with forms its very important to validate what the user entered so you don’t get false email address, phone number, zip code, etc. There are multiple ways to validate what the user entered in the input field of your form(s). The way I suggest and I am going to share with you is through Javascript. I wrote a nifty little function called validate which takes the two required parameters, the first being what you want validate, and the second is the value or string to validate/test it with. Here is the function:

function validate(what,str) {
if(what == “email”) {
// sample@sample.com
var filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
return filter.test(str);
} else if(what == “phone”) {
// (123) 456-7890
var filter = /^\([1-9]\d{2}\)\s?\d{3}\-\d{4}$/;
return filter.test(str);
} else if(what == “num”) {
// must be a number, or can’t be zero
if((str / str) == 1 && str != 0) { return true; }
else { return false; }
} else if(what == “zip”) {
// 12345 or 12345-1234
var filter = /\d{5}(-\d{4})?/;
return filter.test(str);
} else if(what == “date”) {
var filter = /^([1-9]|0[1-9]|1[012])\D([1-9]|0[1-9]|[12][0-9]|3[01])\D(19[0-9][0-9]|20[0-9][0-9])$/;
return filter.test(str);
} else if(what == “url”) {
// http://www.sample.com or www.sample.com
var filter = /(ftp|http|https):\/\/(\w+:{0,1}\w*@)?(\S+)(:[0-9]+)?(\/|\/([\w#!:.?+=&%@!\-\/]))?/;
return filter.test(str);
} else if(what == “ext”) {
// personally, I only accept images with jpg/jpeg, gif, or png format. But this can anything to your liking
str = str.toLowerCase();
if(str.lastIndexOf(“.jpg”) == -1 && str.lastIndexOf(“.jpeg”) == -1 && str.lastIndexOf(“.gif”) == -1 && str.lastIndexOf(“.png”) == -1) { return false; }
else { return true; }

This function does a lot different validating and testing, and of course this can continue to grow to your pleasing. As of now, the function is set up to return either true or false. I suggest keeping it this way if you plan adding or changing some of the regular expression checking. This is how to use the function:

// get the phone value from the form
var phone = document.forms[0].phone.value;

// validate the phone number
if(!validate(“phone”,phone)) {
alert(“Invalid Phone Number entered”);

If the phone number is invalid, then it will do an alert telling the user that they didn’t enter the correct syntax for the phone number. If it was entered correctly then it was entered correctly and javascript will continue with the rest of the script.

I hope you find this useful. Enjoy!

Javascript > Website

Ball Dodger

July 19th, 2008

Today I would like to share a game called “Ball Dodger”. The concept of the game is very easy: dodge the oncoming balls by using your mouse. This might not sound very fun, but it is and can be very addicting. In the Ball Dodger game we are going to build, we are going to add two game elements to make it more challenging: collecting items, and faster spawning of balls to dodge. Here is what the game will look like in the end (if the timer in the top left has stop, refresh your browser):

Read the rest of this entry »

AS3 > Games

What is Zumspiel (to play)

July 15th, 2008

I have several projects under wraps right now that have been keeping me a little tied down, some projects are for clients and others are of my own, one of which is called: Zumspiel (to play). This is a future flash game portal website which functions and works very similar to ArmorGames.com and CrazyMonkeyGames.com, two sites which motivated me to create Zumspiel.

With Zumspiel, you can be a small or large, individual or team based, flash game developer(s) and post games for everyone “to play” (that is what Zumspiel stands for), to vote, and to leave comments. Signing up with Zumspiel is free, and always will be. When signed up, you may post games and change your avatar to be an image of your company. Those who don’t upload an image may select a cool looking avatar from the default provided. You may add friends (other gamers who have signed up) and favorite flash games to your profile. Also, There are also several other little, yet exciting and fun, features that gamers can do when they sign up, but I am keeping those surprises under wraps until it finally ready.

Zumspiel right now is in beta stage and those who are wanting to test the site will have to ask, nicely. The reason I say beta stage, and to ask nicely, is because there is still a lot content and planned pages that are not developed, Terms and Conditions page (yuck), FAQs, Forums, etc. I would love to have you play around the site and give me your thoughts and comments or suggestions or any unknown bugs.

I REALLY want to make this site for flash gamers by hearing their needs, while keeping this a place for flash developers to be excited and motivated to post their games for the hungry flash gamers.

Please send me your email in a non-linkable format (example, myemail [at] mysite [.] com ), and I will send you the password to view the beta version of Zumspiel (to play). I will also remove your email from the comments section immediately.