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.

Newcomers AppGameKit Corner / Flashlight problem

Author
Message
Game_Code_here
4
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 24th Aug 2020 03:40
So I tried to create a point light to add a flashlight.

The problem is when I call the light to follow the player nothing is effected. The light doesn't work or illuminate anything.

How could I achieve a good working flashlight?

Thanks
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 24th Aug 2020 04:33 Edited at: 24th Aug 2020 04:33
Maybe try setting it to pixel mode
SetPointLightMode(light, 1)
Game_Code_here
4
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 24th Aug 2020 05:13
Ok I'll try that thanks
Game_Code_here
4
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 24th Aug 2020 05:41
So with light maps no objects are effected by lights unless there already lit by the light map.

Also if I use object shaders no light or fog effects the objects.
pavel_sv_1982
11
Years of Service
User Offline
Joined: 9th Apr 2013
Location: Russia
Posted: 29th Aug 2020 10:10
affect
SetObjectLightMode( objID, mode )

objID - The ID of the object to modify.
mode - 0 to turn lighting off, 1 to turn it on.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 29th Aug 2020 23:39 Edited at: 29th Aug 2020 23:40
One other thing. There can be only 4 active spotlights on screen at any one time.

If you have a look at this video you can see the player has a spotlight in front of him at the beginning and after a bit it disappears.
That is because the gems have spotlights as well and because the count goes above 4 the player loses his spotlight.
This uses standard AppGameKit shaders.

PSY
Developer
8
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 31st Aug 2020 19:08
@blink0k

Your Boulder Dash Clone looks nice Are you still developing?


PSY


PSY LABS Games
Coders don't die, they just gosub without return
Lupo4mica37
4
Years of Service
User Offline
Joined: 1st Jun 2020
Location:
Posted: 31st Aug 2020 21:23 Edited at: 31st Aug 2020 21:26
Yeah, that Boulder Dash game remake looks really nice.

BTW PSY LABS, I checked out your MOLECOOLS game, that is really nice chemistry educational game, really good brother!!!

Deffinetly will buy it.
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 31st Aug 2020 22:55 Edited at: 31st Aug 2020 22:56
Quote: "Your Boulder Dash Clone looks nice Are you still developing?"


Thanks for the props guys. It is very much still "on the shelf"


Have you solved your problem Lupo4mica37?
Game_Code_here
4
Years of Service
User Offline
Joined: 2nd Jun 2020
Location:
Posted: 1st Sep 2020 22:44
So I've decided to not use any shaders and my flashlights work but for some reason the position is not correct and the light doesn't work on my players left side. Odd. There is no getlightx or getlighty.

But at least I'm close.
PSY
Developer
8
Years of Service
User Offline
Joined: 3rd Jul 2016
Location: Laniakea Supercluster
Posted: 2nd Sep 2020 14:44 Edited at: 2nd Sep 2020 14:45
@Lupo4mica37
Thank you very much!
I'm really glad you like it


@blink0k
I released a BD Clone named Get The Gems back in 2016, but it was made with B3D ( which uses DX7 and DP ), which is totally outdated nowadays.
Under Windows 10 and some versions of 7, it crashes when trying to run it in fullscreen, and has a lot of other graphical issues.
Also, it runs at 800x600, which causes stretching on almost all devices.

So I decided to rewrite it from scratch with AGKS. I've been into it about 3 weeks, and the core and logic are done. I also made a ton of improvements regarding keyboard controls, resolution, animations, tile GFX, sound and other stuff.
It also looks identical on all devices, no matter the resolution / screen aspect ratio.
At the moment I'm redesigning / improving all the levels.
I hope I'll be done in about a month
AKGS handles it quite well. I'm positively surprised. Having a lot of fun atm


PSY


PSY LABS Games
Coders don't die, they just gosub without return
blink0k
Moderator
11
Years of Service
User Offline
Joined: 22nd Feb 2013
Location: the land of oz
Posted: 2nd Sep 2020 21:39
hat sounds awesome PSY. I'm looking forward to it

Login to post a reply

Server time is: 2024-11-21 12:36:18
Your offset time is: 2024-11-21 12:36:18