May 2008

Weekly Report 3

Hopefully this is more to mithro’s liking :P I did my best to at least link to one or two of the products of my work for each day.



This Week

  • Monday:
    • “Shelled out” the ruleset a little more by adding all create* classes. diff.
    • Converted from basic Galaxy type to a class with a bonus integer that indicates the bonus garnered for owning the entire constellation/galaxy. commit.
    • Added “Armies” Integer to the Planet class. (Later removed)
    • Encounter a Bus Error when launching the server in a certain way – filing a bug report next monday. archives.
  • Tuesday:
    • A large portion of the day was spent trying to debug the bus error using gdb and ddd.
    • Mithro taught me some good methods for asking for help/filing bug reports. instructions. help post.
  • Wednesday:
    • Added code to ensure all objects are visible. commit.
    • Made note of a bug wherein client would not download objects. I later found that the Planet’s Frame was not being packed with enough data.
  • Thursday:
    • Converted “Armies” Integer to a Resource; Reinserted resource setters/getters and Frame packing code. Client now loads and displays universe properly. commit. results (really low res).
    • Attempted to phase out Star Systems with Planets and in its stead implement lone Planets. It turns out there is a bug where lone Planets do not display in the client. Reverted the change.
    • Did research and gave names to all stars corresponding to their relative positions in their constellations. names.
  • Friday:
    • Plotted all stars on a measured grid. pic.
    • Hard coded those positions into the ruleset. Client now displays constellations in proper configuration. diff.

Next Week:

  • Spread out star positions to make it more clear the boundary between constellations.
  • Implement an adjacency matrix to represent connectivity between stars. This will provide a 2D-array to iterate down a row to discover a star’s neighbors.
  • File bug reports on both:
    • The Bus Error I discovered and,
    • Planets not displaying without a star system parent.
  • Begin implementing basic turn structure (before individual orders.) I believe this top down approach will more properly acquaint me with OrdersQueues and make it easier to implement the individual orders.
  • Investigate the drawing of lines while issuing orders. This would allow adjacency lines to be drawn to make it more clear which territories neighbor the selected territory.

GSoC

Comments (0)

Permalink

a quick, pre-report post

Before I post my first official weekly report I just wanted to throw out some commentary. Today I worked mainly to produce a graph of all the positions of the stars in their constellations. I used OmniGraffle to do so and found it was a pretty painless procedure.
TP - Risk map fully labelled

Continue Reading »

GSoC

Comments (0)

Permalink

a windfall of success

My apologies about the lack of a post yesterday. Things were pretty stressful trying to deal with my windfall of bugs. Fortunately I got past the “deal-breakers” and got onto some real tangible bugs. As it turns out I can avoid (not fix) the “bad password” bug by sudo make installing the server instead of running it from its compiled location. Having moved on from “bugs that I have no idea how to deal with” I moved into the realm of “bugs relating to things I figured would go wrong.” More about that bug, and all my success today, after the jump…

Continue Reading »

GSoC

Comments (0)

Permalink

soo exhausted

For not writing any code that had to have been the most arduous day working on a project I have ever had. I won’t bore you with the 400 line ML post documenting what problems I was having but I will give you the long-short of it as I sort of stumbled onto two lengthy problems.

The first of which is a Bus Error I am encountering on Mac Os X exclusively. Oddly enough you can’t try and start the network on the server before starting the game. This isn’t exactly a deal breaker for continuing with my project but is something that should be address for OS X users. I did get the opportunity to play with gdb and ddd however, something I had been wanting to do for a while.

The next, deal-breaking bug, is the risk rulesets inability to get it up, or rather, the risk server won’t load properly on any platform. If you are really interested in helping me out and aren’t already subscribed to the tp-devel mailing list head over to their archives. Long story short the post is labelled “Ignore the other Server problem – part 2’s (sorry)” The one interesting thing about this bug I can say is that on Ubuntu it causes the client to display a really bastardized version of risk merged with minisec if you launch minisec before attempting to launch risk a certain way.

I won’t continue as I am, for some reason or another, really tired from all this typing/debugging.

GSoC

Comments (0)

Permalink

and we’re off

Well today marked the official start of coding for GSoC. Having gotten off to a good start on Friday today was spent trying to rough out the shell ruleset. Without testing I can’t say everything works correctly, but I do have a good majority of the features “shelled out.” These are the shells I have so far:

  • Objects:
    • Universe, which holds all the:
    • Galaxies, which hold all the:
    • Star Systems, which hold one:
    • Planet
  • Some special properties/parameters for objects:
    • Galaxies have an obpT_Integer parameter representing the bonus a galaxy gives if completely conquered.
    • Planets have an obpT_Integer parameter representing the number of armies a given planet has
  • Orders:
    • Colonize
    • Move
    • Reinforce

Since I haven’t tested I am not totally sure if I’ve done the object parameters correctly. Perhaps I will do some debug/print logging to actually see what is going on with the parameters if I can’t get the server working. I will most likely need to have a lengthier chat with Tyler to see if I am on the right track.



Unfortunately for me I have run into a small error that isn’t letting me test any of this yet. As it stands I can start my server properly, but when I attempt to log into the server (with a used or new username/pass) I get a strange error back:

  • The client connected to the host but could not login because the username or password was incorrect. This could be because you are connecting to the wrong server or mistyped the username or password.

Now I should say that I HAVE been able to connect to the server with the risk ruleset in the past. I’m not sure what I might have changed that is causing this problem. If anyone has any ideas or suggestions let me know (I will most likely hit up the dev mailing list for TP as well.) UPDATE: I just attempted loading the server sequentially and I received some additional info. The problem isn’t exclusive to my ruleset, nor is it exclusive to even my branch (risk.) If I start the server without a config, and type the following commands:

tpserver-cpp> game ruleset=risk
tpserver-cpp> game load
tpserver-cpp> network start

I receive the error (as well as a program crash thrown in there):

tpserver-cpp> network startBus Error




On a side note:



I also wanted to add that I more or less picked the constellations I will be using to represent traditional continents in Risk. While certain constellations match very closely the layout of their representative continents a few, namely Russia and Europe, will need to be squeezed around a bit to fit the constellation. Here is my list:

Star systems names will most likely follow from the actual stars in the constellations. For example, with Crux Australis, will contain Acrux, Becrux, Gacrux and delta Cru. (I may pick something different for delta, it is not officially named.) This week I will hopefully map out on some graph paper (or a digital equivalent) the relative positions of the star systems within their respective constellations. For now I am statically declaring all the planets in neat little lines; I am expecting (when I get the server running) for everything to look a lot like a bar graph for the time being.

GSoC

Comments (0)

Permalink

and we’re off

Well today marked the official start of coding for GSoC. Having gotten off to a good start on Friday today was spent trying to rough out the shell ruleset. Without testing I can’t say everything works correctly, but I do have a good majority of the features “shelled out.” These are the shells I have so far:

  • Objects:
    • Universe, which holds all the:
    • Galaxies, which hold all the:
    • Star Systems, which hold one:
    • Planet
  • Some special properties/parameters for objects:
    • Galaxies have an obpT_Integer parameter representing the bonus a galaxy gives if completely conquered.
    • Planets have an obpT_Integer parameter representing the number of armies a given planet has
  • Orders:
    • Colonize
    • Move
    • Reinforce

Since I haven’t tested I am not totally sure if I’ve done the object parameters correctly. Perhaps I will do some debug/print logging to actually see what is going on with the parameters if I can’t get the server working. I will most likely need to have a lengthier chat with Tyler to see if I am on the right track.



Unfortunately for me I have run into a small error that isn’t letting me test any of this yet. As it stands I can start my server properly, but when I attempt to log into the server (with a used or new username/pass) I get a strange error back:

  • The client connected to the host but could not login because the username or password was incorrect. This could be because you are connecting to the wrong server or mistyped the username or password.

Now I should say that I HAVE been able to connect to the server with the risk ruleset in the past. I’m not sure what I might have changed that is causing this problem. If anyone has any ideas or suggestions let me know (I will most likely hit up the dev mailing list for TP as well.) UPDATE: I just attempted loading the server sequentially and I received some additional info. The problem isn’t exclusive to my ruleset, nor is it exclusive to even my branch (risk.) If I start the server without a config, and type the following commands:

tpserver-cpp> game ruleset=risk
tpserver-cpp> game load
tpserver-cpp> network start

I receive the error (as well as a program crash thrown in there):

tpserver-cpp> network startBus Error




On a side note:



I also wanted to add that I more or less picked the constellations I will be using to represent traditional continents in Risk. While certain constellations match very closely the layout of their representative continents a few, namely Russia and Europe, will need to be squeezed around a bit to fit the constellation. Here is my list:

Star systems names will most likely follow from the actual stars in the constellations. For example, with Crux Australis, will contain Acrux, Becrux, Gacrux and delta Cru. (I may pick something different for delta, it is not officially named.) This week I will hopefully map out on some graph paper (or a digital equivalent) the relative positions of the star systems within their respective constellations. For now I am statically declaring all the planets in neat little lines; I am expecting (when I get the server running) for everything to look a lot like a bar graph for the time being.

GSoC

Comments (0)

Permalink

Weekly Report 2

This time around I want to try a more brief format for my weekly report.



This week:

  • Worked more on turn ordering.
  • Create a large number of shell classes. Ruleset still compiles properly but implements little to no actual game logic
  • Created a quickstart config file for risk
  • Worked with llnz to get tpserver-cpp compiling on OSX

Next week:

  • Round out the remainder of the shell ruleset
  • Work out ObjectTypes for Universe, Galaxies, Star Systems and Planets as per what has been decided for them. See “Things to include” in risk folder
  • If things go well create a method to produce the Risk board when the game is created.

GSoC

Comments (0)

Permalink

what a day

Phew, what a day. After yesterday’s git fiasco I really kicked off hard today on coding a few days early. The majority of the work I did today was creating a tonne of shell classes. I didn’t intend on being this productive today; I had taken a little break from Minisec and was looking over the RFTS ruleset when I realize how compartmentalized my mentors work was. It was easy for me to adapt many of Tyler’s (xdotx) classes to fit in well with Risk. Now I couldn’t implement all the logic for the game (I would hope not, if I could I don’t know why I would be here :P ) but I was able to “shellify” many of the classes from Tyler’s ruleset that were fairly specific. In particular I cut out all references to “Resources” as Risk knows/cares not about them.



This whole process raised many questions for me about Open-Source in general. In general I wondered, “Is this what Open-Source means?” Now I’m not talking about all the broader implications, but what it means for a developer. Is Open-Source letting others benefit from your past work to make their own work easier? Certainly I’ll be saving weeks if not months of work by not reinventing the wheel, but is that fair? My natural response is to point back at the GPL and say “it says I’m free to use and modify code so long as my resulting code is open as well.” Am I seeing the implications of Open-Source or am I just cheating? (I certainly hope it isn’t cheating, because then I have to go back and redo work.) That said if what I am beginning to experience IS what OSS is all about then I can definitely say I want in. I’ll probably speak some more about all of this once I’m nearer to my projects conclusion.



Off to another topic now, I wanted to make a pseudo-announcement about tpserver-cpp. llnz and I spent a little while last night working out the kinks of my OSX compile issues and they are now formerly resolved. That means a) I can compile and run tpserver-cpp on OSX easily, and b) the next forthcoming release of tpserver-cpp will provide much greater OSX support (for those not running tpserver-cpp on the bleeding edge.) If anyone out there is having problems with compiling/running tpserver-cpp on OSX please let me know and I will see what I can do to help.

GSoC

Comments (0)

Permalink

iss gohzilla

Well today made for a rather eventful day. You might be wondering about the title, as it was, I had just finished a few commits worth of changes to my shell ruleset, when I accidentally “git push’ed” instead of “cg-push’ing” my changes up to the TP server. Biggest and most embarrassing mistake…ever. My small mistake pushed all my commits (I don’t mean just today, I mean like every one I have ever done) from my risk branch onto the main branch. Needless to say after a few minutes of crapping my pants I started working with my mentor xdotx to get things worked out.

Continue Reading »

GSoC

Comments (0)

Permalink

long weekend (for canada)

Well that concludes my long weekend. In Canada yesterday was a federal holiday so I took it upon myself to enjoy a nice weekend with my family coming out to Morden, enjoying our (i’m married remember) nice big yard and our new HDTV. The tax man was good to us this year so we’re lucky enough to buy our first big tv, a 42″ Samsung Plasma; Never seen my games look so good.

I also snuck in a few moments over the weekend to finalize my dev environment (no luck with OSX compile of tpserver-cpp though :( ) and as well got my shell ruleset loading into the server properly. I have one question for the devs; Is it alright for my namespace to be riskRuleset? This causes the server to announce the ruleset as “riskRuleset” even though you can load it with “game ruleset=risk”.

Continue Reading »

GSoC

Comments (0)

Permalink