GLBasic forum

Main forum => Announcements => Topic started by: Wampus on 2013-Nov-18

Title: Lab Assault
Post by: Wampus on 2013-Nov-18
Lab Assault

(http://i904.photobucket.com/albums/ac242/wheeethefibble/webpics/scrshot_zps7b6512af.jpg)

Above is a screenshot from Lab Assault, a game created at the Vancouver Full Indie 48hour game jam. The theme was 'evil genius'. Try it (please  :P).

Controls: WASD or arrow keys to move, mouse to aim, left mouse button shoots, right mouse button lobs a grenade.

Kill everything that moves. When you see dynamite on the surrounding buildings, touch it to blow them up. There are power-ups inside.

More complete version now up: -

PC download (https://docs.google.com/uc?export=download&id=0B7kesBAmvQbLYXI3X21FVzhISTQ)
Mac download (https://docs.google.com/uc?export=download&id=0B7kesBAmvQbLYkE2VjBscnRNNWM)
HTML5 in browser (https://googledrive.com/host/0B7kesBAmvQbLbTA1bmYwd0Eydzg/index.html)
Original PC copy as it was at the end of the game jam (https://docs.google.com/uc?export=download&id=0B7kesBAmvQbLUFdEMWVpOUNraVE)


Currently the game is at it was at the end of the jam, i.e. unfinished with a few buggy quirks that pop up from time to time. I'll update this thread with a more 'final' version once I've tweaked the gameplay, added missing features and updated the credits to reflect the fact there were more sound people helping me out. Currently there is no way to win the game other than last longer than you did previously. Also, when you die, you just fall over face down and kind of stay there, with enemies collecting around you in a dodgy looking scene.

I had a lot of fun.  :) Best game jam I've ever done. There were over 100 people at the event. It makes a big difference when surrounded by other indie developers to help out and keep spirits up, especially when running on 8 hours of sleep over the whole 48 hours! At first I was working alone but I realized there was no way I'd have time to do the art and sound as well as code. Luckily a pixel artist finished what needed to be done with his first team so could join me late in the second day. Sound was done by a group of people who were helping everyone who needed assistance. Almost everyone was using Unity or XNA. People were curious about GLB when they saw the game.

Back story: One night an evil genius, genetically bred for warfare, escapes the secret lab he was being kept in. Setting up explosives on the surrounding lab buildings he plans his revenge. If he kills enough lab personnel and the monsters being bred there he can use their DNA to create his own super-army.
Title: Re: Lab Assault
Post by: mentalthink on 2013-Nov-18
Thanks Wampus downloading now... I tell you something.
Title: Re: Lab Assault
Post by: erico on 2013-Nov-19
The random map is awesome! I lake the field of vision and we clear see that the enemies also take that into account, really great!
This has lots of potential! :good:
Title: Re: Lab Assault
Post by: Hark0 on 2013-Nov-19
Downloading and testing!

:good:

WOW!!!!

"Insert coin"...  :D

I  <3 this pixel retro look men!

Congratulations, the speed of the game are very very fast!

Title: Re: Lab Assault
Post by: fuzzy70 on 2013-Nov-19
A thoroughly entertaining little game there Wampus  :good: :good: :good:

Lee
Title: Re: Lab Assault
Post by: SnooPI on 2013-Nov-19
very good retro game but very difficult for me (i'm a looser or... too old   :help:  :P)
Title: Re: Lab Assault
Post by: tatakamucher on 2013-Nov-19
its very cool  :enc:
Title: Re: Lab Assault
Post by: erico on 2013-Nov-19
How are you processing your AI? they check if they see you and each type has a pattern type movement?

I´m really happy to see it going realtime. I have been sketching a rogue game and gave lots of thoughts on the AI, but in my case, it is turn based, so I can push the AI harder. Really like the results you have there. :good:
Title: Re: Lab Assault
Post by: Wampus on 2013-Nov-19
Thanks for the feedback. :) Since this game worked out reasonably well I'm working through seed ideas for a bigger, more ambitious game using some ideas gleamed while writing this one. This is great, since ideally 48hr game jams can sometimes serve to prototype mechanics that can be polished and expanded into bigger things.

The enemy AI is a finite state machine with 10 states:-

0 is inactive - waiting in a room. Go to 1 if made active.
1 is just seen player. pause for a moment in surprise.
2 is go after player, if player can be seen, otherwise go to 3.
3 is go after last location saw player in. If reached or blocked, go to 4.
4 is go after last direction saw player in (currently for too short a distance and time)
5 is waiting briefly outdoors at the beginning of the game, before going to 6.
6 is wandering after choosing a random tile to go towards.
7 is pausing from persuing player, if time to persue runs out or enemy is blocked. Go to 3
8 is pausing from searching for player before moving to searching in last known direction. Go to 6 if fails.
9 is attacking player melee style, if on same tile.

This is the second time I've used that Field Of Vision algorithm for real-time action. It wasn't designed for that but it turns out its fine! While I was making the game I realised there was a way to optimize it even further so it can be used for much larger maps. The game map is 120x120, so 14400 tiles. I can now push the map size to hundreds of thousands of tiles without slowing down the Field Of Vision in real time. What I will need then is to search the net for very fast pathfinding algorithms dealing with large tile-based maps (that can use memory and pre-calculation for efficient path finding).
Title: Re: Lab Assault
Post by: erico on 2013-Nov-19
Great explanation Wampus!

So that is what a finite state machine is?
Heck, I have been using this approach to all my games ever since AMOS to all objects in game. Now I know the name.

Also, good thing the routine is improving (field of vision). It is a marvelous work!

What I wondered about realtime/turn based was cause I wanted a big world and many many many AI npcs.
So I thought turn based could cut some bandwith considering I´m a bad coder.

But your game seems to be pushing hundreds of NPcs in realtime + calculating field of vision for everyone (Only the enemies on screen right?) and it is moving really fast. Your game is really motivating!

Do you check if an enemy is on screen or close to it to compute its full AI? Do you go by a simpler AI in case an enemy is quite far away?
Great work! :good:
Title: Re: Lab Assault
Post by: mentalthink on 2013-Nov-19
Very Very cool, I try for a While and it's  very funny but perhaps a little difficult or I'm really bad playing , I only agree a point in the mouse iwhen you play at the first time it's a bit complex shot to the enemies...
The pixel aspect I loke a lot...

A very very good job...  :nw:
Title: Re: Lab Assault
Post by: Wampus on 2013-Nov-20
mentalthink it is very difficult. I think I should slow the action down.

Quote from: erico on 2013-Nov-19
So that is what a finite state machine is?
Heck, I have been using this approach to all my games ever since AMOS to all objects in game. Now I know the name.

You probably do a lot of things that have a given name and structure in theory, yet you thought them up on your own because you needed a practical solution.

You say seeing the game is motivating. Well, that is very motivating to hear too!

All enemies are updated every display loop. Most of what they are doing is very simple most of the time though. One thing that cuts down CPU bandwidth is not needing to work out field of vision for the enemies. If they can see you, you can see them (unless they are out of view so fading on your screen, in which case you can see them a little longer than they can see you). They also don't have pathfinding beyond trying to move to a new location and stopping if they run out of time or get blocked by a wall.

You know, you could probably build a big world with many, many AI npcs. If what they are doing most of the time is following some simple logic and only needing more complex stuff when they transition from one state to another, that can be very quick. I thought I would only be able to use that Field of Vision routine in a turn-based way, but I greatly underestimated CPU bandwidth. Even mobile devices are so fast nowadays.

Btw I did a quick speed test on an eee901 laptop and the Nexus 7. Seems to run at full 60FPS on both. I had my doubts, but since you mentioned it I thought I would check.
Title: Re: Lab Assault
Post by: kanonet on 2013-Nov-20
I like it! Again you have done a great work!

I dont think its to hard or to fast, on my 6th or 7th try, I managed to clear all rooms and killed all enemies that I could find, see screen shot. It just needs some Victory condition or something like that. Btw my last run before this just ended with a crash to desktop after maybe 2min of gaming - I dont know why. But this was the only bug that I run into.

PS: now I want my super-army! :P
Title: Re: Lab Assault
Post by: fuzzy70 on 2013-Nov-20
I didn't find it to hard either but that is mainly due to playing quite a few games with the same or close to yours control system, i.e keyboard moving & mouse aiming/rotating style, games like Geometry Wars for example.

If you have little or no experience of that type of control then I can see how it would be difficult, but all I can say is keep at it & before you know it you'll get to grips with it & feel like second nature  =D.

Please do continue with this game Wampus & add all the features you would have liked to have put in but couldn't due to time constraints from the Jam.

:good: :good: :good: :good:

Lee
Title: Re: Lab Assault
Post by: MrPlow on 2013-Nov-21
Looks fab!!!

like Lords of Chaos or Laser Squad mapping...like it!


Gonna download first thing in the morning...
Title: Re: Lab Assault
Post by: Wampus on 2013-Nov-22
Posted an update. Actually has a win state now.  :-[ Also game is more balanced with difficulty levels to choose from.

As an experiment I put up a html5 version. Sound cuts out in Chrome sometimes but otherwise it's fully playable. It makes me want to put all my games up as html5 versions. 
Title: Re: Lab Assault
Post by: Ian Price on 2013-Nov-22
Does indeed look like the bees knees :)