Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / how i do this effect?

Author
Message
pamercomov
FPSC Reloaded TGC Backer
9
Years of Service
User Offline
Joined: 2nd Jan 2015
Location: palma de mallorca
Posted: 30th May 2015 12:11 Edited at: 30th May 2015 12:12
hi.
i need this effect. i know this is with shaders, but i dont know what shader i can use, i dont know how use it because the information in agk pages is very low.
can u help me?
https://www.youtube.com/watch?v=K6aAxuIL7h8

using AppGameKit V2 tier 1
pamercomov
FPSC Reloaded TGC Backer
9
Years of Service
User Offline
Joined: 2nd Jan 2015
Location: palma de mallorca
Posted: 30th May 2015 12:14
sorry, im use AppGameKit V2 BASIC

using AppGameKit V2 tier 1
29 games
19
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 30th May 2015 13:36
pamercomov
FPSC Reloaded TGC Backer
9
Years of Service
User Offline
Joined: 2nd Jan 2015
Location: palma de mallorca
Posted: 30th May 2015 15:52
UAUUU .... yes...it is. thanx.

using AppGameKit V2 tier 1
pamercomov
FPSC Reloaded TGC Backer
9
Years of Service
User Offline
Joined: 2nd Jan 2015
Location: palma de mallorca
Posted: 30th May 2015 20:36
hello again.
I took all afternoon trying to understand how the shader code is compiled and not get anything ....
someone has compiled the .ps and .VS the previous example I can pass it or know where I can find a tutorial to do so.
as I said before the basic use of AGK.

many and sorry for the inconvenience

using AppGameKit V2 tier 1
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 31st May 2015 09:36
You don't need to compile the shaders, just save them in the media folder of your project and run the programme. The AppGameKit interpreter will compile the files when it starts.

pamercomov
FPSC Reloaded TGC Backer
9
Years of Service
User Offline
Joined: 2nd Jan 2015
Location: palma de mallorca
Posted: 31st May 2015 11:28 Edited at: 31st May 2015 11:44
ooohh ... thank you very much.
now I have it working.
but now seeing the code shown me new doubts ....

as could add more "lights" and in another position? in the code of AppGameKit I dont see as light or as created the positions, so I guess it will be in the shader and I fail to understand the code ....

I explain a little my idea ...
is a 2D platform game, the player take a torch, but the level will be some fire to illuminate a bit .... and the player could relight the torch .... so I need to add some more light, and be able to position one next to the player.

thank you very much indeed're being very friendly.

using AppGameKit V2 tier 1
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 31st May 2015 13:28
Glad you got it working. The code as I have it only supports a single light in the middle of the screen. To implement multiple lights, you ill need to alter the shader code that draws the final scene and you would need to call the shadow cast shader for each light implemented.

It should be possible, but you'll need to experiment with the shader code. I know Baxlash implemented a multiple light system in his recent platformer, but I can't remember if it had dynamic shadows.

I suggest you have a look at this:

[href=http://forum.thegamecreators.com/?m=forum_view&t=213413&b=48
]http://forum.thegamecreators.com/?m=forum_view&t=213413&b=48
[/href]

and try to learn shader code - there is a lot of information contained here:

http://forum.thegamecreators.com/?m=forum_view&t=201508&b=41

pamercomov
FPSC Reloaded TGC Backer
9
Years of Service
User Offline
Joined: 2nd Jan 2015
Location: palma de mallorca
Posted: 1st Jun 2015 07:38
thanks for the info, I was looking before writing and had found no such post.
and I think you're right and I study shading.
thank you very much and soon will post the pictures of the game.

using AppGameKit V2 tier 1
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 1st Jun 2015 10:56
There are a lot of ways of achieving this. I have tried a number of different systems and come to the conclusion that Ched80's method is about as good as you can get. I am using a similar method in my own lighting system but I am not using shadows. I have simple commands to move / position lights and edit their colour / range. I am close to releasing my free editor which includes shaders and Tier 1 code so if you want to follow the project it's here: http://forum.thegamecreators.com/?m=forum_view&t=214297&b=48

Using AppGameKit V2 Tier 1
pamercomov
FPSC Reloaded TGC Backer
9
Years of Service
User Offline
Joined: 2nd Jan 2015
Location: palma de mallorca
Posted: 1st Jun 2015 16:12
baxlash hello ... you knew your editor and I'm waiting for his release, which promises a lot.

I started studying shading code but there are things to start .... I no longer understand.

as I have been reading pdfs and books on OpenGL ES shading, there are two different types of code ... vertex shader and fragment shader .... I understand this.

but when I come here and see examples ... I see a Quad.vs, I have not seen in books and not to be served.

and I think if I have the wrong version ...

no official documentation on the shaders even ?? that one of the post that you have recommended me, paul put a lot of variab them AppGameKit used for shaders that I dont see in the documentation and I think I missed part of the documentation.


sorry for all this stuff, but I'm starting completely from scratch in the subject shader I want to start understanding from the beginning to establish the knowledge.

Thank you.

using AppGameKit V2 tier 1
Ched80
14
Years of Service
User Offline
Joined: 18th Sep 2010
Location: Peterborough, UK
Posted: 4th Jun 2015 13:28
I agree with you that the AppGameKit documentation is lacking when it comes to explaining shaders. I would ignore the vertex shaders for now, just use the sprite.vs and quad.vs that are provided in the examples, or taken from any shader examples you can find on the forum.

Then just focus on the fragment shader, the files ending with .ps, the fragment shader is where all the sexy stuff is anyway. So I would start by trying to create very simple shaders to start with, say simply colouring a sprite, and then you can move on to more complex things like blur, or pixelation. You really need to understand what the GLSL code is doing before you can jump in and create the dynamic shadows you want. Believe me, it took me several weeks of testing and learning before I understood GLSL.

And believe me, learning shader code is really worth it. You can produce really nice visual effects that are simply too complicated to do using AppGameKit code alone, plus since the shaders are handled by the GPU, they barely affect the frame rate!

Login to post a reply

Server time is: 2024-11-25 22:46:39
Your offset time is: 2024-11-25 22:46:39