I am wondering if anyone knows if there is any significant difference in drawing/loading of these two ways you can use models.
I have a terrain model which was a height map which i converted to a .mod file and an identical copy as d3d_model_create()... etc.
When I exported both as text files, the .mod file is about 100kb bigger then the GML Equivalent.
So does anyone know or can take an educated guess to which is/may be faster?
- Game Maker Community
- → Viewing Profile: Topics: smart_monkey
smart_monkey
Member Since 27 Sep 2008Offline Last Active Feb 01 2013 10:04 AM
Community Stats
- Group GMC Member
- Active Posts 91
- Profile Views 891
- Member Title GMC Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
-
Location
Australia GMT+9:30
1
none
Friends
smart_monkey hasn't added any friends yet.
Latest Visitors
Topics I've Started
Which Way Is Faster?
04 July 2009 - 07:06 AM
Ip Scripts
30 June 2009 - 04:43 AM
IP Scripts
I created a series of scripts which do a variety of different things with IP addresses and subnet masks. I have error checked the scripts and they do work but if anyone finds any errors, please leave a post and I may correct it.
If you use the scripts, please give credit. The Network ID script took several hours to make and fix bugs.
Also, not all scripts have full error checking, like if you format an IP address with commas then it wont work etc.
Download Link
Scripts include:
IP_Get_Class(IP);
Returns the Class that the IP Address is in. (A, B, C, D or E)
IP_Is_Real(IP);
Returns true or false depending if it is a valid IP Address.
IP_Default_Subnet(IP);
Returns the default subnet based on the class that the IP Address is in.
IP_Get_Network_ID(IP, Subnet Mask);
Returns the Network ID from the subnet mask and IP address.
(Note: This script took me hours to get fully working. If you find any problems with it tell me.)
IP_Subnet_Is_Real(Subnet Mask);
Returns true or false depending if it is a valid Subnet Mask.
IP_Convert_To_Binary(8-bit Decimal Number);
Converts an 8-bit Number to Binary. I only created this to convert each octet so I was able to "AND" them together in the IP_Get_Network_ID script.
IP_Convert_To_Decimal(8-bit Binary Number);
Converts an 8-bit Binary Number to Decimal. I only created this to convert each octet so I was able to "AND" them together in the IP_Get_Network_ID script.
IP_Useable_Subnets(Bits Borrowed "CIDR");
Using the method of (2^n-2) returns the amount of subnets avaliable.
IP_Recommend_Bits(# Of Hardware);
Enter the amount of hardware you would want on a single network and returns the Bits Borrowed (CIDR).
IP_Check_Reserved(IP);
Checks to see if an IP Address range is reserved.
(Note: I didnt finish this script yet so it does not contain all the Reserved Ranges and it is the reason why you cant try the script in the demo but it is in the GM6 file. The list of ranges is from Wikipedia.)
IP_Subnet_To_Bits(Subnet Mask);
Converts a Subnet Mask to a CIDR value and returns that value.
I created a series of scripts which do a variety of different things with IP addresses and subnet masks. I have error checked the scripts and they do work but if anyone finds any errors, please leave a post and I may correct it.
If you use the scripts, please give credit. The Network ID script took several hours to make and fix bugs.
Also, not all scripts have full error checking, like if you format an IP address with commas then it wont work etc.
Download Link
Scripts include:
IP_Get_Class(IP);
Returns the Class that the IP Address is in. (A, B, C, D or E)
IP_Is_Real(IP);
Returns true or false depending if it is a valid IP Address.
IP_Default_Subnet(IP);
Returns the default subnet based on the class that the IP Address is in.
IP_Get_Network_ID(IP, Subnet Mask);
Returns the Network ID from the subnet mask and IP address.
(Note: This script took me hours to get fully working. If you find any problems with it tell me.)
IP_Subnet_Is_Real(Subnet Mask);
Returns true or false depending if it is a valid Subnet Mask.
IP_Convert_To_Binary(8-bit Decimal Number);
Converts an 8-bit Number to Binary. I only created this to convert each octet so I was able to "AND" them together in the IP_Get_Network_ID script.
IP_Convert_To_Decimal(8-bit Binary Number);
Converts an 8-bit Binary Number to Decimal. I only created this to convert each octet so I was able to "AND" them together in the IP_Get_Network_ID script.
IP_Useable_Subnets(Bits Borrowed "CIDR");
Using the method of (2^n-2) returns the amount of subnets avaliable.
IP_Recommend_Bits(# Of Hardware);
Enter the amount of hardware you would want on a single network and returns the Bits Borrowed (CIDR).
IP_Check_Reserved(IP);
Checks to see if an IP Address range is reserved.
(Note: I didnt finish this script yet so it does not contain all the Reserved Ranges and it is the reason why you cant try the script in the demo but it is in the GM6 file. The list of ranges is from Wikipedia.)
IP_Subnet_To_Bits(Subnet Mask);
Converts a Subnet Mask to a CIDR value and returns that value.
Making Dll's
28 June 2009 - 09:33 AM
I have been looking to see if C# could be used with GM. From what it seems is that Game Maker wont work with C# Dlls unless they have a C++ (or other language) wrapper as C# is Managed Code.
I am trying to make a C++ wrapper for Game Maker but I am terrible at C++. If anyone has made a C++ (or other language) DLL which can dynamically load a C# DLL or if anyone has a C# DLL and can explain to me how to make it work, could you please contact me.
Even if anyone can point to a place where it explains how to make C# Dlls run in Game Maker, that would be great. Don't say MSDN as they dont really help making C# DLLs work in GM.
Thanks for Reading GMC!
I am trying to make a C++ wrapper for Game Maker but I am terrible at C++. If anyone has made a C++ (or other language) DLL which can dynamically load a C# DLL or if anyone has a C# DLL and can explain to me how to make it work, could you please contact me.
Even if anyone can point to a place where it explains how to make C# Dlls run in Game Maker, that would be great. Don't say MSDN as they dont really help making C# DLLs work in GM.
Thanks for Reading GMC!
Halo Mk Ii - Team Request
01 June 2009 - 12:19 PM
I need help for my new game I am creating. I mainly need a person to create sound effects and background music for my game.
I want dramatic sounding background music (kind of during fight sequences), light drum music for main menu (kind of like the Age of Empires 2 Main Menu music), and ambient background music.
For sound effects, I want a variety of sounds that you would hear if you were playing Halo. Basically explosions, gun shots and the noise that different vehicles have in Halo. (They dont need to sound identical just as close as you can make it is good)
If you are good at making 3D models of vehicles and people then your the modeler I need. I need buildings, characters, weapons and vehicles made.
I want dramatic sounding background music (kind of during fight sequences), light drum music for main menu (kind of like the Age of Empires 2 Main Menu music), and ambient background music.
For sound effects, I want a variety of sounds that you would hear if you were playing Halo. Basically explosions, gun shots and the noise that different vehicles have in Halo. (They dont need to sound identical just as close as you can make it is good)
If you are good at making 3D models of vehicles and people then your the modeler I need. I need buildings, characters, weapons and vehicles made.
External Scripts
25 April 2009 - 08:56 AM
Version 1.2
This is my script which i used for certain modding parts of my game. Also supports returning values from scripts.
This script opens the ini file and in section "SCRIPTS" it reads a key. The key contains the path to the script (a file). It executes this file. The arguments are part of a global array named whatever the key was named and numbered accordingly. The script works fine without arguments.
Here is how it works in more detail.
You have called the "start" script with arguments 12, 29, "External script".
It will open the "data.ini" file which contains a section called "SCRIPTS" with a key called "start". External_script will read the "start" key which has the path to a file. If the file exists, the global array called "start" is set with the arguments 12, 29 and "External script". The file is then executed.
To retrieve the arguments, use variable_global_array_get(key name,argument number)
You may wonder why i used a ini file instead of going straight to the file. I used this because this is what i needed to use for my game. You can take out that section and drop the code down to:
This lets you have 1 extra argument.
You may also notice that someone could steal data from your game by using one of these scripts. To combat that add the following before creating the argument array. I didnt add the script to get the file data out as i couldnt be bothered. All you need is some small simple script to read the file and return it in place of my writting "file string".
You can use these scripts and modify to your needs but I would like credit as it took me time to make the script (then write out all of this).
If anyone makes a faster/smaller version of this (eg. use an array to fill in arguments (possibly)), pm me and I will add that to the first post with your credit aswell.
Also i realise that if you didnt want arguments or file exists checking but wanted value returning you could use
This is my script which i used for certain modding parts of my game. Also supports returning values from scripts.
//Script by James Turner (Smart_Monkey)
//4/4/2009
//argument0=ini gml file to open
//argument1=key
//Arguments are in a global array with the same name as the key provided.\
//Get Function File
ini_open(argument0);
gmlfile=ini_read_string("SCRIPTS",argument1,0);
ini_close();
if (file_exists(gmlfile))
{
variable_global_array_set(argument1,0,argument2);
variable_global_array_set(argument1,1,argument3);
variable_global_array_set(argument1,2,argument4);
variable_global_array_set(argument1,3,argument5);
variable_global_array_set(argument1,4,argument6);
variable_global_array_set(argument1,5,argument7);
variable_global_array_set(argument1,6,argument8);
variable_global_array_set(argument1,7,argument9);
variable_global_array_set(argument1,8,argument10);
variable_global_array_set(argument1,9,argument11);
variable_global_array_set(argument1,10,argument12);
variable_global_array_set(argument1,11,argument13);
variable_global_array_set(argument1,12,argument14);
variable_global_array_set(argument1,13,argument15);
return (execute_file(gmlfile));
}This script opens the ini file and in section "SCRIPTS" it reads a key. The key contains the path to the script (a file). It executes this file. The arguments are part of a global array named whatever the key was named and numbered accordingly. The script works fine without arguments.
Here is how it works in more detail.
You have called the "start" script with arguments 12, 29, "External script".
external_script("data.ini","start",12,29,"External script")It will open the "data.ini" file which contains a section called "SCRIPTS" with a key called "start". External_script will read the "start" key which has the path to a file. If the file exists, the global array called "start" is set with the arguments 12, 29 and "External script". The file is then executed.
To retrieve the arguments, use variable_global_array_get(key name,argument number)
You may wonder why i used a ini file instead of going straight to the file. I used this because this is what i needed to use for my game. You can take out that section and drop the code down to:
//Script by James Turner (Smart_Monkey)
//25/4/2009
//argument0=script file
//Arguments are in a global array with the same name as the file provided.
if (file_exists(argument0))
{
variable_global_array_set(argument0,0,argument1);
variable_global_array_set(argument0,1,argument2);
variable_global_array_set(argument0,2,argument3);
variable_global_array_set(argument0,3,argument4);
variable_global_array_set(argument0,4,argument5);
variable_global_array_set(argument0,5,argument6);
variable_global_array_set(argument0,6,argument7);
variable_global_array_set(argument0,7,argument8);
variable_global_array_set(argument0,8,argument9);
variable_global_array_set(argument0,9,argument10);
variable_global_array_set(argument0,10,argument11);
variable_global_array_set(argument0,11,argument12);
variable_global_array_set(argument0,12,argument13);
variable_global_array_set(argument0,13,argument14);
variable_global_array_set(argument0,14,argument15);
return (execute_file(argument1));
}This lets you have 1 extra argument.
You may also notice that someone could steal data from your game by using one of these scripts. To combat that add the following before creating the argument array. I didnt add the script to get the file data out as i couldnt be bothered. All you need is some small simple script to read the file and return it in place of my writting "file string".
if (string_pos("string you dont want in there file","file string")!=0)
{
return("")
}You can use these scripts and modify to your needs but I would like credit as it took me time to make the script (then write out all of this).
If anyone makes a faster/smaller version of this (eg. use an array to fill in arguments (possibly)), pm me and I will add that to the first post with your credit aswell.
Also i realise that if you didnt want arguments or file exists checking but wanted value returning you could use
return(execute_file(argument0))which then wouldnt warrant for topic as its TO SIMPLE!
- Game Maker Community
- → Viewing Profile: Topics: smart_monkey
- Privacy Policy
- GMC Rules and Forum Rules ·



Find content