About Store Forum Documentation Contact



Post Reply 
game server can't create 3D device
Author Message
yvanvds Offline
Member

Post: #1
game server can't create 3D device
Hello again.

After adding APP_ALLOW_NO_GPU to my server software, I'm no longer getting the shader error. But now the program halts on:

can't create 3D device.

I guess it's not that strange. I have this hosted on a win2003 server, datacenter edition in a virtuozzo container. So yes, it's a vps. Is there a way around this?

I see two options myself:

1. use swiftshader to emulate the 3d device by software on the server. This can only be a temporary solution in my opinion.

2. See if it's possible to create a windows form application and have access to the esenthel structs i need, like the socket, memory containers etc. Has anyone tried this yet? If it's just impossible, I might just as well now that before i start trying :-) I suppose there's a main function in the lib somewhere, so would have to get that one ignored and use my own.
05-12-2011 05:05 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #2
RE: game server can't create 3D device
did you install directx runtime?
05-12-2011 05:32 PM
Find all posts by this user Quote this message in a reply
yvanvds Offline
Member

Post: #3
RE: game server can't create 3D device
Yes, i did. I just tried to reinstall it, to be sure. And got a message that the newest version is already installed.

Using swiftshader to fake directX works, but it's probably not a good idea to run my server like this.
(This post was last modified: 05-12-2011 05:43 PM by yvanvds.)
05-12-2011 05:34 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #4
RE: game server can't create 3D device
probably it's because it's a vps.

you can use 1)
or
3) do some server code in InitPre, it still should get executed (however making server in InitPre is experimental)
05-12-2011 05:42 PM
Find all posts by this user Quote this message in a reply
yvanvds Offline
Member

Post: #5
RE: game server can't create 3D device
Just to be sure, but I guess the startup code below is all ok for a server?

void InitPre() {
App.name("Attr-x Server");
App.flag=APP_WORK_IN_BACKGROUND|APP_NO_FX|APP_MINIMIZABLE|APP_ALLOW_NO_GPU|APP_R​ESIZABLE;
D.sync(true);
D.mode(320, 240);
Renderer.type(RT_SIMPLE);
D.shdMode(SHADOW_NONE);
DataPath("Data");
Paks.add("engine.pak");
}
05-12-2011 05:51 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #6
RE: game server can't create 3D device
yes
05-12-2011 05:52 PM
Find all posts by this user Quote this message in a reply
yvanvds Offline
Member

Post: #7
RE: game server can't create 3D device
well, it does run now. A screenshot can be found below. Server takes about 30-40 % of processing power while running. But I wonder why this goes up to 50-60% when I minimize the program?

I think I read something like this a while ago on the forum, but i thought it was fixed long since?

   
05-12-2011 06:53 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #8
RE: game server can't create 3D device
it means it goes at max speed = normal
you can do Time.wait if you want to use less cpu
05-12-2011 06:57 PM
Find all posts by this user Quote this message in a reply
yvanvds Offline
Member

Post: #9
RE: game server can't create 3D device
Ok, thanks. Got the game server up and running now. Stats are pretty good. With windows server 2003, MsSQL server 2005 on a vps with a xeon 2.26GHz cpu (i get 2 cores): cpu usage between 4 and 10% (Some spikes up to 60% but not related to the game server. I'm using 228Mb of ram.

Seems using swiftshader is not that bad at all. I've added a Time.wait(100) to my update function.

Now I'll have to find some more users to test how it will perform with a lot of players. :-)
05-14-2011 02:02 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #10
RE: game server can't create 3D device
remember Time.wait(100) will limit server to 10 Updates per second
Time.wait(1) should be enough

I would reduce your server window size ( less pixels for software drawing), or minimize the app window
05-14-2011 02:12 PM
Find all posts by this user Quote this message in a reply
yvanvds Offline
Member

Post: #11
RE: game server can't create 3D device
I knew that, but I thought update and draw were called after each other? Because I never get more than 10 fps on this vps, I figured that more updates wouldn't make sense. Or are they in separate threads?
(This post was last modified: 05-14-2011 04:31 PM by yvanvds.)
05-14-2011 04:31 PM
Find all posts by this user Quote this message in a reply
Esenthel Online
Administrator

Post: #12
RE: game server can't create 3D device
1 thread
05-14-2011 07:00 PM
Find all posts by this user Quote this message in a reply
Post Reply