Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (degenerate_762, AndrewAMD), 846 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Irritating error message #416720
02/03/13 19:49
02/03/13 19:49
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline OP
Expert
Uhrwerk  Offline OP
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
Hello Mr. Lotter,

please have look at the following code snippet:
Code:
#include <acknex.h>

void main()
{
//	level_load(NULL);
	MATERIAL* m = mtl_create();
	effect_load(m,"whatever.fx");
}


This will result in
Originally Posted By: Malfunction W1507
Video functions not available before first frame

If you however uncomment the level_load instruction the snippet will work as expected though it is still executed before the first frame.


Always learn from history, to be sure you make the same mistakes again...
Re: Irritating error message [Re: Uhrwerk] #416722
02/03/13 20:00
02/03/13 20:00
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
I'm not a 100% sure but level_load does not necessarily take only one frame (the rest of the game/ schedular gets halted, of course), check the on_level event for example.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Irritating error message [Re: Superku] #416726
02/03/13 20:50
02/03/13 20:50
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline OP
Expert
Uhrwerk  Offline OP
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
AFAIK level_load does not take any frame at all to complete. You can also check the following snippet:
Code:
#include <acknex.h>

void main()
{
//	level_load(NULL);
	MATERIAL* m = mtl_create();
	effect_load(m,"whatever.fx");
	printf("total_frames = %d",(int)total_frames);
}


The total_frames variable is 0, regardless of the level_load ...


Always learn from history, to be sure you make the same mistakes again...
Re: Irritating error message [Re: Uhrwerk] #416729
02/03/13 21:11
02/03/13 21:11
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline
Senior Expert
Superku  Offline
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Just tested it, some levels in my game take up to 30 frames to load.
Maybe level_load initializes the video device if it hasn't been done already to enable rendering (rather unlikely), but this is only guessing.


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends
Re: Irritating error message [Re: Superku] #416759
02/04/13 10:18
02/04/13 10:18
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Level load does not take any frame, it is executed immediately. That's also the reason why it prevents the error message: It initializes the video device if it isn't already.

Re: Irritating error message [Re: jcl] #416766
02/04/13 11:43
02/04/13 11:43
Joined: Dec 2008
Posts: 1,218
Germany
Rackscha Offline
Serious User
Rackscha  Offline
Serious User

Joined: Dec 2008
Posts: 1,218
Germany
@JCL: so why not initializing the videodevice before entering first frame?(or does this collide with presetting vars, for screensize etc)


MY Website with news of my projects:
(for example my current
Muliplayer Bomberman,
GenesisPrecompiler for LiteC
and TileMaster, an easy to use Tile editor)
Sparetime-Development

Re: Irritating error message [Re: Rackscha] #416767
02/04/13 11:48
02/04/13 11:48
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Yes. You need to make up your mind about some settings before opening the video device. For instance, if you need the video device at all or not.

Re: Irritating error message [Re: jcl] #416778
02/04/13 14:28
02/04/13 14:28
Joined: Jan 2002
Posts: 4,225
Germany / Essen
Uhrwerk Offline OP
Expert
Uhrwerk  Offline OP
Expert

Joined: Jan 2002
Posts: 4,225
Germany / Essen
I'd then suggest changing the error message to "Video device not yet initialized". The current message implies that it is not possible at all to use effect_load before the first frame which is obviously not true.


Always learn from history, to be sure you make the same mistakes again...

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