Gamestudio Links
Zorro Links
Newest Posts
Camera always moves upwards?
by NeoDumont. 01/12/26 09:39
Alpaca Plugin v1.5.2 Release
by kzhao. 01/11/26 13:42
Alpaca Plugin v1.4.0
by kzhao. 01/11/26 13:38
separating groups of 3 digits by a comma
by joe_kane. 01/11/26 00:01
MRC.c and WFO
by joe_kane. 01/10/26 23:58
BarOffset (default = 940 for daily bars?
by joe_kane. 01/10/26 23:46
NOMAX undeclared identifier.
by Petra. 01/09/26 21:12
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 3,543 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
promfast, joe_kane, Namitha_NN, Syndrela, agasior
19190 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