Forum Showroom Showing off my mmo game engine

Show your interesting finds or creations off here.

Showing off my mmo game engine

Postby fox1980 » June 29th, 2010, 3:29 am

I posted this link already on another thread, but this one seems more appropriate.

http://apps.facebook.com/testmeoncenow/

Improvements on this version:

- Supports chat
- Teleport pads, they will looks like blue circles on the floor, when you step on them you'll be "teleported" to another zone
- Instancing example (when you start the demo you'll begin inside your own room, from the outside it looks like the same house, but when you enter you'll be "teleported" to your room instance, no one will be able to see your there. if you ever played World of Warcraft it's similar to dungeon instances)
- Added NPC's with limited AI (based on a finite machine state implementation) that walk around the map.

P.S : When you start the game the PlayerIO logo may appear outside the stage display area on some monitor resolutions. This is unintentional, i'm not trying to hide the logo in any way. I guess it has something to do with the way facebook handles IFrames cause it always shows whitin the stage area when i'm debugging on my local machine.

P.P.S : This is a demo, so mind the sharp edges. Feel free to leave any comments/questions/critics.
fox1980
 
Posts: 206
Joined: April 1st, 2010, 10:39 pm

Re: Showing off my mmo game engine

Postby Oliver » June 29th, 2010, 11:08 am

Heey.... looking good! The dark-red "connecting..." is a bit dramatic though :)

Are the NPC's serverside or clientside?

The logo placement: there is a showlogo method you can call that'll let you position the logo.


:)
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am

Re: Showing off my mmo game engine

Postby fox1980 » June 29th, 2010, 12:00 pm

The background truly looks ugly. I just wanted to differenciate the canvas from the rest of the components in Flex, so i just picked the first color i saw. I'll have to change that to a picture in the future.

The NPC logic is fully handled serverside. It's very simple actually, i have a BigDB table where i store the basic info about the npc, and then i have an array with waypoints. Each npc has it's own timer that will fire every second to check if the npc has reached the destination, if yes it will move to the next.
This is Lana Talikon's object in the table:

Image

I forgot about the new showlogo method, i'll use it until i find out what facebook is doing to my swf.

By the way, i would love to know what kind of fps people are getting, specially when there are moving npc's.
fox1980
 
Posts: 206
Joined: April 1st, 2010, 10:39 pm

Re: Showing off my mmo game engine

Postby Benjaminsen » June 29th, 2010, 12:19 pm

Here are my stats when I and an NPC are moving: http://o.ogmy.com/b46538ea8431db1d1c50f73055dfed1e.png

Are you using QuickConnect to auth towards the Facebook API? And if so, do you need help getting the flash Facebook API up and running so you can pull data directly from flash?
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: Showing off my mmo game engine

Postby fox1980 » June 29th, 2010, 12:35 pm

The fps don't seem bad, considering your using a debug version of flash. I found out there's a 20fps disparity when using the normal vs the debug version of flash. I'll add more npc's and increase the map size later, i would like to see where my limits are.

I'm using QuickConnect and it's working fine, but i never managed to use the FB api directly from Flex. There are little samples out there and even the ones on adobe site didn't work for me. What i'm doing at the moment is using the PHP client API, and pass what i need to flash trough flashvars. If you have any basic example, even if it just pulls the name of the user, i could learn from there. It would surely be a big help.
fox1980
 
Posts: 206
Joined: April 1st, 2010, 10:39 pm

Re: Showing off my mmo game engine

Postby Benjaminsen » June 29th, 2010, 12:42 pm

Cool, let me see if I can wrap something together quickly.

Will likely be via quickConnectPopup but the principle is the same.

/Chris
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: Showing off my mmo game engine

Postby fox1980 » June 29th, 2010, 12:58 pm

The popup is something i would like to avoid. It's kind of weird being inside facebook and then getting a popup to authenticate again. Most flash games in FB don't open any popup and still manage to draw the user info in flash, so is the popup really needed ?
fox1980
 
Posts: 206
Joined: April 1st, 2010, 10:39 pm

Re: Showing off my mmo game engine

Postby Benjaminsen » June 29th, 2010, 1:17 pm

fox1980 wrote:The popup is something i would like to avoid. It's kind of weird being inside facebook and then getting a popup to authenticate again. Most flash games in FB don't open any popup and still manage to draw the user info in flash, so is the popup really needed ?


Naturally, I am just writing the example using facebookPopup as it's easier to show off as an example. The internals of how you authenticate towards the AS3 Facebook API are the same. Thus the examples can be used with both facebookConnect and facebookConnectPopup.
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: Showing off my mmo game engine

Postby fox1980 » June 29th, 2010, 2:28 pm

Ah i see, thanks for taking the time to do this. I really appreciate it.
fox1980
 
Posts: 206
Joined: April 1st, 2010, 10:39 pm

Re: Showing off my mmo game engine

Postby Benjaminsen » June 29th, 2010, 2:36 pm

Quick and dirty implementation here:
http://chrisbenjaminsen.com/stuff/facebookconnect.swf
Soruce here
http://chrisbenjaminsen.com/stuff/facebookconnect.zip

The file uses QuickConnect to auth, then uses the callbacks to create a valid Facebook Websession and finally uses that Websession to pull your friendslist.
Written as a FlashDevelop project for once. All the interesting code is in main.as

Setting it up require a bit of work.

1: Create application on facebook
2: Create game on Player.IO
3: Enable Facebook under QuickConnect & paste your FB Api key and Application secret into the appropriate fields
Image
4: Copy the url from Go To App Url into the connect setting on your facebook application.
Image
5: Replace the game id in main.as with your game id, and compile!
6: ???
7: Profit!
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark


Return to Showroom