Wednesday, April 16, 2014

Botting the way - 3Pi Intro (2)

Hey there!

Here's the followup to the 3pi blog.

Now, this assumes some familiarity with the development kit for 3pi.

Now, our 5 light sensors' values can be read (Using Arduino's C++ development kit) with the following function:

  unsigned int sensor_values[5];
  read_line_sensors(sensor_values,IR_EMITTERS_ON);

meaning sensor_values[0] holds the leftmost sensor's value. This is displayed as a number between -2000 (maximum reflection, or "all white") and 2000 (no reflection, or "all black"). With this, a super simple way of guiding our bot on the track is to place it anwhere on the track, and simply find out where it should turn. If it's a closed track and the line is not overly thick, what we do (in pseudocode) is:

position=0; //centered
for i in sensor_values
  position+=sensor_values[i];

What are we saying here? We're basically looking for position to be a rough reflection of wheter we are to the left (negative values) or to the right (positive values). In this supersimple version, we will just assume there are no conflicts (which there certainly WILL be!) on the track, and sensors provide fairilly accurate information. The idea now is simple (pseudocode):

if position < 0
 robot turns right
else if position = 0
 robot moves forward
else if position > 0
 robot turns left

How's this done on our little 3pi friend? It's simple. All we can set is the motor's speed. We have 2 motors: left and right. The robot doesn't know what "forward" means, but that's easy - both motors set to the same speed mean the robot moves forward*Or do they?!. Turn left simply means we set the RIGHT motor speed to something faster than the left's, and vice-versa.

To set so, the code is as follows (C++):

  int velocity_left=0;
  int velocity_right=30;
  OrangutanMotors::setSpeeds(velocity_left,velocity_right);

In this example we make our robot circle around itself with the left motor as the center.

Note that a 3pi's speed is expressed in a number between -255 and 255. Any higher/lower and they are set as if 255/-255 was given as input. This is not meters per second or any international system measure unit, so we can't correspond it to meters or inches. More on this later on.

* Nothing in real experiments is as sweet as it sounds during our planning, is it? Robots are physically more complex than we're assuming here for a variety of reasons. The basic one is that no two objects can be absolutelly equal in a real environment. Sure, we set both motor's speed to 20 in our code, but what if one of them has suffered harsher degradation for some reason? 20 on both speeds will NOT in fact make our bot go forwards, but form a weird angle. Fortunatelly, we can correct this through a method called callibration. This will be explained later on.

Saturday, April 5, 2014

Botting the way - 3Pi Intro (1)

Hey there! In a perhaps more definitive revival of our blog, I'm presenting my current project - or, more accuratelly, parts of it.

A simple 3pi, with no addons.

Having been working with a little robot "3pi", by pololu, I've decided to use one for a game. The idea is to create a somewhat sentient bot that can respond to a player's input. However, let us not get ahead of ourselves! First, the basics: programming a simple 3pi to perform a series of very simple tasks. First, we're looking at following a track consisting of black lines in a white space.

A 3pi with no extensions has 5 light sensors: They detect the amount of light being reflected. We're not yet able to sense anything like location (WHERE on a track am I? North, south?), accept our player's input (No wifi/bluetooth communication), or read images or sound (we lack cameras or sound input). We can, however, do the most important thing to start with: Moving!

With that in mind, our goal is to make a 3PI follow a black line in a white field. This is easier to avoid sensor errors, since those are poar opposites in terms of reflected light. The idea is simple: to guide our little friend through his journey!

We'll check how next time.

Sunday, June 16, 2013

To watch: Attack on Titan

This is the opening theme for it (All credit to TheHomumculiCurse for the vid)


 
Even fuller credit to Theshortfulone on another Attack on Titan video for the comment:
"The only thing I can hear in the first 15 seconds of the video were
I will have sex with the bees and the eagles
ha ha ha ha ha potato pizza
ha ha ha ha ha potato pizza"

Oh, misheard lyrics.

Shingeki no Kyojin (Attack on Titan) is an anime released this year. It's, on typical fashion, an adaptation of it's homonimous manga by Hajime Isayama.

In general, though mine is hardly the voice of deep experience, this show has an amazing production value. The animations are very fluid, well-done, and most characters are very well drawn. I could perhaps note (again, as a personal opinion, as I am unable to evaluate it in an experienced view) that minor characters are not particularly appealing design-wise. The soundtrack is powerful, especially the opening theme. It does support what is happening quite effectivelly, conveying the correct emotion for what's going on.

The plot, however, seems fenomenal thus far. I've refrained from reading the manga on purpose, to avoid losing interest in the anime, but from the brilliant debut (I cannot spoil, but the first episode is as far from calm as it gets, with very deep plot implications right off the bat) to the lastest episode, there seems to be little stopping to the flow.

In general, the plot is as follows: Humanity has been hit by a calamity known as the Titans, massive human-eating monstrosities bent on nothing but charging forward to anihilate every last one of us. Little to nothing is known about them. Humanity has been reduced to, essentially, a giant fortress surrounded by 3 walls; the deeper in, the higher society is, and the better the protection gets. A group of soldiers exit every now and than to attempt recon missions to actually find out exactly how they function. All that's been found thus far is that their weak spot is the back side of their necks; if that is not sliced down, they simply regenrate. To be able to beat them, a special suit is used to navigate through the air using terrain to one's advantage.
The main cast.

The main character, Eren Jaeger, is a young boy who enlists the soldiers. His sidekicks, Mikasa and Armin, do so as well. They eventually will go up against the mighty Titans in humanity's desperate struggle.
I'm doing my best to avoid spoiling, as it is quite the complex world, and episode 1 is the kind of episode that usually turns up very close to the end of a series, but this is the gist of it.
Overall, the side-characters are the show's weakest point so far (which is episode 11 on the anime).
They do have some degree of personality, but not really all that much. This might change as the story progresses, though I actually do not seem to be bothered by this all that much. The general world created is interesting enough that I rather see how it develops than focus on the side stories of some no-name ranks. The main characters, however, are very strongly developped from episode 1 and keep this strength very powerfully throughout.

An interesting world, interesting main cast, and constant living on the edge cliffhangers keep interest rates very high. The general brutallity of the scenes is also quite high.


We'll see how it develops, since this strong start surelly seems quite the setting.

Saturday, June 15, 2013

Game Review - Hero's Academy

By Robot Entertainment comes Hero Academy, a strategy much akin to Chess, with quite the spell/turn based twist.

This will be a first impression, not a full review, as this game is multiplayer based, requiring quite some time to fully appreciate (more on that later on).

http://www.robotentertainment.com/games/heroacademy

http://store.steampowered.com/app/209270/

Summary

It's showtime!
Hero academy is played on a 5x9 grid. From one of 6 teams - that is, should you have the full DLC, as the base teams are only 2 - each with a number of units and items, you're given 6 at random from your "deck" and 5 action points. Every action costs a point unless your unit's special ability dictates that it doesn't (including using items, deploying units, switching items and EACH attack your unit does). You're given a full simulation environment. As this game is turn based, whatever action you do WILL have that exact outcome once you submit your play. Before submiting, you can try whatever combination you wish, undo action points, move however you please, and plan item swaps. Once submitted, you'll have to wait for your opponent's submission. Your opponent will now see the same board you do, at least before (s)he starts taking action.
The goal is to knock out the enemy's crystals on the field, which are high health, no defense, non-healable or controllable structures placed randomly on your half of the field.

There is very, very limited single player experience. You get to try out all teams, but only on challenge mode (You're presented with a board and premade hands, and are given a single turn to either finish the enemy crystal or all enemy heroes), and you have a tutorial, but absolutelly nothing else. In fact, if single player is your goal, 5€ (the current Steam cost) for this game is horrendously overpriced (and all DLC is useless, you have challenges for all teams regardless).

The game is available on iOS and PC. The focus, however, seems to clearly be the iOS version (the original, the PC was a port).


Gameplay

Single Player


Challenges for the Council team


What single player?
Well, jokes aside, Steam's tag of single player in this game is actually not the best placement. You cannot play against the computer a full game, and all you have is challenges, which are all single-turn-wins with 1 or 2 possible combinations that work. If you don't want multiplayer, 5€ for this is just throwing money out of the window. As Single is non-existant, there just isn't much to say about it.

The challenges are quite effective in highlighting the strengths and weaknesses of each team and each map, but as a stepping point to the multiplayer game, it mostly doesn't teach you to think predictivelly, as only 1 turn is played. That has to be self-taught.




Multi Player
What close to the end of a game looks like

This is where we can actually talk about gameplay, since it's actually where a full game can be played.

You start with 6 random pieces from your deck. You're given 5 action points. Action points are spent with each action: deploying a unit, moving a unit, using an item, attacking (each attack is an action point spent). Each team has a set of units. Each unit has a number of stats:
  • Movement (number of squares it can move in a single action), 
  • Attack Range (how many squares away your unit can attack), 
  • Damage (how many points a single attack inflicts), 
  • Physical Resistance (a percentage that reduces incoming physical damage)
  • Magical Resistance (Equivalent to physical resistance, but for magic damage).
  • Health (hit points).
Each unit has a special power, but the game's descriptions aren't enough without trying it out.The Cleric for council, for example, reads "Spellcaster who revives and heals allies." That doesn't give us numbers, and reviving a character with 20 health and 1000 health is quite different. This comes back to the lack of a single player mode; this things need to be tested on the fly, which is not exactly good with 6 different teams. Another example, the wiki for hero academy states on the Priestess:
"Can heal 3 tiles away. Heals for 2x Power and revives for half Power. Any unit attacked by the Priestess has their Power cut in half for their next attack."
However, in-game, it reads "Can heal up to 3 tiles away, and weakens enemy attacks." I wasn't even sure if the priestess COULD revive with that description, since the cleric clearly states "revives and heals" allies. This inconsistencies make playing the first games a huge gamble that a lack of single-player mode only makes worse. This obviously isn't that troublesome in a turn based scenario, but it still adds unneeded complexity.

Each team has a team bonus. The Council (which I find a bit uninspired) provides better healing from Clerics and Potions. Frankly, they could have simply tuned the numbers on said items/caharcters, it isn't much of a "team" bonus (even if it makes sense from a balance perspective). The Dark Elves, for instance, heal every time they attack - with any unit.

The goal is to take down the crystals on the map or exhaust the enemy of units. Each player does 5 actions, submittting when they decide on their final setup, and testing whichever play they wish.

This is where the iOS focus really shows. The limit to executing a play and submitting is seven DAYS. Yes, DAYS. The typical session of Hero Academy is to enter 15+ games, execute plays when they pop, and leave. You rarelly find a game where both players are actually on it, and there is very little incentive for that - even the chat function is timed this way, the chat updates only on submitting your play, it's not real time. If you wish to go in and spend an hour or two playing a couple of games, you'd better bring your real life or steam friends, because you cannot trust random players to net you an actual full game.


Presentation

Info on the Dark Elves (in-game)


The very cartoonish style for the characters works fairilly, though it's not really my taste. The interface is a bit hectic; for instance, the screen above with those detailed descriptions cannot be seen outside of a multiplayer game. I've had a bit of trouble setting up a game with a friend, but that might've been because of my shaky connection at the time. The chat not being real time is actually really annoying if you're not playing with a Steam friend. The animations for the characters are also decent.
The sounds are OK; the loop can get on your nerves eventually if you keep there waiting for people to finish their plays, but you really shouldn't be doing so with Hero Academy at all.


Verdict

Overall, Hero Academy is a little to based on it's community. The lack of real single player dictates so. If you're looking for an experience to play a few hours, forget it. Hero Academy could be a concept for a pretty fun and competitive game, but as it stands, it's a casual title; a good one at that, don't get me wrong, I simply think that there's a lot of wasted potential on the casual approach that the interface forces you on. Lack of co-op (and it mostly wouldn't make sense... Co-Op Chess?) means that the incntive to buy it with your friends isn't all that appealing either. However, during a steam sale (the way I picked mine, 1.75€ for 2 copies), it certainly is worth a shot, and if you have a group of friends that would enjoy a fairilly competitive setting (again, rely on arranged matches for actual playing sessions, do not bother with randoms unless you want the casual approach), this is a thing to consider.

Revival / Birth

Well, though the blog's been dead, that's about to change. I'll start now "for real"; as there is very little sense in continuing with the old content, I'll focus on new random stuff, hopefully fairilly more up to date.

I swear the name of this topic sounds like an episode from an anime...

Monday, June 4, 2012

Sinful, time-consuming, worthy.

Well, time flies by, and this project has been on the background, but not forgotten.

Now with some breathing time (to vary), here's a new article.

This one's about Sins of a Solar Empire, a 4X game (Explore, Expand, Exploit, Exterminate).

Right now, Rebellion - an expansion that works as a standalone, containing the 3 previous Sins games and a lot of extras - is on it's last Beta days. I'll likelly do a full review later, since a beta is just that - not finished - but it does cover quite a lot already.


What is Sins?

One thing can be said right of the bat  it's not for the faint of heart. A battle on the really big maps can take LONG, LONG, LONG times - in the 2 digit hours range - and even though the AI is questionable in skill (unless in some trully hardcore situations you can create, such as the highest difficulty setting on a really small map), you can't just jump the game, play a match on Easy and come victorious with a couple of random luck shots. There is a hell of a lot of things to keep track of.

But first things first. You start a game with a planet to call home, a couple of light frigates, and - depending on settings - a Capital ship factory ready to deploy a free-of-cost Capital ship. You have a star system -or more, if so you choose on the vast amount of maps available (and you can create your own) filled with colonizable planets. It's your job to conquer the universe... by decimating the other factions looking for the same goals. Colonizing planets will earn you extra income (Credits, Metal and Crystal, with Crystal and Metal coming from Extractors, which have to be built on the appropriate asteroids, usually close to a colonizable planet). Planets come with Gravity Wells, or the planet's "area", where you can control everything - where your fleet moves, where you place stationary defenses. Between Gravity Wells, the areas are unacessible. Your ships travel through them by phase jumping, but you cannot control them while they phase jump.

The various types of ships you can build range from powerhouses (Capital Ships) to small frigates. Each has quite specific purposes; some scout areas and decloak explosive mines, some have planetary bombardment weapons, some speciallize in Strike Craft nullification or deployment, the list goes on. Learning how to use them is crucial. Rebellion introduced Titans as well - this ships are beyond Capital Ships in powerhouse level, and can eradicate entire fleets - some can do so in practically one ability use!

Capital Ships and Titans level up to get better skills and stats.

Most important of all, though, is Research. You don't start the game with access to anywhere near all your arsenal; you start with one capital, scout units, light units and colonizing units. Through research, you gain access to a brutal set of extra options - from diplomacy related Pacts you can form with your allies to improved economy or ship damage.

This tools aren't even standardized, because there are three factions - the TEC, Vasari and Advent, each with their unique traits. Sure, many researches have equivalents between them, but knowing the differences is crucial to success.

This overwhelming number of details is nowhere near how complex the game really is. The way ships complement and counter each other, Artifacts, Pirates, Culture... there's a lot to go through.

Gameplay

The gameplay is smooth. The UI is pretty detailed and simple - though I seriously miss a (in my opinion) key option to do a required research directly from the item I'm selecting if I haven't researched it yet. The hassle of having to look through the extensive research lists - especially if i'm trying a new race - is just unnecesary. But everything is in their place. The camera is pretty well done, and allows you to admire the graphics at will, while not being annoying to control. It's easy to quickly switch from ship to ship, planet to planet. Sometimes, the way the UI keeps trying to switch my focus to another ship in combat is annoying though - I'm about to click my capital, and by accident I click whatever just got changed there. I would prefer if my current target got instantly at the top and the targets needing focus just got right below.

The fleet fights are fantastic. It's easy to control with some getting used to the key shortcuts, and abilities are easy to aim. Some stuttering can happen if fleets are massivelly big with huge maps, though.




For now, I'll keep on playing to provide a few screenshots - because the graphics to this game are quite beautiful to watch, but it does take a fairilly long game to access all the shiny goodness.

Tuesday, August 2, 2011

Frozen Synapse

Frozen Synapse is a tactical turn-based strategy game, in which you control some kind of cybernetic soldiers squads, which basicaly have an empty brain and obey every command you give them.
Because of this, you have to give them all the commands and orders that they have to do, such as movement, aim, ignoring enemies in sight, focus enemies, duck, etc.
Each mission can have various objectives such as defending units, killing all the enemies, defending areas, killing certain units, escort missions, etc.
There are 5 types of units in the game:

Machine gun unit:

Shotgun unit:

Sniper unit:

Rocket launcher unit:

Granade launcher unit:


These units have their own unique advantages and utilities, and it's up to you to use them to your own advantage, but it's the standard weaponry advantages. If you are already familiar with them, you should know already these:

- Machine gun specs:
These units are the standard unit used throughout the game, they are good at mid range, decent at close range and very weak at long range. They can fire multiple shots at once and, thus, are good at handling a few units at the same time. But because of their rapid fire, it takes a while for them to get a shot with accuracy. Correct positioning improves their hitting chance.


- Shotgun unit specs:
These units are excellent at close range, an excelent unit to camp in a corner and shoot everything that comes in front of him. With this huge advantage at close range, they're unable to shoot anything at mid and long range.

Sniper unit:

These units are extremely good at taking out targets at long range, but because of this they take a long time to aim and fire which makes them practically hopeless against targets at close range and against well covered mid range targets.


Rocket launcher unit:

These guys are excelent at blowing the enemies out of their covers, and their hits have a huge area of damage. The problem with them is that each shot takes a long time to recharge (practically one shot per turn) and you need a wall or an object to trigger the explosion. Yes, direct hits on units don't make the rocket explode.

Grenade launcher unit:

These guys are like the rocket launchers but with quite some diferences. They don't destroy walls or objects, you can easily send a grenade bouncing around without making any direct contact with the enemy:

They have the same area of damage capabilites as the rocket launcher, and the explosion is triggered by a certain time passed. No walls are required, making it a little harder to hit with compared to the rocket launcher, although it's a much safer and more controlled explosion then the rocket launcher.


In each game using the available terrain is the key to success, either taking cover in walls to pass by the enemy, using light cover to get a slight advantage at taking out the enemy:

























Or even ducking in sizable objects to avoid enemy fire:



The most interesting feature of this strategy game is the ability to be able to give orders, to than simulate the enemy units' movement and actions to try and see the outcomes of your choices and maybe predict your enemy's moves, but since you can give various diferent orders of movements, aims, etc. you can't always predict what will happen.



The game has multiplayer, score boards and you can play multiple games at the same time with your own pace since it's a turn based game you don't need to be always online to give orders to your units.