00:00
00:00
HeroPower
Been teaching myself programming since the start of 2014. Making simple games for now but as my knowledge grows so will my projects!

Age 37, Male

Indie Game Dev

Oregon

Joined on 12/13/05

Level:
25
Exp Points:
6,770 / 6,940
Exp Rank:
6,119
Vote Power:
6.69 votes
Art Scouts
3
Rank:
Police Officer
Global Rank:
10,929
Blams:
326
Saves:
533
B/P Bonus:
10%
Whistle:
Normal
Trophies:
1
Medals:
579
Supporter:
2y 2d

Now Single Player!

Posted by HeroPower - February 6th, 2014


So in my previous post I mentioned how I wasn't sure if I wanted to release my current game as just a Player vs Player game. Afterall, most people who play Flash games online are 99% of the time expecting it to be a solo experience - and if it were a multiplayer experience I doubt they were expecting the kind of multiplayer game where you share the keyboard. I figured if I did that it would just end up being someone sitting alone at their keyboard controlling both players which defeats the point and is essentially you just playing with yourself XD. The only reason I considered doing this was because 1. I am still learning AS3 and wasn't sure I could figure out how to code the AI for the game and 2. I have very fond memories of playing 2 player flash games (shared keyboard) with my brother when I was younger.

Well guess what?! That's right you don't have to guess because odds are you read the tilte of the post. Yup, after a week and a half of reworking my game I have successful implemented AI into my game. So now players can choose to play against the AI or a friend locally. I'm proud of myself for this accomplishment. It may be a small one in the grand scheme of all things programming-wise, but it took me non-stop work for the past week and a half to get it to work in my game. I'm about 2 weeks out from finishing the game, but after all the mind-twisting work I spent learning to add AI into the game I feel the rest will be a breeze.

1417677_139168747853_single_player.jpg


Comments

AI is a big problem, because it's really easy to write shitty AI and very difficult and time-consuming to write a good one.
There are also special techniques and methods of programming an AI. For example, in chess there's a method which evaluates positions and generates and new position to evaluate after every move, and tries to make the move leading to the most profitable position. I like to use randomly behaving AI, it adds plenty of variation and makes it more interesting.