Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, alibaba), 1,426 guests, and 9 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 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 | chip programmers | 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