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
3 registered members (Akow, TipmyPip, tomaslolo), 788 guests, and 11 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 4 1 2 3 4
Default camera view & ISOMETRIC flag? #282037
07/30/09 01:25
07/30/09 01:25
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline OP
Senior Member
Galen  Offline OP
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
I'm using the default camera view in my level, with no player model/avatar or other cameras, just the default view (I have a "position" entity placed in my level, that is all). I've tried a few different ways now to apply an isometric view to the default camera view with no real success. I get errors whenever I try using the example script from the manual ("unknown camera parameter", etc). I tried setting the camera.arc to 180, and got something that looked flat at first but then quickly got hallucinogenic when I turned the camera (I currently have it set at 90). Am I missing something basic here--is what I'm doing even possible with the "default" camera view?

As always, all help is welcome.

Thanks!

Re: Default camera view & ISOMETRIC flag? [Re: Galen] #282044
07/30/09 02:28
07/30/09 02:28
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
Are you using "camera.flags |= ISOMETRIC;" ?

That should be all you need. Then change "camera.arc" to change the size of the view.

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Re: Default camera view & ISOMETRIC flag? [Re: JibbSmart] #282045
07/30/09 02:41
07/30/09 02:41
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline OP
Senior Member
Galen  Offline OP
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut

When I try that, I get a startup error:
"Parameter unknown camera Parameter"

I tried it in my display script, and then in my main level script--the same error comes up either way. Any idea what I'm doing wrong?

Re: Default camera view & ISOMETRIC flag? [Re: Galen] #282052
07/30/09 03:41
07/30/09 03:41
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
Do you mind saying what version you're using, and if you're using Lite-C or C-Script?

Jibb

EDIT: Saw on your profile A7.77, so it can't be that you're out of date. But still, are you using Lite-C or C-Script?

Last edited by JulzMighty; 07/30/09 03:42.

Formerly known as JulzMighty.
I made KarBOOM!
Re: Default camera view & ISOMETRIC flag? [Re: JibbSmart] #282125
07/30/09 13:02
07/30/09 13:02
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline OP
Senior Member
Galen  Offline OP
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
AFAIK, I'm using C-Script (it's in a wdl file). Here's the code for my main level as an example:



path "C:\\Program Files (x86)\\GStudio7\\template_6"; // Path to A6 templates directory
path "C:\\Program Files (x86)\\GStudio7\\template_6\\code"; // Path to A6 template code subdirectory
//path "C:\\Program Files (x86)\\GStudio7\\template_6\\images"; // Path to A6 template image subdirectory
//path "C:\\Program Files (x86)\\GStudio7\\template_6\\sounds"; // Path to A6 template sound subdirectory
//path "C:\\Program Files (x86)\\GStudio7\\template_6\\models"; // Path to A6 template model subdirectory
path "C:\\Program Files (x86)\\GStudio7\\work"; // Path to work subdirectory
path "C:\\Program Files (x86)\\GStudio7\\work\\Exterior GL PIX\\Horizon Pix"; // Path to HPIX subdirectory
path "C:\\Program Files (x86)\\GStudio7\\work\\Exterior GL PIX\\Textures"; // Path to textures subdirectory


string level_str = <GLMainMap.WMB>; // give file names in angular brackets
SAVEDIR "\\screens"; // Save games in subfolder "\gamesave"

////////////////////////////////////////////////////////////////////////////
// Included files
include <gid01.wdl>; // global ids
include <display00.wdl>; // basic display settings
include <doors.wdl>;
include <nogouraud.wdl>;
include <sky01.wdl>;
include <tree1.wdl>;



var myscreenshot_count=0;

function myscreenshot()
{
file_for_screen("shot.png",myscreenshot_count); // saves a screenshot to "shot123.png"
myscreenshot_count+=1;
}



function main()
{
// set some common flags and variables
// freeze all entity functions
freeze_mode = 1;
// no level has been loaded yet...
gid01_level_state = gid01_level_not_loaded;

// entry: Warning Level (0,1, or 2)
// entry_help: Sets sensitivity to warnings (0 = none, 1 = some, 2 = all).
warn_level = 2; // announce bad texture sizes and bad wdl code


// entry: Starting Mouse Mode (0, 1, or 2)
mouse_mode = 0;

// wait 3 frames (for triple buffering) until it is flipped to the foreground
wait(3);

max_entities = 6000;

// now load the level
level_load(level_str);

wait(3); // let level load
// level should be loaded at this point...
gid01_level_state = gid01_level_loaded;

//+++ load starting values

//video_switch(11,32,1); //1024x768 in fullscreen mode
video_set(1920,1200,0,1);
d3d_antialias = 1;

//file_for_screen("test-shot.png",123);


camera.flags |= ISOMETRIC;

on_s = myscreenshot;



// un-freeze the game
freeze_mode = 0;


// main game loop
while(1)
{
if(gid01_level_state != gid01_level_loaded)
{
freeze_mode = 1; // pause the game
while(gid01_level_state != gid01_level_loaded) { wait(1); }
freeze_mode = 0; // resume the game
}
wait(1);
}

}


Last edited by Galen; 07/30/09 13:03.
Re: Default camera view & ISOMETRIC flag? [Re: Galen] #282241
07/30/09 22:26
07/30/09 22:26
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
Okay, that's the problem. Firstly, that's not the way to set flags in C-Script (I think it's something like camera.ISOMETRIC = ON;), but MORE IMPORTANTLY: The ISOMETRIC flag is only supported in Lite-C, so camera.ISOMETRIC = ON; won't work anyway.

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Re: Default camera view & ISOMETRIC flag? [Re: JibbSmart] #282251
07/30/09 23:41
07/30/09 23:41
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline OP
Senior Member
Galen  Offline OP
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
Ah-ha! Thank you very much for figuring that out.

Do you (or anyone else) know of a way to mimic an isometric camera view in c-script? Or... Does my existing code look like it could be ported to Lite-C without too much trouble?

Re: Default camera view & ISOMETRIC flag? [Re: Galen] #282259
07/31/09 00:27
07/31/09 00:27
Joined: Mar 2006
Posts: 3,538
WA, Australia
J
JibbSmart Offline
Expert
JibbSmart  Offline
Expert
J

Joined: Mar 2006
Posts: 3,538
WA, Australia
It shouldn't be too hard to port to Lite-C. One of the big things if I recall (I haven't done C-Script in a while) is C-Script is relatively lazy when it comes to syntax, and that often makes conversion difficult, but from what I can see so far you should have no troubles converting. The sooner you do it, the less painful it'll be. Lite-C's also faster than C-Script.

Alternatively, if you want to stick with C-Script (a lot of people stick with it until their current project is over, and then start afresh with Lite-C on their next project), you could have an almost ISOMETRIC view by putting the camera very far away and decreasing the camera.arc (that is, zooming in really far).

Jibb


Formerly known as JulzMighty.
I made KarBOOM!
Re: Default camera view & ISOMETRIC flag? [Re: JibbSmart] #282268
07/31/09 02:11
07/31/09 02:11
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline OP
Senior Member
Galen  Offline OP
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
Thank you very much for the help! I'll take a look at both options, though probably at the conversion first since my scripts are fairly short.

Re: Default camera view & ISOMETRIC flag? [Re: JibbSmart] #282659
08/02/09 23:13
08/02/09 23:13
Joined: Aug 2005
Posts: 336
Connecticut
Galen Offline OP
Senior Member
Galen  Offline OP
Senior Member

Joined: Aug 2005
Posts: 336
Connecticut
Well, I tried both suggestions... to no avail. I spent most of the day trying to clean up my code and convert from C-Script to Lite-C, and it just didn't want to work for me. I suppose I could spend more time on this, but I'm thinking that the eventual outcome isn't really going to help me much anyway with the ISOMETRIC view... I'm still limited in the size of the picture I can take, resolution-wise, and taking a bunch of closer-up pictures and then stitching them together looks like it would be a major pain (given that I tried it today and the outcome was awful).

I also tried narrowing the camera arc down to 45 degrees, and then to 25, and that did actually make it a little more "isometric". But given the resolution and stitching issues above (my level is really quite large), this won't solve my major problem of getting a detailed-enough shot in the first place. I posted about the resolution issue over in this thread in hopes that JCL or someone else with a workable solution might take notice; I included links to two games/engines that actually allow what I am trying to do with 3DGS, namely to take a screenshot of a much larger resolution than my monitor or graphics card will even support.

Page 1 of 4 1 2 3 4

Moderated by  HeelX, Spirit 

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