Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Zapp

Pages: [1] 2 3
You can compile on a networked drive, just ensure that the client that is connecting to the drive has write access.

GLBasic - en / Re: Quick request
« on: 2012-Jul-25 »
English, from Australia.

GLBasic - en / Re: GLBasic V11
« on: 2012-Jul-14 »
I never saw any confirmation that after losing his HDD and backups for the recent months, that Gernot had managed to rewrite all the code he lost, if he hasn't completed that, chances of a new build of the current IDE aren't going to happen anytime soon.

IOS initially, if it's popular I'll probably look at releasing it on Steam.

Hi Hemlos,

Sorry for not replying sooner, I had to rebuild a large portion of code due to it not being flexible enough, I've just got back to the shadows and spent a few hours tinkering with your code. I must of completely misunderstood how it worked the last time, as I've played with it enough to get it to where I want it. Thanks again!

That's essentially what I am already doing for every SHOWSCREEN

Screen 1 = World
Screen 2 = Black square with white circles for lights with gradient.

Draw Screen 1
Draw Screen 2 over Screen 1

The tricky part is:

1. Getting the white to not be white but rather a gradient from black to transparent
2. Maintaining 30fps on an Iphone (somehow I don't think this will be a problem)

I'm back to looking at number 1 right now after a weekend off, using all the wonderful suggestions given above.

Kind Regards,

I dont know if this is exactly what youre looking for, but it is simple.
You can adjust the resolution of the spotlight too, to tweak it for more performance.

A parrallel project i made, giving a magnifier effect with the same sort of technique using poly is in discqus_magnifier.rar

More importantly, Disqus1_spotlight.rar is a test project i made giving a stencil shadow effect.

Hope this is useful, goodluck!

Wow Hemlos, that might actually do it and so easily too! Thanks!

Edit: On closer examination the code falls over when you overlap spotlights, so I'll need to play with all the suggestions and see what works best.

Ok thanks! That makes a bit more sense. Would be greatful if you could expand later. In the meantime I'll try to work out the Band method.

Hi Slydog,

Thanks so much for the response! I can make sense of what you are saying somewhat, still a little lost on the process.

I was originally planning on just using screen size (480x320) and scaling up as required for the higher resolutions of the other devices. However I think you are right, that 320x160 would work better and scaling it up might smooth the lighting a bit better. I'm a little lost with the conversion from white to transparency that you mention, can you give a little more assistance with this? I am assuming this would require a loop through of each pixel in the image to adjust its data? If so, a smaller sprite always be a benefit.

Forgive my ignorance, but which commands would i be using to adjust pixel data? The help menu suggests that getpixel/setpixel would be slow.

Hi guys,

I've updated my main post with a bit of a clearer description of what I am trying to do. I have a feeling the answer may require inline code with gl commands and may be beyond my current limitations, but I'd appreciate if anyone can answer my questions.

Kind Regards,


Hi Again Mental,

Thanks for the suggestion, I've actually tried that thinking it wouldn't work but gave it a go anyway. You are correct it looks too washed out, the colours are messed up.

Hi Mental,

Thanks for the reply, I think in this case this may not work, I need to be able to have multiple holes in the shadow. I may just have to go with a full screen poly an use co-ords to fill the screen with black transparency or a small gradient.

Hi Okee,

Thanks for the suggestion, away from development pc at the moment, will take a look at it in the morning.



UPDATE: 29/06/2012 - Reworded question to make it clearer for the community  :|

Hi Guys,

After leaving the problem for a while to think about it and then coming back to look at it again, after some research it seems that the correct terminology for what I wish to accomplish is stencil shadowing.

Wondering if the following is possible to do the following and if so how would I go about it? I've also attached an image from photoshop explaining what I'd like to accomplish, sadly Mentalthink's method will only assist with 1 lightsource, I need a method that is capable of multiple.

1. Create a Virtual Screen for calculating shadows.
2. Draw a Solid Black Rect for the shadow.
3. Draw over this rect with a gradient where light would be cast.
4. overlay this over my topdown 2d world.
5. Is this possible on IOS without massive slowdown? (I'm using polyvectors and need to maintain at least 30fps)
6. Is this possible with standard GLBASIC or will it require inline code?

Kind Regards,


Hi Guys,

I'm usually pretty good with working out inventive ways to solve a problem on my own, but this one has me stumped.

So I have a small action rpg that I'm working on. The Room is top down, I'd like to be able to have some rooms with different levels of darkness to make the game a little harder.
I've managed to get to this stage just fine as a temporary measure I am able to cover the 2d environment with a solid black texture and vary the transparency using ALPHAMODE.

What I really would like to be able to do is somehow allow for lighting on the level, so for instance if the character has a torch, there is an area around him that isn't shadowed, likewise if there is a candle on the wall, then that area would also be without shadow.

Essentially I want to start with a Black fullscreen texture for shadows and then cut out what isn't in shadow by making it transparent. Is this possible and if so how would I go about doing it? Would it severly impact framerate by being too slow a process? Perhaps since my game is 2d Tile based, I may need to calculate shadows properly and use a shadow map, but I'd like to avoid the extra work of calculating all those poly's, if there is an easier solution that can be achieved by only drawing one poly.

Thanks in advance for the assistance.


I guess the advantages to not using the exported save types and the native one, is that all I need to do is hit CTRL+S to save any changes and then with the app running hit F3 which is bound to run to the load level function. But I understand what you are doing with you game too. I have the following layers:


This allows me up to three layers of depth to the 2d rpg action rpg engine, so i can have walkways in dungeons that have alternative collision to the main floor etc. the foreground allows me to have structures like support beams that the player can walk under.

Pages: [1] 2 3