Red Wizard Island

Previous topic - Next topic

r0ber7

Quote from: Hatonastick on 2011-Nov-01
Finally remembered the name of the game this reminds me a little of: Warlock's Quest on the Atari ST.

This one? :)
Oddly enough, most wizard platform games have blue wizards.  O_O

Anyway, I've been wondering about lighting. I haven't yet bought GLBasic, but I was thinking, if I did, could I used the 3D lighting effects on 2D graphics? Right now my light effects are just png's with an alphamode of -.1 or something. For example, a woodfire would have a red/yellow ish light which would light up the entire area around it, and so on. I could also just use the png method, but that wouldn't allow for shadows, and it would be a very static approach anyway.

Hatonastick

#46
Yup, that's Warlock's Quest.  Problem is I can find screenshots but nothing to remind me what the game play was like.  So I'm roughly 90% sure that's the one.  Sort of. :)

Honestly, prefer your red wizard to blue ones.

3D lighting effects (I'll be surprised if I'm wrong) only work on 3D objects.  So the answer is no.  However there are some nice special FX  you can pull off using alpha, blend modes and the like.

Not that it's quite what you are looking for, check out these two example programs:
http://www.glbasic.com/forum/index.php?topic=6924.0

Download both example programs and try them.
Mat. 5: 14 - 16

Android: Toshiba Thrive Tablet (3.2), Samsung Galaxy Tab 2 (4.1.2).
Netbook: Samsung N150+ Netbook (Win 7 32-bit + Ubuntu 11.10).
Desktop: Intel i5 Desktop with NVIDIA GeForce GTX 460 (Win 8.1 64-bit).

Slydog

#47
For 2D lighting, you could use the colour parameter on POLYVECTORs.

Have a light / torch sprite drawn somewhere on your map, and for all surrounding sprites you calculate the distance from the light for the brightness value and apply that to the POLYVECTOR colour for each tile corner's distance, in gray scale.  Could work fairly well for dynamic lights too, or flickering lights.

I've read that applying colours to polyvectors (ie: only white works 100%) slows down your code for some platforms, which sucks.
Anybody know if there's hope this can be fixed, or is it a limitation of OpenGL (ES?)?

Can custom shaders be applied in 2D mode?
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

r0ber7

Thanks for the info Hatonastick and Slydog. Will check up on POLYVECTOR tomorrow.

Quick update:

Introducing Magor (wizard who aids you on your journey):



And the magic shop now has a chminey:



In addition, I changed the hue of the moonlight (still a bigass transparent png), and edited the code somewhat so that the shield spell doesn't overlap with the ground.

Hatonastick

Love the pixel art. :)  Hmm you've inspired me to think about skipping my first GLB game (which has no graphics) and start a 2D one.  I miss doing pixel art (not that I'm that good).
Mat. 5: 14 - 16

Android: Toshiba Thrive Tablet (3.2), Samsung Galaxy Tab 2 (4.1.2).
Netbook: Samsung N150+ Netbook (Win 7 32-bit + Ubuntu 11.10).
Desktop: Intel i5 Desktop with NVIDIA GeForce GTX 460 (Win 8.1 64-bit).

r0ber7

#50
:) Cool. As with anything, the more you do it, the better you get.
Here's some useful links on pixeling.

A forum full of pixelers.
http://www.wayofthepixel.net/pixelation/index.php

A pretty good tutorial on shading and sprites.
http://www.derekyu.com/?page_id=218

I've got a few GLB related questions, considering sound.

1. Why do I only hear sound when using PLAYSOUND with a volume of 0.9 or higher? I thought the range was 0 - 1 but anything below 0.9 seems to be silenced? Edit: I think that was just because of the Windows volume...

2. Is there a way to adjust the pan and volume of a channel while a sound is playing? I would like to have ambient sounds, like a campfire, adjust their pan and volume relative to the player's position. When you'd get close to a campfire for example, volume would increase & panning would go more to the center. I can also achieve this effect by using PLAYSOUND with really tiny soundbites (like I do now), but that makes it sound not so good. The pan & volume changes are now quite abrupt and the sfx sounds too much like a loop of a short file, which it is. :P

r0ber7

#51
Alright, turns out I have some time left before my small vacation, so I came up with a new idea: black hole spell.

I haven't got time to work it out in the code, but I'll post my thoughts here for future reference.

The idea is to have a spell that conjures up a black hole. The surroundings nearby would be warped, and all enemies nearby would be sucked into the hole.

For warping the surroundings I'm thinking of doing something like this:



This is a basic sinewave and its relation to a circle. If I start with a circle drawn by using a sine function, and I decrease the amplitude of the sinewave, that should create a spiral. I would know the x and y of every position on the spiral, throw those in an array. I could then adjust the x and y of the polygons of the surrounding grid based on their relative distance to the spiral. If my thoughts are correct, that would create a spiral warp in the grid. In addition I could throw some nice gfx on top, like one of these:



Enemies would be sucked into the black hole following the x and y of the spiral, increasing in speed and decreasing in size, creating the idea of them being sucked away into nothingness.

This means I have to change all landscape drawing into POLYVECTORs, but I was planning to do that anyway, since I might be able to create shadow/light effects with that as well.  :good:

r0ber7

#52
Alright you guys, I've made another vid.
New in this video:

- Magor the wizard that gives you advice. (Someone on TIGSource told me Magor means idiot in Czech, even better. :))
- Flying enemies (lil dragons, I love the sound they make when you shoot them. Skip to 1:10 in the vid to see them die.)
- Background ambient sound

http://www.youtube.com/watch?v=TPyFYSnJmYw&hd=1

I'll be gone for a few days on vacation, so no updates after this one for a while. I'll be taking my sketchbook with me, so expect to be spammed with doodles of level designs and endbosses in the near future!

Cheers.   :good:

Slydog

I can't wait to see that warp effect!

And regarding your PLAYSOUND volume question, for some reason the volume is on a logarithmic / exponential scale.
It could be possible to create a function that takes an input from say 0.0 to 1.0 and scale it properly between 0.9 and 1.0, but you'd have to play around with the exponential scaling to get it to sound right.  (I don't think it's linear)
Kitty knows this but I'm not sure if there are any fixes planned.
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

kanonet

Logfile says:
Code (glbasic) Select
// 10.156
   ...
   // Win32:
   //    PLAYSOUND - volume is linear now (used to be logarithmic).
   ...

So it should be fixed?
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

Ruidesco

Cool! The transparent rays of light in the foreground weren't there either the last time, were they?

Hatonastick

Every video you release I like this more and more.
Mat. 5: 14 - 16

Android: Toshiba Thrive Tablet (3.2), Samsung Galaxy Tab 2 (4.1.2).
Netbook: Samsung N150+ Netbook (Win 7 32-bit + Ubuntu 11.10).
Desktop: Intel i5 Desktop with NVIDIA GeForce GTX 460 (Win 8.1 64-bit).

matchy

r0ber7, could you please post some source code regarding the cool warping effect?!

Kitty Hello

Wow, this is really a great game you started there. You're a very talented artist, too.

r0ber7

#59
Quote from: Ruidesco on 2011-Nov-03
Cool! The transparent rays of light in the foreground weren't there either the last time, were they?

Nope. Well, not in the way they are now anyway.

Quote from: Hatonastick on 2011-Nov-04
Every video you release I like this more and more.

Just wait, I've got some nifty new things coming up.  =D

Quote from: matchy on 2011-Nov-04
r0ber7, could you please post some source code regarding the cool warping effect?!

I will. I'll probably make a seperate proof-of-concept program, and I'll put the entire code up here once finished. It's a big idea though, so give me a week or two. ;)

Quote from: Kitty Hello on 2011-Nov-04
Wow, this is really a great game you started there. You're a very talented artist, too.

Thanks! Although I wouldn't call myself an artist, heh. I just doodle stuff. And, (based on forum posts) assuming you're the guy behind GLBasic: THANK YOU SO MUCH!  :good:

Ok, I warned you. Doodles coming up!



Testing out a dragon idea.



Idea for an upgrade for the fireball spell: additional fireballs that appear to swirl around the first one, like planets in rotation, in a sinewave motion.




Rough idea of level 2.




Viking chicken endboss & viking ghost.




Their digital counterparts, waiting to be refined, repixeled, and animated.

This is the first time I've turned a sketch into a digital image. I dare say it's looking good. Sprites will be much smaller than these ones, but for detail they're good to work with. Animation is also very easy with this, because there are several layers to each image which I can move independently. Tomorrow I have little time to work on the game, but after that I'll have a somewhat free day (one hour shift) so I might start on the warp thing & the fireball upgrade on wednesday.