Tuesday, 31 October 2017

2.2 The Priorities of a Games Developer


The Priorities of a Games Developer

I feel there are three main priorities to look into when it comes to developers and what they want their finished product to achieve, these are how hard they can push the hardware, the happiness of the end user and finally, the overall achievement and review of the product.

Hardware: PC’s and laptops today can be updated with the highest spec, CPU, GPU, SSD, and RAM that developers don’t need to worry about system requirements, they can push hardware to the max but in the end hardware will always win because there is only so much you can put into a game. Are some developers more interested than trying to break a computers component by developing a meatier game? Yes of course, but I think there are more games developers more interested in making a game more playable for all by making the spec requirements more appropriate for the today's gaming public.

User experience: Gaming developers or make games for the consoles i.e. PlayStation can only develop games to the spec of the console, if the game requires too much processing power that it won’t run on a PlayStation then the game is no good, it won’t sell. Fortunately, the PlayStation 4 Pro has enough power and graphical interface to run a large amount of games with a high frame rate and incredible graphics, this for one pleases the end user of the console. Using PlayStation, the playing experience is over 80% because the hardware of the console and support all games developed for the console, this is an advantage as when not all games developed for PC are unable to be played on all computers.

Reviews: Obviously the reviews of a game is going to be important to a games developer, the users will be criticising all aspect of a game because as gamers, its what we do. Now do all games developers care about the reviews? I'm not sure but does an artist create a painting and not want to hear the critics? i doubt it. Reviews link in with sales, does a developer sooner sell  more copies of the game or have better reviews.

"game programming can allow you to work on a product you love while honing your software development skills for nongame jobs or a more significant role that involves contributing to a game's content and design."(18)

I have not round many articles from programmers about what there priorities are when developing a game but Hoffman has made a very true statement, Developers makes games because its a passion, what they love doing. I can tell from reading his paper that developers are not really interested in sales figures or reviews, yes they want the game to do well but I feel to them, its more than that and its a feeling of making the drum and playing in the band.

Monday, 30 October 2017

2.3 Mobile Devices & Tablets


Mobile Devices & Tablets

Now how this topic slightly differs from the previous headings earlier in this post, is the processing power being a lot less in mobile devices from your modern day laptop. I think mobiles and tablets are important to mention because the world now operates on these devices, in the current day, I do not know one person that does not own a mobile phone. Now these mobile devices are far less powerful that computers, so why do some developers chose to make games for mobiles and tablets? well...
The low cost of mobile-phone games ties into another key advantage - the huge variation among mobile games. Since mobile games can be produced faster and cheaper than other video games, developers can take more of a risk in trying out new concepts or ideas. Developers don't stand to lose as much if an experimental game is unpopular. (4) Kittmer makes an excellent point which links back to the (2.2 The Priorities of a Games Developer), he makes the point that developers feel more comfortable testing new ideas on mobile devices because creating a game on this format will come at smaller cost and little risk. Console and PC game developers Rockstar who are well know for the making of the Grand Theft Auto series will spend years and millions of dollars modelling and coding a game, now i'm not saying all games take that amount or time and money to develop but you can see the attraction to the newer more modern game developer opting to develop games for smart phones.

So I do like Kittmers point but from another article by A Sowards that makes me still feel that developers who prefer the (2.2 User experience of the customer) would make games for the PC and console gamers. "Hardcore gamers are attracted to console games and PC games because they are often richly complex, massive in scale, and utilize the most powerful graphics technology on the market. Of course, “Candy Crush” doesn’t compare to “Grand Theft Auto” in terms of complexity."(5) 

So what do I think regarding this debate of PC, Console and Mobile wars? Well the points made by both authors make me really think that maybe mobile gaming is catching up because there are more developers creating games for smart phones, and then I think well, console and PC gaming will never be over taken because user want the real drawn into a game feel and the was that is possessed is by the realistic graphical display. Personally as someone who is a console gamer, consoles will never be beaten, but as a mutual support or gaming... maybe mobile gaming is slowly taking over.




Sunday, 29 October 2017

3.1 Pathfinding Concepts - A* Algorithm


Pathfinding Concepts - A* Algorithm

When it comes to pathfinding concepts, the real golden tick of algorithms is the A* algorithm. In AI gaming, its important to understand how the A* algorithm works and what its purpose is. A* aims to avoid using the most expensive route when planning its next move, but as well as this the A* will also invest in the most quickest path. There maybe certain routes the AI could take to get to its goal, what the AI will do is calculate how much it would cost to take one route over another, her is an example of the A* algorithm:

So A will be the starting point of the algorithm, if you check the key the current value of A is 5 so know matter what moves are made, the total cost before starting the route is 5. From here all  the current paths with be calculated up, the method used for example A to B to D to H will be:
starting point A = 5, then the cost of the move to B is 2, the cost of landing on B is 2, then the cost of getting to D will be 4, landing on D will cost 2 and then the final move to H will cost 7 and the total coming to 22. Here are the calculations for the remainder of the paths which the A* algorithm with make full use of:

Option 1 - A:5 + 2 + B:2 = 9 + 4 + D:2 = 15 + 7 + H:0 = 22
Option 2 - A:5 + 2 + B:2 = 9 + 1 + E:5 = 15 + 6 + H:0 = 21
Option 3 - A:5 + 4 + C:3 = 12 + 4 + F:7 = 23 + 10 + H:0 = 33
Option 4 - A:5 + 4 + C:3 = 12 + 9 + G:2 = 23 + 2 + H:0 = 24

Now from the available paths and the information we have calculated, we can see that option 2 is the lowest cost of travel to the AI. 

"A* algorithm combines features of uniform-cost search and pure heuristic search"(6) 

An advantage of A* is that it is like the Dijkstra algorithm (3.2 Pathfinding Concepts - Dijkstra Algorithm) is that both algorithms are used to find the shortest path to the goal, it uses a heuristic method (1.2 Heuristics) to guide and find the best first search. What Robin says in his article is correct but he comes across that is it 50/50 cost search and heuristic search, but I feel the Dijkstra algorithm uses the cost searching feature as its main priority of search source.

Saturday, 28 October 2017

3.2 Pathfinding Concepts - Dijkstra Algorithm


Pathfinding Concepts - Dijkstra Algorithm

Dijkstra algorithm works in a similar way to the A* algorithm (2.1 Pathfinding Concepts - A* Algorithm) as its main obligation as an algorithm it to find its way to a goal in the shortest most cost effective way possible. Dijkstra works by moving vertically as it is was laid out on a graph, the starting point will be set and then the algorithm, would constantly examine the next move by choosing the closing not yet examined vertical move. Dijkstra's algorithm is a greedy algorithm meaning that it will always choose the thing that seems to best right now and without regard for how it may impact future choices.

"In Dijkstra's algorithm you search all the verticies in the graph to determine the lowest cost route between each point. A* is a modification of Dijkstra's algorithm that uses a heuristic to determine which vertices to search."[7] 

Now Dennis pursues an interesting statement that links to Robin's words that'll find in reference (6) in (3.1 Pathfinding Concepts - A* Algorithm), A* is a mixture of both features of search, cost and heuristic. Dennis goes to say that A* is mainly built of of heuristic features, I disagreed with Robin in respect that I felt that cost search was the A* main priority.

I feel that out of the two algorithms, there is one more to mention. Breadth-first search algorithm which uses two values to each vertex, value one is the distance which calculates the number of edges along the path from A to B. And the predecessor vertex which calculates the shortest path from point A to point B. The difference between the Dijkstra algorithm and BFS (Breadth-first search) is that Dijksra does not need to know the target node to start its path, it is a uninformed algorithm.

Friday, 27 October 2017

4.1 State Machine


State Machine

A state machine in AI or otherwise known as a finite state machine or FSM is a algorithm used in gaming to give the AI options in real time, it will use this technique to set as its current state which will be what mood or what action the AI chooses to make.

So for example lets use the game Assassins Creed, as the player character approaches the AI villain is this scenario, the AI character will see the player character as see him as a threat which will then using the state machine algorithm set the action for the AI, The AI will then go into an evade state where it could then choose to avoid or run away from the player character. The other option for the AI would be the attack state which is where the AI would then fight the player character.

(12)

Now from Bevilacqua's FSM you can see the basic fundamentals of how the algorithm works, this is the state machine for an AI character. Now the state machine can work in relation to a health bar, for example if the health bar gets below 60% for the AI then the AI would decide to hide or take cover to reduce the risk of taking more damage and reducing health. When the health bar drops again below a certain point, the AI would choose to run from the scene, this links in with the Fuzzy logic algorithm and this is where the state membership has a float range and not made up of 0 and 1's, I have refereed to Fuzzy logic in (4.2 Fuzzy Logic) part of my blog.

A state machine basically consists of a set number of states that are connected in a graph by the transitions between them. A game entity starts with an initial state and then looks out for the events and rules that will trigger a transition to another state. A game entity can only be in exactly one state at any given time.(12) 

To finish, I have inserted a quote from the book Unity AI Game Programming because for me it indicated the definition of FSM. What I mean by this is by looking at the game Pacman and the AI algorithm (1.1 Algorithms) involved in the ghosts AI, they wander the maze, chase Pacman when in attack mode, run away from Pacman when in the evade state and then return when the games complete. It looks at the current event before making its initial decision, then transits into a different state when called upon.

Thursday, 26 October 2017

4.2 Fuzzy Logic


Fuzzy Logic

Fuzzy logic algorithm is where the state membership has a float range and not made up of 0 and 1's, what I mean by this is the state is a number between the 0 and 1, so for example 0.5. You're probably thinking, what does this mean? Well to make it simpler, in a shooting game the AI as well as the player character will have a health bar, below is an example of Fuzzy logic...


From my example you can see the life of an AI character in a game, now "No Health 0%" is obviously when the AI character is dead. "Full Health 100%" is when the AI is at full health and had no damage to it, but that's not the segment we are interested in Fuzzy logic. What we are interested in is the AI's health bar at 67%, this is the in-between of 0 and 1.

Now the next part of Fuzzy logic is the actual reaction of the AI in the time of even the health bar drops below a certain point, Now the developer could then implement code so when the health bar drops below a certain point the AI character will flea the scene or attack. The AI use decision tree's (4.4 Decision Tree) to make it's next move, an example of this is shown below...


Now the decisions the AI will make is what to do at certain stages of the health bar, lets take the game Call of Duty: World at War as an example. The AI soldier enters the shooting scene with 100% health, once he gets shot his health bar will begin to decrease, now in my example above, when the AI hits 60% health then the AI soldier will retreat and take cover, find someplace to hide. Then if the attack continues on the AI and his health bar goes down to 10% or below, the reaction of the AI will be to run away from the shooting scene and out of range from the player character.

"enabling an AI opponent to assess threats and for classification, for example by ranking players and NPCs in terms of health or power using fuzzy variables"(10)

Pirovano makes the exact point that using Fuzzy logic, a game can separate a classification of AI. Ranking how good one AI is to another, in a game the boss of a level will be harder to defeat that a ground soldier in the game, this is also used to acknowledge the longer heath that the boss AI will have. It's a perfect example of Fuzzy logic and displays what the algorithm is all about.

Wednesday, 25 October 2017

4.3 Boids Flocking


Boids Flocking

Then boids algorithm also know as boids flocking, is an artificial life motion of how birds flock together and how fish swim in schools. "It was based on three dimensional computational geometry of the sort normally used in computer animation or computer aided design."(8) 
I have used a quote from Craig Reynolds who is the founder of boids flocking because here he mentions this technique is used in computer animation or computer aided design, well a good example of boids being used in a game is from this screen shot from Far Cry on PS4.


(9)
Now you can ask yourself what is the point of adding a large flock of birds randomly flying around, well to answer that question, first we need to talk about how boids work.








When it comes to boids flocking, the first segment of three is the alignment, alignment is the behaviour that will set an agent to line up with the other agents in the vicinity, for example if you have a fish swimming around on its own and is going into a different direction to the other fish, the the line fish joins the other fish, the alignment will correct the fish's path and align it with the rest of the fish in the flock so they are all facing in the same direction.

Next is cohesion, this behaviour will cause the agent (fish) to aim towards the middle of the flock (centre of mass), This is the centre of which is created by the radius of the flock. Finally is the separation, this is when the agent\fish will behave in away which will steer away from the others in the vicinity.

So now we have a basic understanding of how it works and the three main entities that make up boids flocking, we need to introduce why its used. Now the term "flocking" is used to mimic the movement of a flock of birds, its used in real world games such as Far Cry, Grand Theft Auto and Assassins Creed.

"Often in video games, nonplayer characters must move in cohesive groups rather than independently. Let’s consider some examples. Say you’re writing an online role-playing game, and just outside the main town is a meadow of sheep. Your sheep would appear more realistic if they were grazing in a flock rather than walking around aimlessly."(10) 

So Seemann and Bourg like to reflect that boids flocking is to make the game look more realistic for the user experience, yes they have mentioned its purpose but I feel its more that just a few sheep eating in a field. As a gamer myself, the ultimate high when playing a video game is to feel like your really in the game itself, to be drawn into that other world we wish we could live in. In a free roam world you may not be always be paying attention to the sky, but as you are walking down street in GTA, to catch a flock of birds in the corner of your eye flying in to and back out of the scene, really makes you feel like your really in the game.

Introduction to: NWC603COM – Using AI in Computer Games Assignment 1

Introduction to: NWC603COM – Using AI in Computer Games Assignment 1 Artificial intelligence (AI) in the gaming world today has become ...