ID:120051
 
Shooter Demo by Forum_account
A sample top-down shooter.
4 fans · Created Oct 16 2011
Shooter Demo

I created a demo using the Dynamic Lighting, Mouse Position, and Pixel Movement libraries. It shows how you can easily use these libraries to create a top-down shooter. You can use the code as a reference to see how the libraries are used. You can also use it as a starting point to build a game.

Sidescroller Update - v3.1

Just a few small changes were made. I also added a new demo called "game-demo-2" that contains enemies, shooting, damage/death, warps, and camera control.
Well it looks like I might be making Lands of Darkness anyways =D
icons.dmi was not included in my download for the sidescroller lib
Yut Put wrote:
icons.dmi was not included in my download for the sidescroller lib

I'm not sure how, but 4 folders were left out of the .zip (it was also missing the game-demo-2 folder which was the purpose of posting the update!). I just uploaded a new version that should have everything =)
Lige wrote:
Walked all the way west in the demo, here is a log of run-time error(s) I got.

I couldn't reproduce it but I'm pretty sure I was able to fix it anyway.

It was something inside of the dynamic lighting library. I didn't upload the fix so you may continue to get the error, but the next update to that library should fix it.
No Tiny heros :(
Avainer1 wrote:
No Tiny heros :(

Don't worry, I'm working on it. This demo didn't take very long to make.
The demo is very nice looking!

Unfortunately, once I reach enemy territory, the character no longer looks in the mouse pointer's direction nor can I shoot. I'll probably remove the mouse position demo and instead have the character rotate with the A and D keys.
Calus CoRPS wrote:
Unfortunately, once I reach enemy territory, the character no longer looks in the mouse pointer's direction nor can I shoot. I'll probably remove the mouse position demo and instead have the character rotate with the A and D keys.

I'm not sure why it does that. My best guess is that BYOND generally chokes on user input when multiple things are happening.

To lighten the load on the CPU, you can add this to the top of player.dm (inside the world/New() proc):

lighting.pixel_movement = 0


By default the light source attached to the player updates every time the player moves, even if you move just one pixel. Adding that line of code will make the light source update tile-by-tile.