Jump to content


unscmaster

Member Since 05 Oct 2008
Offline Last Active Sep 02 2011 07:42 PM

Topics I've Started

3d texture anti-aliasing

30 May 2011 - 11:53 PM

I'm trying to get the edges of this 3d object to be anti-aliased. Here is the original result.
Posted Image
I moved the gradient box texture in more to blur the edges, but now the edges that you don't see straight at look split, and I don't want that. I just want all the edges to be anti-aliased.
Posted Image
Does anyone have any ideas on how to do this? I found some AA engines but all the links are dead.
EDIT: I just tried using a scaling method, but it cuts the fps from 600 down to 200, and it looks like more of a glow  than a anit-aliasing.

Video Resolution Formats

30 May 2011 - 07:06 PM

I'm trying to see what video resolution formats GM supports. Here is a list of one's that work on my monitor, and their specifications. If anyone knows any more that work on their monitor please let me know. I am trying to make a game that supports all the screen resolutions so it can be ported to other platforms.

|__Video Resolution__|__Video Format__|__Video Size__|
|________5:4________|_____SXGA_____|__1280x1024__|
|________4:3________|_____VGA______|__640x480____|
|________4:3________|_____SVGA_____|__800x600____|
|________4:3________|_____XGA______|__1024x768___|
|________8:5________|_____WXGA_____|__1280x800___|
|________5:3________|_____WXGA_____|__1280x768___|
|________16:9_______|____HD 720_____|__1280x720___|

EDIT: Here are some additional questions...
Why do I get an "out of system resources" error message when changing to any resolution other than my current one, SXGA?

speed equation

25 May 2011 - 12:33 AM

Ok so I have a ship with multiple factors affecting its speed.
Here is the equation I have so far.
//ship speed
global.ship[0]=((2*global.afterburners[0])-((global.hull[0]+global.shields[0]+global.vacuum[0]+global.guns[0]+
global.lasers[0]+global.bombs[0]+global.missiles[0]+global.afterburners[0])/20))*((global.hull[2]+global.shields[2]+global.vacuum[2]+global.guns[2]+global.lasers[2]+global.bombs[2]+global.missiles[2]+global.afterburners[2])/(global.hull[1]+global.shields[1]+global.vacuum[1]+global.guns[1]+global.lasers[1]+global.bombs[1]+global.missiles[1]+global.afterburners[1]));
the arrays [0]=level [1]=maxhp [2]=hp
I also have global.ship[3]=2 which is the ship weight. I need to implement it too some how.
At start I have...
//levels
global.hull[0]=1;
global.shields[0]=0;
global.vacuum[0]=1;
global.guns[0]=0;
global.lasers[0]=0;
global.bombs[0]=0;
global.missiles[0]=0;
global.afterburners[0]=0;
Does anyone have any ideas for fixing this equation. I'm trying to make it logical, but not super realistic.

EDIT:
Just to clarify my equation so far,this is the ship integrity factor...
((global.hull[2]+global.shields[2]+global.vacuum[2]+global.guns[2]+
global.lasers[2]+global.bombs[2]+global.missiles[2]+global.afterburners[2])/
(global.hull[1]+global.shields[1]+global.vacuum[1]+global.guns[1]+
global.lasers[1]+global.bombs[1]+global.missiles[1]+global.afterburners[1]))
This is the eqipment size factor based on level. The higher the level, the bigger it gets.
((global.hull[0]+global.shields[0]+global.vacuum[0]+global.guns[0]+
global.lasers[0]+global.bombs[0]+global.missiles[0]+global.afterburners[0])/20))
...and the beginning of the code is to increase the speed based on the level of the afterburners, which starts at 0. Thats why my equation always =0, but I need it to start at 0.

EDIT#2:
Nevermind I came up with one. I changed the ship[0] to ship weight because I defined it first in the new script. Check out this equation and tell me what you think. Seems to look good.
//ship weight
global.ship[0]=(global.hull[0]+global.shields[0]+global.vacuum[0]+global.guns[0]+global.lasers[0]+global.bombs[0]+global.missiles[0]+global.afterburners[0])/5;
//ship speed
global.ship[1]=((2+global.afterburners[0])/global.ship[0])*((global.hull[2]+global.shields[2]+global.vacuum[2]+global.guns[2]+global.lasers[2]+global.bombs[2]+global.missiles[2]+global.afterburners[2])/(global.hull[1]+global.shields[1]+global.vacuum[1]+global.guns[1]+global.lasers[1]+global.bombs[1]+global.missiles[1]+global.afterburners[1]));

Key codes

17 April 2011 - 08:29 PM

What are the values of the key/button codes for the keyboard and mouse. For example, vk_left=37 vk_up=38 vk_right=39 vk_down=40. They can't be ascii values, because the ascii values correspond to different keys. So what are they?

Never mind. I found them after a lot of searching here...
http://msdn.microsof...y/ms927178.aspx

3d array error

02 April 2011 - 01:14 AM

My problem is either the values aren't storing in the arrays or the arrays cannot be drawn the way I'm using them.

___________________________________________
ERROR in
action number 1
of Create Event
for object object0:

Error in code at line 7:
sp_point[0,point[PID,PXY]]=import_sp_point("passwords.sp",0,PID,PXY);
^
at position 21: Unknown variable point

Here is the create event...
sp_name[0]=import_sp_name("passwords.sp",1);
sp_count[0]=import_sp_count("passwords.sp",1);
for (PID=0; PID<sp_count[0]; PID+=1) {
    for (PXY=0; PXY<=1; PXY+=1) {
        sp_point[0,point[PID,PXY]]=import_sp_point("passwords.sp",0,PID,PXY);
        }
    }
sp_name[1]=import_sp_name("passwords.sp",10);
sp_count[1]=import_sp_count("passwords.sp",10);
for (PID=0; PID<sp_count[1]; PID+=1) {
    for (PXY=0; PXY<=1; PXY+=1) {
        sp_point[1,point[PID,PXY]]=import_sp_point("passwords.sp",1,PID,PXY);
        }
    }
and the draw event...
draw_text(x,y,sp_name[0]+": "+sp_count[0]+"#");
for (PID=0; PID<sp_count[0]; PID+=1) {
    for (PXY=0; PXY<=1; PXY+=1) {
        draw_text(x,y,"Point["+PID+","+PXY+"]="+sp_point[0,point[PID,PXY]]+"#");
        }
    }
draw_text(x,y,sp_name[1]+": "+sp_count[1]+"#");
for (PID=0; PID<sp_count[1]; PID+=1) {
    for (PXY=0; PXY<=1; PXY+=1) {
        draw_text(x,y,"Point["+PID+","+PXY+"]="+sp_point[1,point[PID,PXY]]+"#");
        }
    }
I'm too sleepy to spot the error, so can someone please help me out here. Also if anyone knows where I can find an array flattening workaround tutorial, because I've had no luck finding one.