Phoenixan: Fire Under Siege

Very nice; the animation frames and the GIF look quite smooth, indeed.

The “Dynamic SB Lighting Engine” catches my interest the most :stuck_out_tongue:. Care to explain further, or, have any screenshots/video you could provide of the D(SB)LE in action?

Sure enough. :slight_smile: It’s even just a few simple code-work using surfaces in GameMaker 6.1 and 7.0.

Alarm[0]

surfdisp = 1 if(variable_local_exists("surf_lt"))if surface_exists(surf_lt) then surface_free(surf_lt) surf_lt = surface_create(view_wview[0],view_hview[0]) if !variable_local_exists("ambience") then ambience = c_black
End Step

if surfdisp{ ?texture_set_interpolation(1) ?if !surface_exists(surf_lt) then surf_lt = surface_create(view_wview[0],view_hview[0]) ?surface_set_target(surf_lt) ?draw_clear(c_white-ambience) ?draw_set_blend_mode(bm_subtract) ?//Basic Lights (Used for almost everything) ?with(objLight)if visible then draw_sprite_ext(sprite_index,floor(image_index),x-view_xview[0],y-view_yview[0],image_xscale,image_yscale,image_angle,image_blend,1) ?draw_set_blend_mode(bm_normal) ?surface_reset_target() ?texture_set_interpolation(0) }
Room Start
set alarm[0] to 1
set variable surfdisp to 0

Room End

if(surface_exists(surf_lt))surface_free(surf_lt) surfdisp = 0

Draw

if surfdisp{if variable_local_exists("surf_lt"){if surface_exists(surf_lt){ ?draw_set_blend_mode(bm_subtract) ?draw_surface(surf_lt,view_xview[0],view_yview[0]) ?draw_set_blend_mode(bm_normal) }}}
Var “surfdisp” added to simply fix a visual issue during room transitions.

Then use some sprites like so:
http://img.photobucket.com/albums/v518/pho…lightexamp2.jpg
It’s very basic. You can make sprites to any light shape you want. It’s pretty much just creating a mask over everything. :slight_smile: It helps if you make your own, but there are some good examples in GearGod’s Luminare Engine if you can find it.

And make an object called “objLight,” and additional light objects with your sprites, all children of said object “objLight.” In objLight, have a comment in the Draw Event saying “Do Nothing”, “Hi, I’M A PLACE HOLDER!”, something so that it doesn’t draw the sprite on its own. Then you can cull off the lights to make it even faster with this in boundary view 0.

var xr,yr; xr = (sprite_width-sprite_xoffset)*image_xscale/2 //x radius yr = (sprite_height-sprite_yoffset)*image_yscale/2 //y radius if(x+xr>=view_xview[0] and x-xr<=view_xview[0]+view_wview[0] and y+yr>=view_yview[0] and y-yr<=view_yview[0]+view_hview[0])visible = 1 else visible = 0

Eventually, it gives you this:
http://img.photobucket.com/albums/v518/pho…/lightexamp.png
http://img.photobucket.com/albums/v518/pho…ums_example.png
(first is a little slow because it has more lights, in addition to me running Left 4 Dead in the background at the time. lol)

And then there’s the elevator shot on the front page (older elevator shot shows previous lighting engine I used, which was GearGod’s original sample, while the bottom is the current one). That also shows in action. :slight_smile: Feel free to screw around with it more. I was new to surfaces when I made it, and I’ve only modified it little by little since. :stuck_out_tongue:

Well, I wasn’t looking for ways to do it myself, but thanks :smiley: I appreciate your willingness to show some code.

Ehrm, so honestly I’ve never heard of the surface functions in GM 6.1+ @.@. I work primarily in GM 5.3a, although I do use 7 (I’m running Vista, otherwise it would be 6.1) semi-frequently for class work and other random things. I would’ve expected myself to at least know about a set of surface functions, after using GM for what, around 6 years now? >_>

Anyways, what exactly do the surface functions do? I can’t really derive a whole lot from the code other than it’s related to the draw event and requires a target of sorts (that or I’m just tired and lazy right now), and presently am too lazy to look at the GM7 help. If you don’t want to explain, don’t worry about it. I’ll just look it up in the help tomorrow, heheh.

Must resist…


DAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA!!!

Looking better and better. :smiley:

Well, as you said, that is pretty much what it is. Except with your target, you can move it, erase it, apply a background color (as I did with “amblight”), etc. :stuck_out_tongue: Think of it as a chalk or white board.

Also, the key difference between a surface and just using the draw event is that you don’t have to update it every step. :wink: The drawback, however, to just drawing text, sprites, etc. using draw is that surfaces hog a fair bit more video memory. Lighting’s already restricted my game to some older Intel graphics chips. :sweat: Though it can run just fine on a GeForce 2.

Unfortunately, due to the fact that the game started before rabbids, I’m not including them. :stuck_out_tongue:

Unless I decide to include a secret cave somewhere or something. :stuck_out_tongue: There are secret areas.

DO IT!
I love the rabids.

lol I always kind of pictured entering a cave and hearing the Sanxion theme in the distance, though I probably wouldn’t do specifically the Sanxion theme, since all the songs are custom these days.

One more thing I’m proud of after all this time…

Custom Keyboard and Gamepad mapping.

Not bad for 2 years and 3 days of work >.>

Just kidding, it looks like it’ll be fun. Keep it up!

Okay, don’t forget tons of new areas too. lol. :stuck_out_tongue:

Though I’ve drawn out all the levels on paper first.

Neat :stuck_out_tongue:. I’ve achieved custom keyboard mapping, but suggest that players use GlovePIE if they want to use a gamepad xP. Lazy me, I know…

I originally used the GamePad Extended extension for GM7Pro, but then I ended up not using it, because I ended up using additional GM functions to detect how much the user was pushing a stick in a direction. :\ I originally had walking/running depending upon how much the stick was being pushed (or if a walk key was being pressed, like the sprint key in HL2 or the boost in Super Metroid), but I took it out in favor of a Metroid Zero Mission kind of deal, where you run faster after walking on ground for a while.

I guess the game is kind of relevant to this forum, because it’s both Rayman and Metroid inspired in a way (at least the final version is)… :>_>:

I’m bumping just because I added in a few new screenshots to the front page. I also have a blog of sorts.

If anyone has any suggestions, let me know. Meanwhile, I’m just plugging away at the sprites.

Oh yeah, and here’s a few more newer animations and stuff. Some of the images in previous posts (not the front page) are gone just because the images have been updated or they’re just screenshots that are out of date or whatever.

Iris (Again), only with sword & wing start animation.


Just a sample of how the electric attack looks. It does stop at walls and jump between enemies. :stuck_out_tongue: I actually used KXTesla at one point, but now I use my own code plus the use of sprites, because it looked better with the game’s 320x240 view size.

I’ve moved to Canada with my girlfriend and stuff, so I’ve been pretty busy with life outside of sprites and whatever, so development’s been a little slow between December and now. :frowning:

But I’m pretty close to showing off some of the more fun things, like the mine and mountain areas. I just don’t want to right now because there’s so many masking blocks in the place of some of the objects.

Congrats on moving to Canada, those things you’ve shown off look really cool :smiley:

http://www.youtube.com/watch?v=NZt-ab1hf38

I have a video uploaded of the first levels, in case anyone is interested on these forums. I highly recommend watching in high quality just so that the aspect ratios match.

There’s also a few problems I had when recording, so some of the faster animations didn’t get recorded (such as the movement of lums’ wings).

The lighting effects and pixel art are excellent, and I think the particles like smoke and explosions could fit in better with the style. :wink: