Tampilkan postingan dengan label Stealth. Tampilkan semua postingan
Tampilkan postingan dengan label Stealth. Tampilkan semua postingan
Jumat, 12 April 2013

(Heart) KOFFERT

This is the game a friend and I made for game jam 2013, it's a little late (3 months or so) but I forgot about it entirely in the 12 straight hours of sleep after the two days of programming. We were given a theme that was the sound of a beating heart so naturally we made a game where you steal people's hearts and transplant them while sneaking around the hospital.

Since I had written some stealth code before I figured I was up for the challenge of writing new pathfinding and detection code in 48 hours. In the end what I managed to do in 48 hours was much better than what I had written previously probably because of the experience I gained from the last time I tried it.

In this picture the player (A black cylinder) hides from a guard (A black cylinder with a field of view cone) behind a column, he has the heart in his briefcase.
The game is pretty buggy and incomplete, there are no character models. There are three levels, essentially you find the patient with the heart, put it in your briefcase  make your way to your patient and win the level. On your way you'll have to hide from guards by staying in the shadows and/or out of their field of vision and with the heart in your briefcase you'll have to stop by other patients to fill up with blood so the heart keeps pumping. There are also blood packs available that fill you half way up with blood as soon as you run out and adrenaline shots that let you move faster for 10 seconds.

Also you can save and load from last save in the pause menu (esc) this is useful for trying things and not starting over from the beginning.

You can play it here.

templates-office.com Jam, Stealth
Sabtu, 01 Desember 2012

Path following

Guards can now be called on to find, then follow paths. Also the I took away the streamlining of the path, it was overkill to do that while drawing the path and it works better to do it while the guard walks, that way I can use his position to check if he can see any upcoming nodes as he walks and if he does, jump to those instead of any before them. The colored dev lines don't look as organized though :(
Also guard movement is smoothed so it looks pretty natural when he turns corners and along with the realtime checking for a more streamlined path it means that the movement looks a lot less node based because he doesn't need to get to the node before he turns, he just turns when he has a straight path to the next node. In the above picture you can see a non-steamlined path, the script then "sees" points one two and three drawing yellow lines to them, then because it can't see four yet it walks to three.
templates-office.com Pathfinding, Stealth
Kamis, 29 November 2012

Working A* pathfinding

The A* pathfinding system is now functional and very efficient, guards quickly generate a route to the player using the nodes placed on the map and then optimize the route deleting any superfluous nodes on the path. I ended up not using the arrays built into the nodes of closest other nodes because I would have to use that array and the open list of nodes on the pathfinding script at the same time constantly cross checking that a node in the node's array was also on the script's array and then finding the chosen node from the node's array in the script's array to remove it from the open list. I decided it would be more efficient to just check all nodes.
(Above) The pathfinder with no optimization finding the first route through the nodes to a set point. (Below) With optimization code (And fewer nodes) the script finds an efficient path to the target. Also switched to spherecasting instead of raycasting because rays were cutting corners too close and guards couldn't get past comfortable and from time to time would try to find paths through arrow slits.
One more addition needs to be made before the script is ready to be implemented by the guard movement script, that is back tracking. I haven't run into any problems that would need it yet, any failures of the pathfinding so far have been node placement related but as levels get larger and more complex it's probable that guards will start taking dead ends and the pathfinder will get stuck at the ends of hallways instead of reaching the target. To solve this the script needs to be able to backtrack one node at a time. So ad the end of the dead end it realizes its mistake and moves back one node and looks for a new closest node disregarding the previous choice, either it finds a new path or it moves back again until a new path is available.
Once all this is implemented guards will need some sort of smoothing to make their paths look more natural, also they may run this script over the course of a few frames to make sure it always runs smoothly and the guards don't need to move immediately anyway, a few frames to notice the sound or sight, then a few frames shouting out or looking around will only look natural.
templates-office.com Pathfinding, Stealth
Jumat, 16 November 2012

AI pathfinding nodes


I started writing an A* pathfinding system with branching nodes, each node is linked to it's closest eight nodes for more efficient path plotting. I wrote a script that would cycle through them and link them to their eight closest nodes who's paths don't intersect walls or obstacles. Above is the turn out when I got it right, below is the result when I accidentally required rather than disallowed raycasts intersect with walls and obstacles.



Two more examples, above just two links each, below is four which is probably the one I'll stick with for speed.



templates-office.com Pathfinding, Stealth

Light level


Light level is the first thing I've completed, the concept for measuring light seemed simple but it was so essential to the gameplay I decided to do it first to make sure it could be done efficiently and accurately.

The method is quite simple, since we're already using light objects in unity to create light we can add extra code to each of them to check how much they're lighting up the player. All the check does is raycast the distance from the light to the player to check for walls in the way, then if it finds the path clear it measures the distance to the player and assigns a percentage based on the distance. Unity handled all of this very well and the code ran smoothly with no difference in frame rate.

Past this there are still a lot of improvements to be made to this system, things like ambient light, how close the player is to walls and special areas like outside or rooms with windows. Also the checks run to the centre of the player so sides of the player poking out doorways won't register as putting the player in light and if it's dark in the middle of a room the player can walk through undetected even though logically the character would make a silhouette on the wall behind him if it was lit well enough. That said there's always room for improvement but as long as the basic system works I can go ahead with the project.
templates-office.com Stealth
Senin, 08 Agustus 2011

Spiderman Shattered Dimensions

Dibanding semua game Spiderman yang pernah ada, Spiderman Shattered Dimensions mungkin yang paling menarik. Bayangkan, Anda kini bisa memainkan empat versi Spiderman sekaligus! Selain versi yang kita kenal selama ini, Shattered Dimensions menyuguhkan tiga versi lainnya yakni Spiderman berkostum Venom, Spiderman Noir, Spiderman 2099. Adanya empat versi Spiderman juga berarti gameplay yang lebih variatif dibanding seri-seri sebelumnya.


Kisah berawal ketika Spiderman menggagalkan upaya Mysterio mencuri sebuah artefak dari museum, Namun, akibat kecerobohan Spiderman, artefak tersebut justru pecah hingga pecahan-pecahannya terlempar ke berbagai dimensi. Belakangan, diketahui artefak tersebut memiliki kekuatan misterius yang membahayakan dunia jika jatuh ke tangan yang salah. Dengan perantara Madame Webb, empat spiderman dari empat dimensi kemudian diminta untuk mengumpulkan pecahan yang tersebar ke dimensi mereka.

Dari keempat Spiderman, dua di antaranya merupakan sosok yang relatif asing bagi kita. Keduanya adalah Spiderman di masa depan di tahun 2099 dan Spiderman di masa lalu yakni Spiderman Noir. Meski setiap Spidey digambarkan memiliki kelebihan tersendiri, gameplay tiap versi tak banyak mengalami perubahan signifikan. Pengecualian hanya bagi Spiderman Noir: Spidey satu ini paling lemah dibanding versi lainnya. Ia mengandalkan kegelapan untuk menyergap musuhnya. Game ini menerapkan metode yang sama dengan Splinter Cell: Conviction. Layar akan menjadi berwarna hitam putih jika Spidey terlindung kegelapan. Walaupun sebenarnya kurang efektif karena tampilan game menjadi suram dan didominasi warna gelap, metode ini jelas berhasil menambah daya tarik tersendiri bagi game ini.

Website Resmi: spidermandimensions.marvel.com
Spesifikasi Minimum:

  1. Microsoft Windows XP/Vista/7

  2. Core 2 Duo 2.6 GHz or AMD Athlon 64 X2 3800+

  3. 1 GB RAM (XP) / 2 GB (Vista)

  4. 256 MB 3D hardware accelerator card with Shader Model 

  5. 3 GB harddisk space

templates-office.com action-adventure, Platformer, Stealth