Jump to content


Cooleloy

Member Since 19 Apr 2005
Offline Last Active Mar 23 2010 03:20 PM

Topics I've Started

Improving Speed D3d

26 January 2009 - 08:50 AM

Hello,

I am making a 3d RPG but i have allot of problems with the game speed when i am on a normal computer.

My computer ad home is a quad core with a fast geforce card, so when i am making the game i have no lag and a steady 30 FPS.
But when i am at school i have allot of lag. I will explain some several methods iam already trying to use:

Create event camera:
d3d_start()
d3d_set_hidden(true)
d3d_set_culling(true)
texture_set_interpolation(false)

just a normal projecten, no _ext:
d3d_set_projection(from_x,from_y,from_z,obj_char.x,obj_char.y,obj
_char.z+20,0,0,1)

i also load several models and textures in a create event of my controller (so not in a draw event):
global.tex[50] = background_get_texture(bg_trainingsuit);

global.model_dagger = d3d_model_create();
d3d_model_load(global.model_dagger,'models/test.gmmod');

And when i draw a simple wall i use (draw event):

d3d_draw_block(x-20,y-5,z,x+20,y+5,z+height,global.tex[7],1,1)

I dont't use FOG because my skybox will be very ugly, and thats why i use this code:

Step event any object:
if(distance_to_object(obj_char) > global.view)
{
visible = false
}
else
{
visible = true
}

Because it is a RPG i want a big room with allot of objects like tree's, plants, and bushes.
But when i am at a normal computer like a simple dual core laptop with a old geforce, or a pentium 4. Sometimes i have terrible lag! And sometimes my D3D object are not drawing the way they draw normally. (i have this only at older computers)
My questions:

1. Do i need to use a external DLL for my 3D and which is the best to use.. (so dont use D3D functions)?
2. Are there other options to draw my d3d code instead of the draw event like my wall?
3. Do i need to use culling like i do now?
4. Maybe you have other tips for my game speed

Eloy

Instance_nearest With A Variable

08 January 2009 - 05:42 PM

Hello, i have a question... Somewhone knows a script to see the nearest instance 'player2' with the variable 'inroom' is 'true' so it will ignore the nearest 'player2' if 'inroom' is 'false' and it will check an instance further untill he finds one with 'true'. I hope some of you understand this.

I need this so i can make my enemy only shoots the player closest when inroom = true...

Walking On Boxes

29 November 2008 - 01:19 PM

Hello guys,

I am trying to do some 3D stuff but i got stuck at a very simple step. I want my character to walk over the boxes i maked but when i jump on my box i fall trought it.
Collision with the side of the box works, but walking on them is my problem. I have a simple gravity with jumping already made. Maybe somewhone can have a look at my .gmk

Download mirror

I hope one of you can help me :rolleyes:

Online Npc's

27 August 2008 - 07:25 PM

Hello,

I have searched allot at the GMC forums, but i cant find any good explanation how to handle NPC's in an online game.
I know the best way is to handle it with the server. And the server sends all the movement to the client. But how is this done if the server is not visual (so in the server you cant see players or anything)...
I hope somewhone has some good scripts or tutorials/examples that explanes NPC handling in a online game. Like fighting monsters with with your friends...

Eloy

Online Data Sending

28 May 2008 - 07:32 AM

Hi guys,

I will go soon in beta version with cube online, but before i want to release i need to handle a few things, also like game speed. Because at the moment everything works fine but not smooth (see other players walk, etc)

I am not using 39dll,
I am using SOC 3.1 and i am stay with it. (so don't come with messages like: use 39dll, no soc!)
But now i want to know what you prefer for data sending.
First, room speed. My room speed is 30, for an morpg is this the best room speed or is it better to use room speed 60 with a FPS of 60?! Will the players move smoothlier because it send more info?!?.

Second, way of sending. Do you prefer an Step event, End step, Begin step, Alarm (how much)?
At this moment i have the step event, in the step event i have a message with name, x,y, image_angle, room, etc... So this repeated all the time. But is this the fastest way of sending? or something else?

So the question is, what do you prefer?!

Regards,
Eloy