Mmorpg

Hi everyone,

I have been hard at work on an MMORPG using blender 249b, some people here requested an update thread a while back and due to work schedules and some serious net problems on my development machine I am just getting to it now.

The Project is Code Named: Project Bane
it is not yet open to public input as most of the work is very critical coding at the moment.
Later in the life of this project I will however be looking for general input and may post topics here for people to contribute to.

So where am I on this project?
I have an account client with custom text rendering scripts/set-ups that allow auto-scrolling and text wrapping. currently there are a few topical bugs on backspace but nothing serious.

I have a map Loader and file system, objects are dynamically loaded from exterior files in game.

I have the start of a character designer

I have several server scripts that I’m working with many are functional but due to net problems untested.

I have a client login script.

Game-play- pre done, I had been testing simple game-play principles in blender for a long time all I will have to do is string them into network messages and such.

Right now, before I get to testing the server, I do still have a few questions about code and may periodically ask those in the coding section of the forum, keep in mind this project is using older python, however most features you shoot at me in new python blenderese I can translate to 249ese to some capacity.

Models, thats the fun part, I already have a good handle on graphical works after close to 9 years testing out how to make various forms and make them move.

Sound dev, I am using midimaker, lmms and wav editing software to output sounds and music.

so that’s where I’m at, at the brink of do or die lol. testing the server will commence and a few questions already need answers.

No screenshots? How well is networking handled? Have you tested it with non-LAN-connected machines?

When you’re ready, give us a client that we can connect to a server to and see how it all works, maybe we could do a little pvp or something to test your connection protection.

Thanks for the reply, I have been working hard to fix my net problems, I thought it was just bad registry values, but it turned out I baked my network adapter by accidentally leaving it on and putting it in my suitcase, must have melted something, regardless I got a USB network adapter to replace it and now need to get back to development.

As for screen shots, I could take one but it’s not that impressive visually yet just a bunch of place holder cubes and planes with some textured text objects and alot of code.

so this months update is I fixed a technical problem which was preventing me from testing the server build.

Most of networking is simple cubes moving :wink:

yep, it’s just a matter of sending and receiving a bunch of dynamic messages to tell the cubes what to do and to ask the server to calculate things and send results.

the dynamic part is the hardest, but it’s just like a puzzle, right now I have IP logging that saves account names in a list with their IP to an external location that is predefined. The server processes requests by account name so there isn’t any mix-up.

the only thing I’m not sure about at the moment is how “sendto” determines where to send to:
GameLogic.sServer = socket(AF_INET,SOCK_DGRAM)
GameLogic.sServer.sendto()

I assume if the last comment in the () is a valid IP, then it is the place that it sends the info to, however if I’m wrong then how do I define the place it sends info to? I’m also unsure what happens if multiple IPs are listed (data, IP, IP, IP), does it only send to the last one? also is the message in the () limited to 2 entries (1, 2)?

these are some questions I have at the moment. another question is regarding GameLogic.IP, can it = ‘http://www.website.com’? will python look it up?

With your socket type - which would logically be a non-blocking UDP socket, you provide a tuple of host address, port to the sendto function.

Sending to multiple peers requires multiple sendto calls. You can determine who sent data to a socket by using recvfrom which returns the data and the peer address.

ok I’ll have to make the host address and port dynamic I suppose. should be easy.

I’ve practically pushed the limits of what blenderPythonSockets can do.
Setting up a UDP based network for LAN is very very easy the trouble starts at WAN
and i’m current testing TCP compared to UDP over WAN as i haven’t gotten the later to work well.

yeah so as soon as i’ve gotten that figured out will post the results here,
keep up the good work and let no one set your limits

You need to elaborate on your problem. Socket’s aren’t really that much of a concern in your application. Sending too much data is regardless of the protocol you use, a problem.

Update: new work done, I spent some time working on the game design document to get back into the swing of things after my net crash. I have a lot of story content and statistical/gameplay options defined.

I also got a link to someone else’s RPG server through PMs, this will probably end up being a massive help though I still haven’t looked through it yet due to getting set-up for living during my masters degree.

slow progress is slow. but I hope to rectify that soon with “fast progress is fast”.

Graphics will come shortly, I have decided to take a coding break and go straight for the gusto of making the visible world, some stuff is already done will be working on more today. I also have School to attend to I.E. a masters programme, but that’s only 2 days a week.

hopefully I will have a Zeta screen shot available soon, Zeta meaning that it’s not final, the set-up/placement may change.

Some scenery done, sorta, progress has been slow, easily distracted by stuff. But I got a steel texture and sidewalk texture done so I made a steel girder and sidewalks at various lengths. I have roads done but not textured. I was going to do a billboard and still will to add some narrative to the world I just need to decide on a design for it.

Next is street lamps, trees, other variations of sidewalks and sidewalk corners.

Steel:


Sidewalk:



so I put some stuff together to make a basic test grid of streets and sidewalks, I will replace the sidewalk corners later and will make curbs later, the street used needs a texture and eventually there will be buildings, also the road used is a 1 car wide road I have wider roads upto 4 cars wide and will make upto six cars wide. yes I’m aware of some holes but thats because its a test map used for placement to determine the actual map of the city to be used in my game.

None of the roads are textured, I am still pondering the UV layout for the roads and sidewalks, they may be changed.

Next is back to the server, some clean-up has been begging to be done.

the masters program I am attending is soaking up a lot of my time, so progress wont be too quick. I may also get bored and go for more graphics.

oh another note of progress, I programmed my first character AI a few days back nothing impressive just a simple AI (not a typical line follower, it has some randomization), I will make more complicated ones as time goes on, it’s easy now that I know how.

Question, in your explanation you say it should be:
GameLogic.sServer.sendto(host address, port)
then were is data defined?
GameLogic.sServer.sendto(data, (host address, Port)) ?

sorry about the noobish question, I’m just getting back into this after a few months of no python work at all.

Also to note some of the server components supplied to me by others wont work as they are for pygame, it’s ok though I think I understand it now.

blender networking can be simple.

Got the server running, got a character base model in the workings just rigging it now. wrote out a lot of game aspects such as statistics and battle calcs ETC. the project will slow a bit soon due to the start of the next (and final) semester of my master’s programe

I have a feeling this project might be able to be finished by summer with enough work. but I can be lazy… so… we’ll see, but so far it’s all coming together.

sorry for the lack of monthly updates I kinda had problems finding housing for a while most of my spare time was spent looking for flats, but now I’ve got a place so I should have more time.

OK sharing a picture of the base model.


2980 polygons

Update: 2/10/2015

Main model is rigged and the face and body are partially customizable, I’m running it through some basic animations and they have already met the praise of a Master in dance for their form. things are getting funner.

Battle battle battle, got a system in the working to store statistics and do the math under certain circumstances, most is python.

For the sake of speed to finish for august, I am working on an offline stand alone (so I have something to show for my final project for my masters degree), but once august is done I’ll go back to my server and rip the offline client into 2 one server and one client. then we should be able to play.

So, maybe someone here can tell me how to get this error to go away? it’s only a topical error (the script still works) but I’d rather not have pages and pages of errors in the console window taking up memory.

so here’s the error:

Python script error from controller "cont#CONTR#1":
Traceback (most recent call last):
File "ClickTargeting", Line 66, in <Module>
File "ClickTargeting", Line 19, in MouseTarg
AttributeError: 'NoneType' object has no attribute 'name'

and I get the error when doing :


cont.sensors['collisionsensor'].hitObject.name

but it still returns “OBCube” when I do print.

it’s just a topical thing but yeah can it be fixed?

Get rid of .name, you just need cont.sensors[‘collisionsensor’].hitObject

Later you can access each property of this object like: obj.name
However you might get this error because the object you are trying to access with .hitObject is no longer in the scene…you ended it probably somehow.

About the network, did you have some sort of a plan for it. How to send/receive different data types?
I have a limited knowledge in Python network capabilities but as far as I know from my experience you need to send “unimportant” data like players positions over UDP and “important” data like weapon hits over TCP. Also you will need threading for this, so you can send/receive data multiple times without pc lag. And you will need some kind of a “prediction method” for movements, it is impossible to synchronize movements of many players without the “bunny hopping” network issue if you don’t develop some kind of prediction method for the movements.

.hitObject returns KX_GameObject, this info cannot be stored for other purposes or re-entered into other code for example you can’t do scene.objects[KX_GameObject] it will raise a CList error that “” is not in the list because KX_Gameobject is not a string but rather an entire object. .name is necessary to get the object name so I can do things like scene.objects[OBName].

I didn’t end the object

Yes I did work out the network, you can send anything over the default connection type used in all the python networking tutorials (anything from strings, lists, and even binary file bits). getting the info to the server is half the battle for pickle style info, I’ve found that you can send button presses instead so long as the server knows how much to move you, naturally you move independent of the server and it catches up as necessary and merely routes other player’s and objects button presses to you along with default speed info for each ETC. button info is a shorter message than pickle so… and it’s not an ALWAYS so… it doesn’t take up as much network bandwidth.

of course if you want to use this method please give me credit for the idea :slight_smile: .

it will require a database on the client side as well as proper use of in-game memory storage. once you build the reading and writing databases you practically have a game.

still hoping I can get the error to go away, or set the line limit for the console window to a lower number of lines.