Gamestudio Links
Zorro Links
Newest Posts
Newbie Questions
by AndrewAMD. 12/05/23 10:56
Zorro Trader GPT
by TipmyPip. 12/04/23 11:34
Square root rule
by Smallz. 12/02/23 09:15
RTest not found error
by TipmyPip. 12/01/23 21:43
neural function for Python to [Train]
by TipmyPip. 12/01/23 14:47
Xor Memory Problem.
by TipmyPip. 11/28/23 14:23
Training with command line parameters
by TipmyPip. 11/26/23 08:42
Combine USD & BTC Pairs In Asset Loop
by TipmyPip. 11/26/23 08:30
AUM Magazine
Latest Screens
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Who's Online Now
6 registered members (AndrewAMD, alibaba, fairtrader, ozgur, TipmyPip, Quad), 622 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
fairtrader, hus, Vurtis, Harry5, KelvinC
19019 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
particles #112462
02/17/07 10:29
02/17/07 10:29
Joined: Jul 2006
Posts: 783
London, UK
sheefo Offline OP
User
sheefo  Offline OP
User

Joined: Jul 2006
Posts: 783
London, UK
Are particles supported in the Lite-C beta? I am having so much trouble with them.
They are all just black lines originating from the centre of the level, and they never fade. I noticed they need the VISIBLE flag to be included to show (unlike in C-Script).

Anyway, custom particles do not work for me, but the ‘draw_line3d’ function seems to work fine, so the engine is capable of rendering particles properly. What’s the problem with custom particles then? Anyone have the same problem?

Re: particles [Re: sheefo] #112463
02/17/07 16:54
02/17/07 16:54
Joined: Jul 2000
Posts: 27,967
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,967
Frankfurt
Particles are a little different than in C-Script. See:

http://manual.conitec.net/aent-effect.htm

Re: particles [Re: jcl] #112464
02/17/07 18:24
02/17/07 18:24
Joined: Jul 2006
Posts: 783
London, UK
sheefo Offline OP
User
sheefo  Offline OP
User

Joined: Jul 2006
Posts: 783
London, UK
I know, I defined them properly for Lite-C. The problem is with that there is no bmap on the particles and they are black. They all start from the centre of the level and go to wherever you tell it to start.

Why do they do this?

Re: particles [Re: sheefo] #112465
02/19/07 16:54
02/19/07 16:54
Joined: Jul 2000
Posts: 27,967
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,967
Frankfurt
How could I know that? I'd need your code for telling you what's wrong. Have you tried the example in the manual?

Re: particles [Re: jcl] #112466
02/20/07 17:39
02/20/07 17:39
Joined: Jul 2006
Posts: 783
London, UK
sheefo Offline OP
User
sheefo  Offline OP
User

Joined: Jul 2006
Posts: 783
London, UK
I've tested it with the one in the manaul. Surely that should work.

It has no bmap and the position is weird.

Re: particles [Re: sheefo] #112467
02/20/07 17:51
02/20/07 17:51
Joined: Jul 2000
Posts: 27,967
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,967
Frankfurt
The manual example was taken from working code, so it should also work. Can you send your project to the support? I'll have to look into it. Maybe there's a bug that only occurs under some circumstance.

Re: particles [Re: jcl] #112468
02/22/07 08:28
02/22/07 08:28
Joined: Apr 2006
Posts: 1,551
Netherlands
D3D Offline
Serious User
D3D  Offline
Serious User

Joined: Apr 2006
Posts: 1,551
Netherlands
In the Lite-C Manual Particle effect sample there is error? p.flags |= BRIGHT | MOVE;

Code:
// particle function: generates a fading explosion into vel direction
// particle function: generates a fading explosion into vel direction
function effect_explo(PARTICLE *p)
{
var temp[3];
vec_randomize(temp,10);
vec_add (p.vel_x, temp);
p.alpha = 25 + random(25);
p.bmap = scatter_map;
p.flags |= BRIGHT | MOVE;
p.event = part_alphafade; // change to a shorter, faster function
}


Oh and why is it that when you have myfile.c and myfile.wdl in the same folder and you edit the myfile.c in Lite-C SED and you set the myfile.c to be executed, it actualy executes myfile.wdl in both debug as well as test-run?

What I mean is twice the same name, but different extensions. You say in the manual how to rewrite from c-script -> lite-c code, to drop the code into an empty .c file. Only if it has the same name Lite-C SED will execute the .wdl first..




smile
Re: particles [Re: D3D] #112469
02/22/07 17:33
02/22/07 17:33
Joined: Jul 2000
Posts: 27,967
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,967
Frankfurt
The ' |= ' sets additional flags without resetting the already-set flags. Alternatively, you could also write

set(p,BRIGHT | MOVE);

After you've migrated a function from .wdl to .c, you must of course erase the original function from the .wdl file! Otherwise it is compiled twice, once in C-Script and once in lite-C. If a WDL file exists that has the same name as the C file, it's executed first because lite-C needs its project settings, like PATH etc. See manual:

http://manual.conitec.net/litec_migration.htm

Re: particles [Re: jcl] #112470
02/22/07 18:28
02/22/07 18:28
Joined: Apr 2006
Posts: 1,551
Netherlands
D3D Offline
Serious User
D3D  Offline
Serious User

Joined: Apr 2006
Posts: 1,551
Netherlands
Thank you for clearing that up


smile

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

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