Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
4 registered members (AndrewAMD, fogman, Grant, juanex), 972 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
[SUB] Simple Programming Skeleton #270382
06/08/09 00:16
06/08/09 00:16
Joined: Dec 2008
Posts: 528
Wagga, Australia
the_mehmaster Offline OP
User
the_mehmaster  Offline OP
User

Joined: Dec 2008
Posts: 528
Wagga, Australia
I hope something like this hasn't been posted before...
Anyway, this is the skeleton I use for my programs when i start from scratch. It includes a poly counter, nexus value, and a few defined values. the beauty of having video_mode on a high value is that it will adapt to lower resolutions if needed. This program runs fin as it is, but isn't very interesting yet! if you have more contributions or suggestions to add to the skeleton, just post! here's the skeleton so far...
Code:
#include <acknex.h>
#include <default.c>

BMAP* arrow_map = "yourmouse.bmp" //replace this

PANEL* skeletonpan =
{
  	pos_X	= 0; pos_y = 0;
	digits ( 0, 0, "nexus: %f", *, 1,nexus);
	digits ( 0, 10, "polys: %f", *, 1,num_visentpolys);
  	flags =  VISIBLE;
}

function main()
{
	video_mode = 10;
	video_screen = 1; //1 for full-screen mode
        video_depth = 32; //usually do not change this value.
        fps_max = 60; //change to 75 for newer monitors.
        mouse_mode = 1; //both force and position are changed
        mouse_map = arrow_map
	level_load("");
	while(1)
	{
		//Insert camera movement functions etc
                vec_set(mouse_pos,mouse_cursor);
		wait(1);
	}
}

Remember to post any suggestions!
[This post is updated with new suggestions]

Last edited by the_mehmaster; 06/08/09 10:29.
Re: [SUB] Simple Programming Skeleton [Re: the_mehmaster] #270427
06/08/09 10:06
06/08/09 10:06
Joined: Nov 2007
Posts: 1,032
Croatia
croman Offline
Serious User
croman  Offline
Serious User

Joined: Nov 2007
Posts: 1,032
Croatia
video_depth, fps_max, mouse_mode(and stuff for moving mouse over screen with its own bmap) -> i always use this stuff on start of each project



Ubi bene, ibi Patria.
Re: [SUB] Simple Programming Skeleton [Re: croman] #270432
06/08/09 10:31
06/08/09 10:31
Joined: Dec 2008
Posts: 528
Wagga, Australia
the_mehmaster Offline OP
User
the_mehmaster  Offline OP
User

Joined: Dec 2008
Posts: 528
Wagga, Australia
Done.

Re: [SUB] Simple Programming Skeleton [Re: the_mehmaster] #270673
06/09/09 10:49
06/09/09 10:49
Joined: Dec 2008
Posts: 528
Wagga, Australia
the_mehmaster Offline OP
User
the_mehmaster  Offline OP
User

Joined: Dec 2008
Posts: 528
Wagga, Australia
Remember, any new suggestions welcome!

Re: [SUB] Simple Programming Skeleton [Re: the_mehmaster] #272224
06/16/09 23:05
06/16/09 23:05
Joined: May 2005
Posts: 867
Chicago, IL
Dooley Offline
User
Dooley  Offline
User

Joined: May 2005
Posts: 867
Chicago, IL
I would make all these values set to a variable, and let the game player decide through a menu interface what his/her preferences are. Each computer is different, so you want to be able to change settings.

I am working on a menu like this right now, it's a bit complicated, but I think it will look really professional when it's done.

Example: This is the idea for just one such variable...

var var_vid_mode = 1;

video_mode = var_vid_mode;

PANEL* option_panel =
{
button(bmap1,bmap2,bmap3,toggle_vid_mode(),NULL,NULL);
}

function toggle_vid_mode()
{
if(var_vid_mode == 1)
{
var_vid_mode = 2;
}
else
{
var_vid_mode = 1;
}
}

note: I just typed into the forum, this is not my actual code. You will need to define your bitmaps, put the commands inside of the main function, etc... but you get the idea. I'm also not sure if you need to restart the game for these effects to work, in which case you will need to save the variable to some sort of external file. I'm still working on it smile

Re: [SUB] Simple Programming Skeleton [Re: Dooley] #272261
06/17/09 07:12
06/17/09 07:12
Joined: Dec 2008
Posts: 528
Wagga, Australia
the_mehmaster Offline OP
User
the_mehmaster  Offline OP
User

Joined: Dec 2008
Posts: 528
Wagga, Australia
Great idea! when you're finished, post it into this thread and i'll add it to the code. I'm pretty good at photoshop so i'll make the buttons and post a download link. can't wait!

Last edited by the_mehmaster; 06/17/09 07:13.

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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