Gamestudio Links
Zorro Links
Newest Posts
ZorroGPT
by TipmyPip. 02/27/26 22:06
WFO Training with parallel cores Zorro64
by Martin_HH. 02/26/26 16:03
Zorro version 3.0 prerelease!
by TipmyPip. 02/25/26 16:38
Camera always moves upwards?
by clonman. 02/21/26 09:29
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 02/19/26 13:22
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (AndrewAMD, Quad), 5,104 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
the1, alx, ApprenticeInMuc, PatrickH90, USER0328
19200 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