Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
2 registered members (TipmyPip, 1 invisible), 18,731 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Optimization, does this look about right? #253168
02/23/09 09:29
02/23/09 09:29
Joined: Feb 2009
Posts: 6
Colorado USA
S
snow4dayz Offline OP
Newbie
snow4dayz  Offline OP
Newbie
S

Joined: Feb 2009
Posts: 6
Colorado USA
I think I may have put together a system that is a bit extreme, however I thought I would run it by the community to see what you all think.

The game will be a multiplayer game with multiple zones, so I thought having a pre, intermediate and post level loading system would be necessary.

Code:
// Includes
#include <acknex.h>
#include <default.c>

// Post procedures after the level loads.
int post_level_load(int level) // int level passed from do_load_level(), in this source file.
{
	fps_max = 60; // Save on processor load.
	fps_lock = ON;	// Lock it down.
	   switch(level)
	   {
	   	case 1:
			wait(2);
	   	break;
	   	
	   	default:
	   	printf("Error: The level loaded, but post processing failed!");
	   	break;
	}
}

// Load the level.
int do_load_level(int level) // int level is handed off by do_pre_load_level() in this source file.
{
	   switch(level)
	   {
	   	case 1:
	   	level_load("prison.wmb");
	   	post_level_load(level);	   	
	   	break;
	   	
	   	default:
	   	printf("Error: trying to load a level that does not exist.");
	   	break;
	}
}

// Add in generic level optimization code here, also will be used for multiplayer capabilities.
int do_pre_load_level(int level) // Level is passed in by main() in main.c
{
	video_mode = 11; // 1200x1600 resolution 
	do_load_level(level);	
}


Again this might be a bit extreme or it may not be, if you have any pointers, I would be glad to listen!

-Snow

Edit:

Also wondering if 3DGS has logging facilities? I would like to log when a level is loaded and optimized.

Last edited by snow4dayz; 02/23/09 09:32.
Re: Optimization, does this look about right? [Re: snow4dayz] #253197
02/23/09 13:31
02/23/09 13:31
Joined: Jan 2003
Posts: 4,615
Cambridge
Joey Offline
Expert
Joey  Offline
Expert

Joined: Jan 2003
Posts: 4,615
Cambridge
What is this code supposed to do?


Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1