GDR Forum Index
Podcast Podcast
Dev Dev Logs
Search Search
RSS RSS
Register Register
Log in Log in
Reply to topic GDR Forum Index -> Game Developer's Refuge -> Development Log - Inimicus Page 1, 2, 3 ... 15, 16, 17  Next
View previous topic :: View next topic  
Author Message
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9442
Location: Not Finland
PostPosted: Wed Nov 25, 2009 6:46 am    Post subject: Development Log - Inimicus Reply with quote

I may as well start a dev log for this project, since it's taking longer than I expected to finish.

I've completed all autonomous activities for units, which turned out to be a significant portion of the code base. I made things a lot harder than they needed to be, all for the sake of making the game play how I wanted it to. It would have been easier to let the player select units and move them around, but from the very start I decided that was a no-go. So, there was a lot of debugging and planning put into making everything move around at once, making sure that ships didn't try to occupy the same space, or chase something absurdly far away when something better was nearer, and general prioritization of targets. The little things add up -- another important lesson learned. It all sounds very simple, but when you break your AI logic into functional components (as I did) making a change can have far-reaching effects that are not always immediately visible. So, you can fix something, which happens to break something entirely different... and only notice it a week later, when it is no longer obvious what you did to cause the problem!

That is, praise Jeebus, all in the past. I can move on to more exciting things. I have new stuff to screw up!

From here I have to move over to the CPU player, which is the last major component I need to code. Everything else is done aside from content creation, and most of that is done as well. I have a plan for the CPU that I have laid out in a previous post, and it seems pretty straightforward. I don't foresee any great technical hurdles or testing quagmires in my future, as the logic path should be very easy to log and trace in the event that something goes horribly wrong, or the CPU goes and does something outright boneheaded. Ideally this would be played with a second player, but as that is not always possible (or even reasonable) I need a CPU player that can put up a decent fight. This will be a good warm-up for finishing the enemy AI in FB:Cry Havoc.



Don't mind me, just playing around the the land creating tool.
View user's profile Send private message Visit poster's website
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9442
Location: Not Finland
PostPosted: Wed Nov 25, 2009 3:02 pm    Post subject: Reply with quote

Going through menus right now and disabling options contextually while playing. So, for example, if an outpost doesn't have any targets to intercept, that option will be colored differently to indicate a problem.

Little things... heh. So many of them.
View user's profile Send private message Visit poster's website
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9442
Location: Not Finland
PostPosted: Sat Nov 28, 2009 11:03 am    Post subject: Reply with quote



Serious testing is serious.
View user's profile Send private message Visit poster's website
0xDB
Developer

Joined: 26 Dec 2005
Posts: 1655
Location: Your consciousness.
PostPosted: Sat Nov 28, 2009 11:15 am    Post subject: Reply with quote

What do we see being tested in that screenshot?

Do you use any automated unit tests or do you write up test scenarios and then manually test everything through?
_________________
0xDB
View user's profile Send private message Visit poster's website
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9442
Location: Not Finland
PostPosted: Sat Nov 28, 2009 11:59 am    Post subject: Reply with quote

In this case I'm doing a large-scale test on the scout ship AI. It needs to be able to demonstrate several things at this point:

- Locating a target based on available resource levels and distance from the ship.
- Path finding that is efficient and avoids known hazards.
- Ships move simultaneously; they can pass through each other but not occupy the same space.
- Ships can't share a target. If a salvage pile or fish school is already being harvested, look elsewhere.
- Ships try to stay on their 'side' of the map, but will go where the resources are.
- Ships must occasionally stop to look for salvage. This happens automatically.
- if a ship doesn't have a target, it randomly trolls the map until something turns up.
- Ships are allowed to be a little "stupid" (they are drunken sailors, after all) but not seriously stupid. This is subjective, but I keep an eye out for it, in general.


As for testing, I just jump into the program and start dropping in objects and land, then let the scenario run its course. Land is randomly generated at the start of a game, so I use hotkeys or the console to quickly set up what I want. Since the player is only responsible for setting up buildings, keeping things repaired, and deploying units, everything else works on autopilot. In this case, with twenty ships on screen there's plenty going on each round without my help ;)
View user's profile Send private message Visit poster's website
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9442
Location: Not Finland
PostPosted: Sat Nov 28, 2009 4:24 pm    Post subject: Reply with quote



Nothing special. Just a good session I've got going.
View user's profile Send private message Visit poster's website
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9442
Location: Not Finland
PostPosted: Sat Nov 28, 2009 6:41 pm    Post subject: Reply with quote



The truth hurts.
View user's profile Send private message Visit poster's website
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9442
Location: Not Finland
PostPosted: Tue Dec 01, 2009 10:04 am    Post subject: Reply with quote



I'm working on putting in some unit tooltips. The appearance will be different from a regular speech bubble (the image above is WIP) so as not to cause confusion. I may add in a fourth line detailing what the unit is doing. In the above case we're dealing with a building, so it technically doesn't 'do' anything ;)
View user's profile Send private message Visit poster's website
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9442
Location: Not Finland
PostPosted: Tue Dec 01, 2009 5:24 pm    Post subject: Reply with quote



I think I'm leaning more toward this, for now.
View user's profile Send private message Visit poster's website
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10862
Location: Canadia
PostPosted: Tue Dec 01, 2009 8:05 pm    Post subject: Reply with quote

I approve. :)
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
BadMrBox
Developer

Joined: 12 Jun 2006
Posts: 1203
Location: Beyond return
PostPosted: Wed Dec 02, 2009 5:39 am    Post subject: Reply with quote

Looks good :).
_________________
My Blog | I take steroids for my bad knee. Now I can kick a smart car across the Walmart parking lot![/size]
View user's profile Send private message Visit poster's website MSN Messenger
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10862
Location: Canadia
PostPosted: Wed Dec 02, 2009 8:47 am    Post subject: Reply with quote

An art suggestion.

I think I've already told you I adore the look of your buildings and stuff. The flat iconic 1-2 color look, great.

The pillow shading of the shore line and clouds though kinda looks out of place to me though. Everything else is drawn in a pseudo side perspective, yet we're catching the shading on both sides of the shore (as in looking straight down). My suggestion is to show shading only along the bottom. I've included a mockup tweak of the image above.



More or less what I've done is filled in with the solid color the shading areas you wouldn't see from the mentioned perspective. Then any bottom patches that have too much of a dark line, I'd fill in a pixel to round it out (exposing some ground color to the bottom of shore). The mockup is quick and rough so it may not be perfect, but it should get the idea across.

Anyways, it's just a thought.
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9442
Location: Not Finland
PostPosted: Wed Dec 02, 2009 10:08 am    Post subject: Reply with quote

My initial idea was a totally flat presentation for everything, but things got a little more complicated as stuff got thrown in (balloons, for example). I still imagine the world as being flat, which is why I've never considered doing the shading that way. I'm not sure what to think about that approach -- I'll have to take a closer look at it this evening.

I still have some things I want to change slightly. The houses look a little too modern, for starters. I also wouldn't mind having the flag on the outpost wave.
View user's profile Send private message Visit poster's website
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9442
Location: Not Finland
PostPosted: Tue Dec 08, 2009 4:27 pm    Post subject: Reply with quote

I'll get back to the land presentation later. Still considering the approach PoV has illustrated.

Time to work on computer player AI for now. For the purposes of my continued rambling I should just call this "enemy AI" as it's shorter and rolls off the tongue easier. I've been carefully considering my approach to this, and believe I have managed to break it (by "it" I mean the decision making process that will occur each round) down into five supposedly manageable steps.

In order:

1. Data collection

This involves gathering a large assortment of nearly raw data and stuffing it in a container in an organized and lightly streamlined fashion. Things like production ratios, resource levels, offensive to defensive access, undeveloped land, etc, get tucked away so we can study the situation. At this point I'm trying to get the enemy AI to "see" everything that I would normally consider important when making decisions. We can do simple calculations to produce things like ratios, but nothing particularly heavy.


2. Situation assessment

This is the start of the heavy stuff. By taking the data collected in step 1 and carefully analyzing it, we can develop a picture of how the AI's island is doing. If we've done a good job of storing and breaking down the data in the first step, this may be little more than a vast pile of if (X) and (Y), then (Z) type statements. The trick here will be making sure you have enough data to get at all the side cases that may otherwise escape your detection. Thinking this through as if I were playing the game blindfolded using only the data I've collected in step 1 is a great exercise for making sure this step and the one above are as complete as possible.


3. Determining a course of action

Based on the results of step 2, and taking into account the enemy AI's current priority as well as innate disposition, it shouldn't be a huge leap to come up with at least three potential courses of action. The AI should pick one of these three actions, randomly chosen with decreasing likelihood of selection. In other words, 70% of the time action #1 will be chosen, 20% of the time it'll go for action #2, and 10% will swing for action #3. I like randomosity -- besides, it's not unusual for opponents to surprise you from time to time. I like not having an element of absolute certainty in the enemy AI. It is entirely possible that I will run the situational analysis routines twice: once for each player, so the enemy AI may have access to both sets of data, and potentially an opportunity to pinpoint weaknesses in the other player's situation. For example, if the enemy AI "sees" that the other island is suffering from a food shortage, it may choose to sabotage their crops, or launch more scouts to minimize their access to seafood.


4. Changing strategy as needed

The AI won't be worth a damn unless it can adapt to changing situations within the game. It has to be able to shift between offensive, defensive, resource collecting, and island building strategies on a turn by turn basis. Of course, this will also be subject to the AI's disposition and current priority. Some things can change in a single turn, others need more time to prepare. Some AI will tune their strategy each round, and others will take a more measured approach and wait for things to blow over before taking serious action. This should prove to be a very interesting bit of programming for me, along with the next section.


5. Proactive measures

I haven't really thought about this much. This step is the difference between a totally reactive AI, and an enemy that can be significantly more dangerous through the use of proactive and well as reactive measures. What's that saying about an ounce of prevention? Yep. The AI needs to be able to look for weaknesses or deficiencies in its overall situation and take immediate action to set things straight. Occasionally this may involve launching sneak attacks to keep the other player occupied while it shores up its defenses, or repairing damage to critical buildings. This step will either be easy, or cause me some headaches. I'll most likely be in a better position to judge this when I start on step 4.


As of right now I'm through with step 1, and have finished most of step 2. I still need to do more analysis of the data I've exposed to the AI so I can hit step 3 with a myriad assortment of status updates. I feel like I have a great start on the enemy AI and I'm confident this will turn out well using this particular approach. Eventually I'd like to be able to assign two AIs to the two players and watch them battle each other. That might be... amusing ;)
View user's profile Send private message Visit poster's website
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9442
Location: Not Finland
PostPosted: Wed Dec 09, 2009 6:59 pm    Post subject: Reply with quote

Taking a short diversion to work on the status display page. It's technically related since it uses the code from step 1 of the above post, which is awfully convenient. Nothing to show just yet, but I should have an amusing screen to show off in a day or so. The day job is really taxing my ass these days, so it's getting harder to come home and continue coding.
View user's profile Send private message Visit poster's website
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9442
Location: Not Finland
PostPosted: Thu Dec 10, 2009 7:04 pm    Post subject: Reply with quote



It's good to know where you stand. Hit up the shrine(s) for a quick peek at your island's status. Still sorta WIP, but that's what the status display will look like, more or less.
View user's profile Send private message Visit poster's website
Gil
Developer

Joined: 14 Nov 2005
Posts: 2341
Location: Belgium
PostPosted: Fri Dec 11, 2009 6:43 am    Post subject: Reply with quote

B for Bitchin?
A for Awesome I assume? :)
C for Can do better

M for Meh, find something else to waste your time on
_________________
PoV: I had to wear pants today. Fo shame!
View user's profile Send private message Visit poster's website
sonrisu
Moderator

Joined: 31 Aug 2005
Posts: 4989
Location: Silicon Valley!
PostPosted: Fri Dec 11, 2009 1:15 pm    Post subject: Reply with quote

Hah! Looks awesome. Make sure if the range is like a grade (A, B, C, D, F) that you have S class. All the sweet games are doing that these days.
_________________
loomsoft :]
View user's profile Send private message Visit poster's website
PoV
Moderator

Joined: 21 Aug 2005
Posts: 10862
Location: Canadia
PostPosted: Fri Dec 11, 2009 2:31 pm    Post subject: Reply with quote

A = Amcredible
_________________
Mike Kasprzak
'eh whatever. I used to make AAA and Indie games | Ludum Dare | Blog | Tweetar
View user's profile Send private message
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9442
Location: Not Finland
PostPosted: Sat Dec 12, 2009 3:48 pm    Post subject: Reply with quote

Getting some good work done today. Fixing a couple of oversights, and completing a bunch of stuff that has been almost-but-not-quite finished for far too long.
View user's profile Send private message Visit poster's website
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9442
Location: Not Finland
PostPosted: Tue Dec 15, 2009 7:49 am    Post subject: Reply with quote

I'm at the point where I can get in some play sessions of decent length without interruption, so I'm finally getting to catch some of the rare occurrences that would normally never crop up. Hence, the swath of bugs and minor additions that have been occupying my time since Sunday.

The game is largely automated except for occasional user input (that's not to say the game "plays itself") so there are numerous opportunities for things to have timing issues, or situations where sequences of events are delayed or otherwise inerrupted. For example, last night I ran into a situation where a pirate vessel was in the process of being sunk by an outpost, when it took off toward a scout vessel while in the midst of sinking ;) It was easily fixed, but I didn't expect that to happen, and never saw it until I got deep into a test session.

If I had made the game strictly turn based, forced things to happen sequentially instead of simultaneously, and made the player move individual units around the map, I would have been finished many months ago. As usual, I chose the path of greatest resistance. In my defense, it does look really slick when things are operating as they should... heh :)
View user's profile Send private message Visit poster's website
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9442
Location: Not Finland
PostPosted: Thu Dec 17, 2009 10:08 am    Post subject: Reply with quote

I'm adding a detailed help index to the game, which will clearly lay out the various units, events, and activities that one will encounter during the course of a game session. The game turned out significantly more complicated than I originally envisioned. Whoops :)
View user's profile Send private message Visit poster's website
Gil
Developer

Joined: 14 Nov 2005
Posts: 2341
Location: Belgium
PostPosted: Thu Dec 17, 2009 10:49 am    Post subject: Reply with quote

As long as it's moving towards completion at the rate it's going now, I guess you shouldn't worry.

Maybe you should try to finish it into a playable state right now, then do any further adjustments. That way, if you get a bad case of feature creep, you can let go and release what you have.
_________________
PoV: I had to wear pants today. Fo shame!
View user's profile Send private message Visit poster's website
Sirocco
Moderator

Joined: 19 Aug 2005
Posts: 9442
Location: Not Finland
PostPosted: Thu Dec 17, 2009 12:17 pm    Post subject: Reply with quote

Feature creep actually hasn't been a problem with this project. I did run into a few unexpected time sinks in the form of automating player units, and I decided to introduce a very limited set of new features ~50% of the way through development.

Yet the game's overall complexity has far exceeded what I imagined. Originally I expected it to be a very simple game that could be picked up by a player in a few minutes with the help of a few tooltips. Alas, this was not the case. So I countered with a simple help system. This just wasn't informative enough, so I've gone back to the drawing board. It's late enough in the development cycle to safely write the help section. Things aren't going to change much at this point.
View user's profile Send private message Visit poster's website
Gil
Developer

Joined: 14 Nov 2005
Posts: 2341
Location: Belgium
PostPosted: Fri Dec 18, 2009 1:30 pm    Post subject: Reply with quote

Sirocco wrote:
Feature creep actually hasn't been a problem with this project.


Yeah, I noticed. I was just warning about future feature creep ;). Try to finish it while you're ahead and all. Biggest programmer mistake tends to be: spend 10% of your time getting the project 90% ready, then spend 90% of your remaining time finishing the last 10%.
_________________
PoV: I had to wear pants today. Fo shame!
View user's profile Send private message Visit poster's website
Reply to topic GDR Forum Index -> Game Developer's Refuge -> Development Log - Inimicus Page 1, 2, 3 ... 15, 16, 17  Next

Use this link to get a Sign-On Bonus when you get started!

All trademarks and copyrights on this page are owned by their respective owners. All comments owned by their respective posters.
phpBB code © 2001, 2005 phpBB Group. Other message board code © Kevin Reems.