Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 07 Jan 2006
Offline Last Active Mar 06 2011 08:21 PM

Posts I've Made

In Topic: MMO Architecture

19 February 2011 - 05:42 PM

In my setup the Login Server handles everything before entering the world (Login, Character Creation, Character selection). Once the player selects the character he/she wants to use and presses Enter World the Login server sends the Connection Information for the Region server to the client and then the client disconnects from the login server and connects to the Region server.

In Topic: C# Variables imported into a IronPython Script

27 January 2011 - 09:52 PM

After I write this I will be fooling around with this myself but in case I can't figure it out how would I get some Variables into a Python Script?

I have a IronPython Scripting Engine that I wrote that I am able to Load Python Scripts into my Server. However now I would like to have the Combat Calculations done with in a python script so I can tweek them with out having to always recompile my server. In order to do that I will need to get the id of the attacker and the victim so I can use it in the script. How would I do that?

You should be able to create a ScriptScope from the IronPython engine and create / retrieve variables.

See if this helps: http://www.voidspace...r_hosting.shtml

Figured it out! Thanks!

In case any one else wanted to do something similar here is my code:

public PythonCombatResult doCombat(long victimId, long attackerId)
            //Put the needed Variables into Python
            scope.SetVariable("victimId", victimId);
            scope.SetVariable("attackerId", attackerId);

            //Execute Python Script
            engine.ExecuteFile(_nonImportDirectory + "Combat.py", scope);

            //Retrieve the needed Variables from Python
            float playerHealth = (float)scope.GetVariable("playerHealth");
            bool won = (bool)scope.GetVariable("won");

            //Create and populate the result structure
            PythonCombatResult result;
            result.attackerWon = won;

            //Debug Write to Console

            //Return the results
            return result;

scope.SetVariable("victimId", victimId);

this line takes a C# variable and places it into Python accessable by the string name in this case victimId

float playerHealth = (float)scope.GetVariable("playerHealth");

This line of code gets a Python Variable and puts it into C#

In Topic: Hadeon Online - (M) MORPG

13 December 2010 - 04:27 AM

Seems like from your story idea that every person will be THE Hero. For a MMO you really can't have a story thats based on a single hero and have every person be that hero. For a MMO you need a story involving many heros and let the players be those heros.

For example have the story be about a Army and let the players be the members of that army.

Also 6 months may not be realistic depending on what your aiming to release with the first Alpha Test. What features do you want to be complete at the first Alpha test? Depending on the size of your team my best suggestion is to aim to have a Authentication system in place and then the ability to move around and chat with other players online. Maybe a few buildings, trees, ect scattered around the place to make it more interesting.

PM me if you would like help with programming! My engine could be ready for a first alpha test like I am describing in about 3 months instead of 6 months!

In Topic: Computer crash/Virus

05 November 2010 - 03:04 PM

Original post by tstrimp
By "these forums" I assume you mean some shady porn site. [grin]

Nuke it from orbit, it's the only way to be sure.

lol no by these forums I mean Gamedev.net I was waiting for a reply to my post in the Game programming forum about Terrain paging.

In Topic: Computer crash/Virus

05 November 2010 - 02:48 PM

Ok why does it say some one responsed yet I am unable to see the response?