Author Topic: Keith Appreciation Thread  (Read 7619 times)

Offline LaughingThesaurus

  • Master Member Mark II
  • *****
  • Posts: 1,723
Re: Keith Appreciation Thread
« Reply #30 on: December 04, 2012, 10:22:31 am »
I got bored and decided to up the ante.

Looks better here -> http://pastebin.com/sgYzrxmW

Syntax highlighting ftw.  And yes, this code will compile and run.

Code: [Select]
package arcen;

import java.util.Random;

/**
 * @author Pluto
 */
public class ArcenGames {
   
    public static void main(String[] args) {
        //Ahoy a company!
        ArcenGames ag = new ArcenGames();
    }
   
    //Global random generator, never know what you find when you get out.
    Random r = new Random();

    ArcenGames() {
        for (Game g : Game.values()) {
            Keith keith = new Keith(r);
            for (int hour = 9; hour < 17; hour++) {
                switch (g) {
                    case AI_WAR:
                        if (!g.getGameKilled()) {
                            AIWar a = new AIWar();
                            int weight = r.nextInt(100);
                            if (weight > 80) {
                                keith.addPain(a);
                            } else if (weight <= 80 && weight > 5) {
                                keith.fixBugs(a);
                            } else if (weight <= 5 && weight > 0) {
                                keith.addToExpansion(a);
                            } else  if (weight == 0 ){
                                //He killed it.
                                g.setGameKilled(true);
                                close();
                            } else {
                                //Keith wins the powerball and runs away.
                                close();
                            }
                        }
                        break;
                    case A_VALLEY_WITHOUT_WIND:
                        if (!g.getGameKilled()) {
                            keith.idunknowwhatthisgamereallyis(10);
                        }
                        break;
                    case TIDALIS:
                        if (!g.getGameKilled()) {
                            keith.ialsodontknowwhatsinthisgame();
                        }
                        break;
                }
            }
        }
    }

    private void close() {
        Runtime.getRuntime().exit(0);
    }
}

//Arcen's games.
class Keith {

    //Keith is a person.  Person's have health.  Some people are healthy.  Some people are not.
    double health;
    //Keith has feelings!  Though sometimes I wonder...
    double feelings;
    //Keith is fickle.  Very very fickle.
    double fickleness;
    //Keith has a work load. This is part of having a job.
    double workLoad;
    Random r;

    Keith(Random r) {
        health = r.nextDouble();
        feelings = r.nextDouble();
        fickleness = r.nextDouble();
        workLoad = r.nextDouble();
        this.r = r;
    }

    double getHealth() {
        return health;
    }

    double getFeelings() {
        return feelings;
    }

    double getFickleness() {
        return fickleness;
    }

    double getWorkLoad() {
        return workLoad;
    }

    /**
     * This should be self explanatory.
     */
    void idunknowwhatthisgamereallyis(int i) {
        //umm, what?
        throw new UnsupportedOperationException("Not yet implemented");
    }

    /**
     * This should also be self explanatory.
     */
    void ialsodontknowwhatsinthisgame() {
        //yeah, above.
        throw new UnsupportedOperationException("Not yet implemented");
    }

    /**
     * Keith adds something to make AI War more painful.
     *
     * @param a
     */
    void addPain(AIWar a) {
        if (this.works()) {
            //No limit in the pain threshold.
            a.setPainThreshold(a.getPainThreshold() + 1);
        }
    }

    /**
     * Keith fixes bugs inherent in AI war.
     *
     * @param a
     */
    void fixBugs(AIWar a) {
        if (this.works()) {
            //Constantly fix bugs.
            if (a.getNumBugs() > 0) {
                a.setNumBugs(a.getNumBugs() - 1);
            } else {
                //...  but if they all get fixed, inevitably more have creeped in.
                a.setNumBugs(7);
            }
        }
    }

    /**
     * Keith adds to the expansion progress of AI war.
     *
     * @param a
     */
    void addToExpansion(AIWar a) {
        if (this.works()) {
            //Still working towards the next expansion!
            if (a.getExpansionProgress() < 100) {
                a.setExpansionProgress(a.getExpansionProgress() + 1);
            } else {
                //And if it's finished, there's always a new one to start.
                a.setExpansionProgress(0);
            }
        }
    }

    /**
     * Simple determination of whether Keith gets work done.
     *
     * @return Whether Keith works.
     */
    private boolean works() {
        if (workLoad <= .4) {
            //Keith got lazy and procrastinated as he thought he didn't have much to do.
            workLoad += .1;
            return false;
        }
        if (feelings <= .2) {
            //Keith is in too bad of a mood to work.
            //But, the mood goes up slowly.
            feelings += .1;
            return false;
        }
        if (health <= .5) {
            //Keith is not feeling well.  He takes a trip around go.
            health += .2;
            return false;
        }
        if (fickleness >= .5) {
            //Keith feels fickle.  He goes swimming with Old Greg.
            fickleness -= .1;
            return false;
        }

        //Keith does work!
        workLoad -= .02;
        feelings -= .02;
        health -= .02;
        fickleness += .02;
        return true;
    }
}

class AIWar extends ArcenGames {

    int painThreshold = 75;
    int numBugs = 7;
    int expansionProgress = 25;

    public int getExpansionProgress() {
        return expansionProgress;
    }

    public void setExpansionProgress(int expansionProgress) {
        this.expansionProgress = expansionProgress;
    }

    public int getNumBugs() {
        return numBugs;
    }

    public void setNumBugs(int numBugs) {
        this.numBugs = numBugs;
    }

    public int getPainThreshold() {
        return painThreshold;
    }

    public void setPainThreshold(int painThreshold) {
        this.painThreshold = painThreshold;
    }
}

//Arcen's games.
enum Game {

    AI_WAR(false),
    A_VALLEY_WITHOUT_WIND(false),
    TIDALIS(false);
    private boolean GAME_KILLED;

    Game(boolean g) {
        this.GAME_KILLED = g;
    }

    boolean getGameKilled() {
        return GAME_KILLED;
    }

    void setGameKilled(boolean state) {
        this.GAME_KILLED = state;
    }
}

Yes, I like java.  <3 Keith.  Get to feeling better!
I'm going to take a moment and say that this is actually awesome.

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Keith Appreciation Thread
« Reply #31 on: December 04, 2012, 10:28:34 am »
Just read the code block from Pluto; yea, that's pretty funny.

Code: [Select]
                    case A_VALLEY_WITHOUT_WIND:
                        if (!g.getGameKilled()) {
                            keith.idunknowwhatthisgamereallyis(10);
                        }
                        break;
It sure felt that way! ;)
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Philo

  • Full Member Mark II
  • ***
  • Posts: 176
Re: Keith Appreciation Thread
« Reply #32 on: December 04, 2012, 10:50:20 am »
Here here, raise a glass! No game has had this much support after release from the devs since... Well ever!

Offline TechSY730

  • Core Member Mark V
  • *****
  • Posts: 4,570
Re: Keith Appreciation Thread
« Reply #33 on: December 04, 2012, 02:37:29 pm »
Agreed on all of this.

Keith has done an amazing job with AI war, especially in terms of making the AI smarter. I especially appreciate this because a smart AI is what attracted to this game in the first place.

Also, even though Chris hasn't been involved in AI War directly very much recently, he has still established a very unique but solid foundation for this game. And I am sure Keith has been collaborating with him behind the scenes some (or possibly quite a bit).

Offline fishy

  • Newbie Mark II
  • *
  • Posts: 12
Re: Keith Appreciation Thread
« Reply #34 on: December 04, 2012, 02:44:56 pm »
Thanks for all your hard work everyone at Arcen! Your games are unique and bold; it takes a lot of guts to base a business on something different, but you've got my cash and support all the way. I like the way AI War has been going and I can’t wait for AVWW 2...... and maybe AI War 2 someday?  :D
« Last Edit: December 04, 2012, 02:49:21 pm by fishy »

Offline keith.lamothe

  • Arcen Games Staff
  • Arcen Staff
  • Zenith Council Member Mark III
  • *****
  • Posts: 19,505
Re: Keith Appreciation Thread
« Reply #35 on: December 04, 2012, 03:07:36 pm »
and maybe AI War 2 someday?  :D
Our policy on AIW has been to do everything we would do in a sequel in updates/expansions instead so that it keeps building up the combinatorial and emergent possibilities and doesn't fragment the multiplayer crowd.

Potentially there might be other games "in the same universe", but they wouldn't be going for the same kind of gameplay.

But glad you're enjoying it, either way :)
Have ideas or bug reports for one of our games? Mantis for Suggestions and Bug Reports. Thanks for helping to make our games better!

Offline Burnstreet

  • Full Member
  • ***
  • Posts: 129
Re: Keith Appreciation Thread
« Reply #36 on: December 04, 2012, 04:05:19 pm »
Just wanted to say, I really appreciate your work, though I have less and less time to play AI Wars because of my lovely little daughter.

Offline Pluto

  • Newbie Mark III
  • *
  • Posts: 43
Re: Keith Appreciation Thread
« Reply #37 on: December 04, 2012, 09:45:00 pm »
It sure felt that way! ;)

I don't honestly have a reply to that. :P  Hah!

Offline Someone_Else

  • Newbie
  • *
  • Posts: 6
  • I have many problems.
Re: Keith Appreciation Thread
« Reply #38 on: December 04, 2012, 09:56:37 pm »
+1
For making this game actually challenging.

Offline Lancefighter

  • Core Member
  • *****
  • Posts: 2,440
Re: Keith Appreciation Thread
« Reply #39 on: December 04, 2012, 10:13:00 pm »
+1
For making this game actually challenging.
didn't you make that giant ship rebalance mod for x3tc? Or was that somebodyelse.. I loved that mod. I was really sad to see it discontinued (and well, eventually picked up by some other guy)
Ideas? Suggestions? Concerns? Bugs to be squashed? Report them on the Mantis Bugtracker!

Author of the Dyson Project and the Spire Gambit

Offline Someone_Else

  • Newbie
  • *
  • Posts: 6
  • I have many problems.
Re: Keith Appreciation Thread
« Reply #40 on: December 04, 2012, 10:34:52 pm »
That was a mod by SomeoneElse, who is, well, someone else.

Offline Lancefighter

  • Core Member
  • *****
  • Posts: 2,440
Re: Keith Appreciation Thread
« Reply #41 on: December 04, 2012, 10:57:42 pm »
oh :(
Ideas? Suggestions? Concerns? Bugs to be squashed? Report them on the Mantis Bugtracker!

Author of the Dyson Project and the Spire Gambit

Offline Faulty Logic

  • Hero Member Mark III
  • *****
  • Posts: 1,194
  • Bane of the AI
Re: Keith Appreciation Thread
« Reply #42 on: December 04, 2012, 11:58:38 pm »
So you were disappointed that Someone_Else wasn't SomeoneElse but in fact someone else?

Anyone with that handle is clearly evil.
If warheads can't solve it, use more warheads.

Offline Lancefighter

  • Core Member
  • *****
  • Posts: 2,440
Re: Keith Appreciation Thread
« Reply #43 on: December 05, 2012, 12:00:50 am »
Yes, how dare they take the name of a long revered modder of x3tc! Evil!
(just kidding, in case the sarcasm wasnt evident)
Ideas? Suggestions? Concerns? Bugs to be squashed? Report them on the Mantis Bugtracker!

Author of the Dyson Project and the Spire Gambit

Offline Cyborg

  • Master Member Mark III
  • *****
  • Posts: 1,957
Re: Keith Appreciation Thread
« Reply #44 on: December 11, 2012, 09:09:59 pm »
Major suck up thread…

 But yeah, Keith rocks, and is apparently still reeling from the realities of dwarf Fortress.
Kahuna strategy guide:
http://www.arcengames.com/forums/index.php/topic,13369.0.html

Suggestions, bugs? Don't be lazy, give back:
http://www.arcengames.com/mantisbt/

Planetcracker. Believe it.

The stigma of hunger. http://wayw.re/Vi12BK