Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 1,119 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 4 1 2 3 4
Re: open the WMB format [Re: jcl] #259512
04/06/09 15:19
04/06/09 15:19
Joined: Feb 2009
Posts: 25
Mexico City
DavidOC Offline
Newbie
DavidOC  Offline
Newbie

Joined: Feb 2009
Posts: 25
Mexico City
Thanks, I'll check with this type.

Re: open the WMB format [Re: DavidOC] #269766
06/04/09 13:55
06/04/09 13:55
Joined: Feb 2007
Posts: 353
A
amy Offline OP
Senior Member
amy  Offline OP
Senior Member
A

Joined: Feb 2007
Posts: 353
jcl, what do you think about the smoothing issue? Wouldn't adding the normals make sense? Being able to do proper smoothing is important.

Re: open the WMB format [Re: amy] #269937
06/05/09 09:35
06/05/09 09:35
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Yes, normals would give you more flexibility than the smooth flag. We'll probably implement them when the format is changed the next time. But not in the vertex struct, more likely in an additional list that is normally zero, but contains normals for special blocks consisting of different smoothing groups.

Re: open the WMB format [Re: jcl] #270837
06/10/09 09:11
06/10/09 09:11
Joined: Feb 2007
Posts: 353
A
amy Offline OP
Senior Member
amy  Offline OP
Senior Member
A

Joined: Feb 2007
Posts: 353
char name[20];
char filename[33];
char action[20];

I have problems with those strings in the entity struct. Are you sure the sizes are okay? There also seem to be two different entity types (7 and 3). What is the difference between them?

Re: open the WMB format [Re: amy] #279210
07/16/09 21:47
07/16/09 21:47
Joined: Feb 2009
Posts: 25
Mexico City
DavidOC Offline
Newbie
DavidOC  Offline
Newbie

Joined: Feb 2009
Posts: 25
Mexico City
amy is right, I had to write the filename and the action in the position 13 of the char array, and had to set my actions to 7 characters only, and it looks like the entity flags doesn't work (I'm setting 512 for PASSABLE and 256 for INVISIBLE).

Here is my test map:
MAP
and here is the code (I modified the workshop19 code):

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

///////////////////////////////////////////////////////////////

VECTOR ball_speed;

action InitBal(){
	set(my, SHADOW);
	phent_settype(my, PH_RIGID, PH_SPHERE); // set the physics entity type
	phent_setmass (my, 3, PH_SPHERE); // and its mass
	phent_setfriction (my, 80); // set the friction
	phent_setdamping (my, 40, 40); // set the damping
	phent_setelasticity (my, 50, 20); // set the elasticity	
	while (1)
	{
		ball_speed.x = 25 * (key_cur - key_cul); // move the ball using the cursor keys
		ball_speed.y = 25 * (key_cuu - key_cud); // 25 sets the x / y movement speeds
		ball_speed.z = 0; // no need to move on the vertical axis
		phent_addtorqueglobal (my, ball_speed); // add a torque (an angular force) to the ball
		camera.x = my.x - 100; // keep the camera 100 quants behind the ball
		camera.y = my.y; // using the same y with the ball
		camera.z = 400; // and place it at z = 400 quants
		camera.tilt = -60; // make it look downwards
		wait (1);
	}
}

function main()
{
	fps_max = 140;
	shadow_stencil = 1;
	level_load("test.wmb"); // load the level
	wait (2); // wait until the level is loaded
	ph_setgravity (vector(0, 0, -386)); // set the gravity
}



Last edited by DavidOC; 07/16/09 21:48.
Re: open the WMB format [Re: amy] #279260
07/17/09 03:25
07/17/09 03:25
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
Originally Posted By: amy
char name[20];
char filename[33];
char action[20];

I have problems with those strings in the entity struct. Are you sure the sizes are okay? There also seem to be two different entity types (7 and 3). What is the difference between them?

The sizes are wrong. When i was writing a parser in C# i kept getting the wrong part of the file when using the sizes in the documentation. I opened up a .wmb in a binary editor and found that the data was 33 bytes apart from each other, so i used 33 for each field.

Entity type 3 is one that has no action applied (static). Entity type 7 has an action attached (dynamic). JCL says to use type 7.

Last edited by DJBMASTER; 07/17/09 03:27.
Re: open the WMB format [Re: DJBMASTER] #279275
07/17/09 07:55
07/17/09 07:55
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
That's right - there was a mistake in the format description. The sizes are 33, not 20. Sorry for that. I've uploaded a corrected version.

Re: open the WMB format [Re: jcl] #284499
08/13/09 16:26
08/13/09 16:26
Joined: Feb 2009
Posts: 25
Mexico City
DavidOC Offline
Newbie
DavidOC  Offline
Newbie

Joined: Feb 2009
Posts: 25
Mexico City
These are other things I've found:

a) The PATH_EDGE lists node1 and node2 as long, but they are float.
b) You need to save at least 20 edges, having less causes the engine to crash (haven't tested with more than 20).
c) For entities I had to set the length of ACTION array to 34 instead of 33, this way I can read the skills and flags without problem.

EDIT: d) In the PATH_EDGE the node numbers start with 1 not 0

Regards



Last edited by DavidOC; 08/13/09 16:31.
Re: open the WMB format [Re: DavidOC] #286270
08/24/09 11:15
08/24/09 11:15
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
I've uploaded a corrected page - node1 and node2 are indeed float and start with 1.

Your other problems are possibly caused by a wrong data alignment setting in your compiler.

Re: open the WMB format [Re: jcl] #286328
08/24/09 17:39
08/24/09 17:39
Joined: Feb 2009
Posts: 25
Mexico City
DavidOC Offline
Newbie
DavidOC  Offline
Newbie

Joined: Feb 2009
Posts: 25
Mexico City
thanks for your time in this issue

Page 3 of 4 1 2 3 4

Moderated by  aztec, 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