Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (VoroneTZ, monk12, Quad), 829 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rating: 5
Page 14 of 15 1 2 12 13 14 15
Re: ShadeCEVO simple grass (OVERLAY) ? [Re: rayp] #472476
04/29/18 23:18
04/29/18 23:18
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline OP

X
rayp  Offline OP

X

Joined: Jul 2008
Posts: 2,107
Germany
I faced a really strange thing. When adding entity Arrays to a shadeC Project, ull be hunted by strange randomly appearing bugs.

Its hard to explain, but already confirmed by 3run ( my example i uploaded ).

I made this example. Its basicly the std. example from shadeC with around 50 new lines.
In this example the c_move call makes the script Crash ( but only if its commented out WTF ). This is just one example of bug with Array in shadeC.
Without Arrays all works fine. And if you take the Array stuff out of shadec Project it also works.


https://www.file-upload.net/download-13105427/arrayBUGshadeC.rar.html

Code:
#define MAX_ENEMY   9999
#define MAX_ENEMY2   9999

var ENEMIES_TOTAL    = 0;
var ENEMIES_TOTAL2    = 0;

ENTITY* enemy_list  [MAX_ENEMY];
ENTITY* enemy_list2  [MAX_ENEMY2];


action actEnemy(){
	// ----------------------------------------------------------------------------------------------------------
	if (ENEMIES_TOTAL >= MAX_ENEMY) { ptr_remove(my); return; }
	enemy_list [ENEMIES_TOTAL] = my;
	ENEMIES_TOTAL++;
}
action actEnemy2(){
	// ----------------------------------------------------------------------------------------------------------
	if (ENEMIES_TOTAL2 >= MAX_ENEMY2) { ptr_remove(my); return; }
	enemy_list2 [ENEMIES_TOTAL2] = my;
	ENEMIES_TOTAL2++;
}

void updateNPC_both(){
	ENTITY* tempEnt;                           // instead of my/me were using tempEnt
	ENTITY* tempEnt2;                           // instead of my/me were using tempEnt
	int i = 0;                                 // the "itemindex" in the for cycle
	// ----------------------------------------------------------------------------------------------------------
	while (1){                                 // handle all enemys as long as... 
	   // -------------------------------------------------------------------------------------------------------


		for (i = 0; i < ENEMIES_TOTAL; i++){    // cycle through all enemys in array now
		   // ----------------------------------------------------------------------------------------------------
			// --- [ fill pointers ] ------------------------------------------------------------------------------
			// ----------------------------------------------------------------------------------------------------
			tempEnt   = enemy_list[i]; 
			tempEnt2  = enemy_list2[i]; 
                        if (tempEnt == NULL) continue;
                        if (tempEnt2 == NULL) continue;
                        if (tempEnt2.skill1 == 0) beep; // baam
                 }
                 wait (1);
           }
}

main.c:

updateNPC_both();
ent_create ("modela.mdl", vector (0,0,0), actEnemy);
ent_create ("modela.mdl", vector (0,0,0), actEnemy2);

This tiny contruct will Crash when u continue adding stuff, hard to explain.

edit:
I know the using of two arrays like i did in this example is shitty...anyway it should work.

Last edited by rayp; 04/30/18 00:16.

Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: ShadeCEVO simple grass (OVERLAY) ? [Re: rayp] #472479
04/30/18 08:56
04/30/18 08:56
Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
Kartoffel Offline
Expert
Kartoffel  Offline
Expert

Joined: Jun 2009
Posts: 2,210
Bavaria, Germany
try using dynamic memory allocation
Edit: or try increasing the nexus. to my knowledge the engine doesn't tell you s*** when it's full

Last edited by Kartoffel; 04/30/18 08:58.

POTATO-MAN saves the day! - Random
Re: ShadeCEVO simple grass (OVERLAY) ? [Re: Kartoffel] #472480
04/30/18 09:11
04/30/18 09:11
Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
txesmi Offline
Serious User
txesmi  Offline
Serious User

Joined: Jun 2007
Posts: 1,337
Hiporope and its pain
Hi,
I tried the downloadable example and it crashes because 'pos' and 'ang' are declared as 'VECTOR*' inside the loop of 'updateNPC_both' instead of 'VECTOR'. By the rest, it works fine here.


Re: ShadeCEVO simple grass (OVERLAY) ? [Re: txesmi] #472482
04/30/18 10:20
04/30/18 10:20
Joined: Jul 2008
Posts: 2,107
Germany
rayp Offline OP

X
rayp  Offline OP

X

Joined: Jul 2008
Posts: 2,107
Germany
Oh man you are right...

edit:
what a stupid typo-mistake caused of the Long break. I cant believe...i rewrote the lines a 100 times...

Thanks for the time man!

Last edited by rayp; 04/30/18 10:30.

Acknex umgibt uns...zwischen Dir, mir, dem Stein dort...
"Hey Griswold ... where u gonna put a tree that big ?"
1998 i married my loved wife ... Sheeva from Mortal Kombat, not Evil-Lyn as might have been expected
rayp.flags |= UNTOUCHABLE;
Re: ShadeCEVO simple grass (OVERLAY) ? [Re: rayp] #480318
05/31/20 13:48
05/31/20 13:48
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Hey guys!

Wanted to ask, was anyone ever able to get shadows for pointlights working? I only could find (get to work) shadows from the sun and spotlights.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: ShadeCEVO simple grass (OVERLAY) ? [Re: rayp] #480362
06/02/20 16:27
06/02/20 16:27
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Well, I guess this means no... grin Or even if there were users who got it working (somehow) they aren't around anymore...


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: ShadeCEVO simple grass (OVERLAY) ? [Re: rayp] #480363
06/02/20 16:57
06/02/20 16:57
Joined: May 2008
Posts: 2,113
NRW/Germany
alibaba Offline
Expert
alibaba  Offline
Expert

Joined: May 2008
Posts: 2,113
NRW/Germany
Hey 3run, I think I got it working before iirc. I can look for it this weekend.


Professional Edition
A8.47.1
--------------------
http://www.yueklet.de
Re: ShadeCEVO simple grass (OVERLAY) ? [Re: alibaba] #480365
06/02/20 17:46
06/02/20 17:46
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
Originally Posted by alibaba
Hey 3run, I think I got it working before iirc. I can look for it this weekend.
Hey, it would be great if you could check it out.

I tried to give it a try, but found out, that even in defines there is no SHADOW for pointlights...
Code
//pointlight
#define SC_LIGHT_P 0
#define SC_LIGHT_P_SPEC 1
#define SC_LIGHT_P_SPEC_PROJ 2
#define SC_LIGHT_P_PROJ 3

//spotlight
#define SC_LIGHT_S 10
#define SC_LIGHT_S_SPEC 11
#define SC_LIGHT_S_SPEC_SHADOW 12
#define SC_LIGHT_S_SHADOW 13

int sc_lpp_getLightType(unsigned int inBitflag)
{
	int bitMask = 0;
	
	//pointlights
	bitMask = (SC_LIGHT_POINT);
	if( inBitflag == bitMask) return SC_LIGHT_P;
	
	bitMask = (SC_LIGHT_POINT | SC_LIGHT_SPECULAR);
	if( inBitflag == bitMask) return SC_LIGHT_P_SPEC;
	
	bitMask = (SC_LIGHT_POINT | SC_LIGHT_PROJECTION);
	if( inBitflag == bitMask) return SC_LIGHT_P_PROJ;
	
	bitMask = SC_LIGHT_POINT | SC_LIGHT_SPECULAR | SC_LIGHT_PROJECTION;
	if( (inBitflag & bitMask) == bitMask) return SC_LIGHT_P_SPEC_PROJ;
	
	
	//spotlights
	bitMask = (SC_LIGHT_SPOT);
	if( inBitflag == bitMask || inBitflag == (bitMask | SC_LIGHT_PROJECTION) ) return SC_LIGHT_S;
	
	bitMask = (SC_LIGHT_SPOT | SC_LIGHT_SPECULAR);
	if( inBitflag == bitMask || inBitflag == (bitMask | SC_LIGHT_PROJECTION) ) return SC_LIGHT_S_SPEC;
	
	bitMask = (SC_LIGHT_SPOT | SC_LIGHT_SHADOW);
	if( inBitflag == bitMask || inBitflag == (bitMask | SC_LIGHT_PROJECTION) ) return SC_LIGHT_S_SHADOW;

	bitMask = (SC_LIGHT_SPOT | SC_LIGHT_SPECULAR | SC_LIGHT_SHADOW);
	if( inBitflag == bitMask || inBitflag == (bitMask | SC_LIGHT_PROJECTION) ) return SC_LIGHT_S_SPEC_SHADOW;

	return SC_LIGHT_P;
}




Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Re: ShadeCEVO simple grass (OVERLAY) ? [Re: rayp] #480367
06/02/20 20:01
06/02/20 20:01
Joined: Oct 2010
Posts: 73
0110111
C
CodeMaster Offline
Junior Member
CodeMaster  Offline
Junior Member
C

Joined: Oct 2010
Posts: 73
0110111
Like a total noob about this framework, I have two problems with the Shade-C v0.91

How I can add multiterrain shader to my hmp terrain and how add colormap, shadowmap and textures? I found two action fx_terraintex and fx_terraintex3. Which I should use?

Second I have a problem that the grass does not receive shadows from the player and the trees, and also my terrain don't recive shadow from player, only block and some static models.

Re: ShadeCEVO simple grass (OVERLAY) ? [Re: rayp] #480368
06/02/20 20:11
06/02/20 20:11
Joined: May 2009
Posts: 5,370
Caucasus
3run Offline
Senior Expert
3run  Offline
Senior Expert

Joined: May 2009
Posts: 5,370
Caucasus
As far as I know, Shade-C v0.91 was not finished and I wouldn't recommend using it. Unfortunately, I never used it and can't help with your questions... Shade-C EVO has some memory leaks, but who knows, if the pointlight shadow questions will be answered and it indeed supports shadows from pointlights, we could invest some time into finding and fixing memory leaks. Then it will be the best shade-c solution for acknex.


Looking for free stuff?? Take a look here: http://badcom.at.ua
Support me on: https://boosty.to/3rung
Page 14 of 15 1 2 12 13 14 15

Moderated by  Blink, Hummel, Superku 

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