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 / can agk support canvas? when I use Clanlib ,I can create light effect with canvas.

Author
Message
halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 28th Oct 2011 16:33
I want to add day and night in my game, so I need to solve the light in game.
I need to use canvas. but in agk ,it seems there is no such a function.

can anyone give me a hand?

give my best
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 28th Oct 2011 21:29
You could use an black sprite that covers the screen that you fade in and out the get an night effect.
Simply so do you set that sprite completely transparent during daytime and fade it in to get an night effect.
halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 28th Oct 2011 21:58
I know the way which you said.but canvas is advanced.because it can use unregular image to perform night effect.

give my best
halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 29th Oct 2011 18:51
canvas : combine two image into one image with some calculation .
for example, I can dig a hole from a image. then I can use the image to cover something. it's very useful.

is it difficult to come out for agk?

give my best
Cliff Mellangard 3DEGS
Developer
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location: Sweden
Posted: 29th Oct 2011 18:56
If i remember it right so is canvas a part of open gls true 2d functions that is pretty slow?
And dosent work that well together with open gls 3d functions, that the agk use with an fixed camera to get the illusion of 2d.
I think they skipped the open gl native 2d functions as they are obselete today?

Most users use its 3d functions to get an 2d look and feel.
bjadams
AGK Backer
16
Years of Service
User Offline
Joined: 29th Mar 2008
Location:
Posted: 29th Oct 2011 19:52
Having the option of combining 2 images to make sfx, like an empty hole inside an image would be great.

However I don't know if such functions will come in AppGameKit any soon.

Would be great if there's an OGL-comptable sdk with such advanced features, and someone wraps up the functions to use with AppGameKit sprites & images.
halley
13
Years of Service
User Offline
Joined: 27th Apr 2011
Location: China
Posted: 30th Oct 2011 15:36
I hope agk can support this feature.

give my best

Login to post a reply

Server time is: 2024-11-22 09:10:08
Your offset time is: 2024-11-22 09:10:08