Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 552 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
min/max und ein Frame Wartezeit [GER/ ENG] #451996
05/29/15 16:46
05/29/15 16:46
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline OP
Senior Expert
Superku  Offline OP
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Ich finde es seither sehr unschön, dass man bei Entities, welche per ent_create() dynamisch erstellt werden, 1 Frame zu warten hat, ehe man die min_x/ max_x (nach einem c_setminmax() Aufruf oder (NARROW | FAT))
ändern kann. Insbesondere ist dies bei Projektilen, Raketen und ähnlichen Dingen unschön, was sich besonders bei niedrigen Frameraten bemerkbar macht. Workarounds (wie ein verspätetes Setzen der Bounding Box Dimensionen und 1-Frame lange c_trace Kollision) sind daher gelegentlich notwendig.

Im Handbuch fand ich unter dem Eintrag zu "min_x" folgenden Hinweis, an welchen ich mich noch grob erinnern konnte:
Quote:
Bei Versionen unter 7.84, warten Sie einen Frame (wait(1)) nach Erstellen der Entity, ehe Sie die Bounding-Box setzen.

Heißt das aber, dass dieses Verhalten nach 7.84 nicht mehr eintreten sollte, das heißt dass ein Code der Form

Code:
void rocket_init()
{
	//c_setminmax(my);
	my.eflags |= NARROW | FAT;
	vec_set(my.min_x,vector(-8,-4,-4));
	vec_set(my.max_x,vector(24,4,4));
}

void rocket_create()
{
	you = ent_create("rocket.mdl",nullvector,rocket_init);
	...
}


die Bounding Box der Rakete ohne ein "wait(1)" tatsächlich manipulieren sollte?
Wenn ja, wo liegt der Fehler (ein Setzen von collision_mode = 2; bewirkt nichts)?

Last edited by Superku; 09/13/15 19:44.

"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: min/max und ein Frame Wartezeit [Re: Superku] #452014
05/31/15 00:00
05/31/15 00:00
Joined: Aug 2003
Posts: 7,439
Red Dwarf
Michael_Schwarz Offline
Senior Expert
Michael_Schwarz  Offline
Senior Expert

Joined: Aug 2003
Posts: 7,439
Red Dwarf
wenn auch ein wenig nervig, ist so ein verhalten garnicht mal so ungewöhnlich auch in anderen engines. Bei vielen AAA spielen kommt es bei sehr niedrigen framerates oft dazu dass die physik anfängt komische sachen zu machen oder das waffen irgendwie zeitverzögerung aufweisen.

Letztens hatte sogar noch wer entdeckt dass in Fallout 3/NV es einen bug gibt beim laden eines Spielstandes wo man für ganze 15 frames keine kollision hat und man so auch toll per quicksave und quickload spam durch wände clippen kann.


"Sometimes JCL reminds me of Notch, but more competent" ~ Kiyaku
Re: min/max und ein Frame Wartezeit [Re: Michael_Schwarz] #452089
06/02/15 10:35
06/02/15 10:35
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
As to my knowledge, in A8 you can set the bounding box without a wait(1) before, but call c_setminmax before setting the bounding box. Setting NARROW|FAT is not necessary as it's set automatically by c_setminmax.

Re: min/max und ein Frame Wartezeit [Re: jcl] #452090
06/02/15 10:42
06/02/15 10:42
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline OP
Senior Expert
Superku  Offline OP
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Sadly this is not the case, as you can see in the following example:

Code:
///////////////////////////////
#include <acknex.h>
#include <default.c>
///////////////////////////////

void rakete_init()
{
	c_setminmax(my);
	//my.eflags |= NARROW | FAT;
	//wait(1); // <---- !
	vec_set(my.min_x,vector(-0,-4,-4));
	vec_set(my.max_x,vector(24,4,4));
}

void rocket_create()
{
	you = ent_create(CUBE_MDL,nullvector,rakete_init); //"rakete.mdl"
	your.skill30 = 32;
	your.tilt = random(360);
	while(your.skill30 > 0)
	{
		c_move(you,vector(8*time_step,0,0),nullvector,IGNORE_YOU);
		your.skill30 -= time_step;
		wait(1);
	}
	ptr_remove(you);
}

void main()
{
	fps_max = 60;
	video_mode = 9;
	//collision_mode = 2;
	level_load(NULL);
	camera.y = -512;
	camera.pan = 90;
	on_space = rocket_create;
	d3d_lines = 3;
}



EDIT: If this is a bug/ not intended, can it be fixed?

Last edited by Superku; 06/02/15 10:42.

"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: min/max und ein Frame Wartezeit [Re: Superku] #453466
07/27/15 16:42
07/27/15 16:42
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline OP
Senior Expert
Superku  Offline OP
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
I'm pleased to see all the updates and fixes on the forecast page but could you please have a look at this issue again, too?

Btw. I see the change to path_set but could you please add a warning (on let's say warn_level = 6; ) for multiple paths with the same name on level loading too (as discussed in some other thread some time ago)? Would be neat.
Oh and clicking on "ifelse" leads to OVERLAY on the beta features page.

EDIT: Btw. II will the compiler change (remember the ... I think ent_create related issue which could lead to crashes that could disappear when you change something in your script) be included in the update, too?

EDIT 2: Bumping the joystick reconnect feature again, would be amazing!

Last edited by Superku; 07/27/15 17:04.

"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: min/max und ein Frame Wartezeit [Re: Superku] #454663
09/13/15 19:14
09/13/15 19:14
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline OP
Senior Expert
Superku  Offline OP
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Shameless bump regarding that 1 frame issue.


"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: min/max und ein Frame Wartezeit [Re: Superku] #454666
09/14/15 07:43
09/14/15 07:43
Joined: Jul 2000
Posts: 27,978
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,978
Frankfurt
Sorry for not answering earlier. We've looked into it and it can be fixed, but the fix affects several parts of the program and was thus delayed for a future update. It is on our list. But until then you need indeed the wait.

Re: min/max und ein Frame Wartezeit [Re: jcl] #454671
09/14/15 11:19
09/14/15 11:19
Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Superku Offline OP
Senior Expert
Superku  Offline OP
Senior Expert

Joined: Sep 2003
Posts: 6,861
Kiel (Germany)
Okay thanks!


"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

Moderated by  old_bill, Tobias 

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