Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (Ayumi), 662 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 7 of 8 1 2 3 4 5 6 7 8
Re: [contribution] Fog code C-Script version [Re: Nidhogg] #319180
04/12/10 18:38
04/12/10 18:38
Joined: Nov 2009
Posts: 201
Logitek Offline
Member
Logitek  Offline
Member

Joined: Nov 2009
Posts: 201
Hello,

okay, no problem. I am sure the code can be optimized.

But here are the first changings that I have made.

First you can make it fullscreen if you wish with:

In main.wdl under var v_DepotMore:

var video_mode = 9; (or 8) (I have a widescreen).
var video_screen = 1; (Full screen).

So you can see the effects better.

There are no changes in the shader.

Now open fog.wdl.

5: Line
Replace define mag_fog,100; into ...
define mag_fog, 10; (Donīt know if you really need it. I have tried some things)

44: Line

Replace wait(-5 + ....
with wait(-8 + ....

52: Line

Replace var fog_speed = 20;
If you wish.
If you do it, then the code is faster: Reduce it and try it.
I have also tried 1 instead of 20. But you must try this.

81: Line

Replace 5,8 with 2 (It will be faster with it) You have to try it.

88: Line

Replace my.Translucent (Lite-C syntax)
with my.transparent

Line 115:
And now the problem with the C-Script: It generates endless functions without changes and slows down until 3 fps or something like that.

First make a new variable under the line var fogcount.

Like: var max_fogus = 80; (The name is not important)

Replace the line:
while(fogcount > 0 || fogcount < max_fog)

with
while(fogcount < max_fogus)


I am sure, you can make the code better. I have tried it only a few minutes.

regards,

Logitek

Re: [contribution] Fog code C-Script version [Re: Logitek] #319187
04/12/10 20:15
04/12/10 20:15
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline

Expert
Blink  Offline

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
@logitek, i made your changes and it works better and the framrate is good. but because i added it to another level, i am now getting that no level error in generate_fog.


My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Re: [contribution] Fog code C-Script version [Re: Blink] #319191
04/12/10 20:29
04/12/10 20:29
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline

Expert
Blink  Offline

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
fixed the problem, i placed the camera clip, fog color, etc. in the wrong place, i was supposed to put it below the level_load. it works great now.


My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Re: [contribution] Fog code C-Script version [Re: Blink] #319205
04/13/10 01:10
04/13/10 01:10
Joined: Dec 2006
Posts: 1,086
Queensland - Australia
Nidhogg Offline
Serious User
Nidhogg  Offline
Serious User

Joined: Dec 2006
Posts: 1,086
Queensland - Australia
Ok I have uploaded a new version that include comments as to where changes can be made.
Fog C-Script version

Still coded for A7 but I commented where changes need to be made for A6 users. (Only two changes need to be made.)

I had it running for around 20 minutes with no problems.
framerate was steady at 60 and that's with 50 entities.

After configuring my Graphics Driver proper I thought i'd recheck the framerate.
It now states an average of around 400fps with a max of around 750fps using the C-Script version.

All the best to you all.



Last edited by Nidhogg; 04/13/10 09:31. Reason: True FPS readout

Windows XP SP3
Intel Dual Core CPU: E5200 @ 2.5GHz
4.00GB DDR3 Ram
ASUS P5G41T-M LX
PCIE x16 GeForce GTS 450 1Gb
SB Audigy 4
Spyware Doctor with AntiVirus
Re: [contribution] Fog code C-Script version [Re: Nidhogg] #319242
04/13/10 14:20
04/13/10 14:20
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline

Expert
Blink  Offline

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
it works ok, but the debris in the shader is blurry, not as clear as the examples.


My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Re: [contribution] Fog code C-Script version [Re: Blink] #319260
04/13/10 15:44
04/13/10 15:44
Joined: Dec 2006
Posts: 1,086
Queensland - Australia
Nidhogg Offline
Serious User
Nidhogg  Offline
Serious User

Joined: Dec 2006
Posts: 1,086
Queensland - Australia
Well change the scale then of them then. But it will slow it down though.


Windows XP SP3
Intel Dual Core CPU: E5200 @ 2.5GHz
4.00GB DDR3 Ram
ASUS P5G41T-M LX
PCIE x16 GeForce GTS 450 1Gb
SB Audigy 4
Spyware Doctor with AntiVirus
Re: [contribution] Fog code C-Script version [Re: Nidhogg] #319265
04/13/10 16:02
04/13/10 16:02
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline

Expert
Blink  Offline

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
ok, i will give it a shot.


My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Re: [contribution] Fog code C-Script version [Re: Blink] #319316
04/14/10 00:51
04/14/10 00:51
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline

Expert
Blink  Offline

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
well, i tried the fog on all of my levels for my project, and i am getting different results. i will have to mosify for each level or abandon the fog all together.


My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Re: [contribution] Fog code C-Script version [Re: Blink] #319330
04/14/10 07:47
04/14/10 07:47
Joined: Jan 2004
Posts: 3,023
The Netherlands
Helghast Offline OP
Expert
Helghast  Offline OP
Expert

Joined: Jan 2004
Posts: 3,023
The Netherlands
Originally Posted By: Blink
well, i tried the fog on all of my levels for my project, and i am getting different results. i will have to mosify for each level or abandon the fog all together.


Or use the none shader variant tongue


Formerly known as dennis_fantasy
Portfolio - http://www.designorhea.com/
Project - http://randomchance.cherrygames.org/
Re: [contribution] Fog code C-Script version [Re: Helghast] #319359
04/14/10 13:46
04/14/10 13:46
Joined: Jan 2006
Posts: 2,157
Connecticut, USA
Blink Offline

Expert
Blink  Offline

Expert

Joined: Jan 2006
Posts: 2,157
Connecticut, USA
but the shader is so cool. i love the fog, its a little too much on some of my levels, but when i modify, it should be ok. messes with the framerate when i modify sometimes.


My Famous Quotes: "Hip hop is like a virus, infecting everyone and everything around it. Every form of media has some way,shape or form, assimilated hip hop into it." It has also mutated into other strains like, trip hop, house, rap, gangster, and conscious forms. Once you are infected with it, its with you for life."
Page 7 of 8 1 2 3 4 5 6 7 8

Moderated by  adoado, checkbutton, mk_1, Perro 

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