Friday, March 6, 2009

Good news! I've finished my throw/target/look routine, which means that now I can move forward with any of my methods that need to have a target. This means that I'll be able to throw objects, shoot weapons and walk more than 1 tile at a time.

Wednesday, March 4, 2009

Well, I've started over from scratch, mostly. I'm not worrying about the interface right now, though I'll soon embed everything inside of some swing panels so I can use the key listener. Anyway, I've got the tactical world working fine, a super-random level-generator, I can cycle between units, move them around, the inventory works, time units work, you can equip things and look at inventory, etc. I really need to spend a day going through my code to make sure it's commented well. for the time being, I scrapped the color capability in the display, as this is what led to my frustration last time. I'll worry about the display later, as it won't take very much changing for my objects to return colors in addition to their represented character. I'm in the middle of writing methods that actually allow for the unit to use/throw euipment that it's holding in it's hands.

I took the liberty of adding in extra 'stances', (standing/kneeling) so that now you can low-crawl, crouch (move while doing these things) run, and sprint... all of which affect how much TU/Energy is expended, while either increasing or decreasing your accuracy (and other things)

Wednesday, October 22, 2008

Minor update

Just a minor update before I forget about it. I've got 4 exams and 4 projects due in the next 8 days, so I'll likely (or shouldn't) get much done on this. I have, however, successfully figured out how to connect the gameplay loop to an event timer so that after the passage of X amount of time, the geoscape clock automatically updates. A few bugs surfaced though... in that it's possible for the forced refresh of the zoom to interfere with the forced refresh of the time update... (which makes for some interesting things as it's rendering the ascii matrix) I've got a few ideas how to fix this. Also, I've got an invisible variable properly moving the horizon, now I just need to modify the rendering methods so that they access this variable to see if it should render the element in question as day, dawn/dusk, or night. That's about it. I'm pretty sure that this project will go on hiatus for a month in November as I direct my extra time towards the NANOWRIMO. (National Novel Writing Month) I'll likely post on here about my progress with that, and at the very least, have a link to my progress bar as I slog through 50K (or more) words in 30 days.

Saturday, October 18, 2008

More Geoscape

So, as you can see, I've done a bit more work with the geoscape. I've added the time/date window, which properly increments through arbitrary amounts of time and such (except it doesn't yet correct for leap year, as if that really matters) Also, I've added the 'controls' though, none of them do anything yet. However, I HAVE added zoom in and zoom out functions, though the x,y coords of the view screen don't change when you zoom in/out. (I'd like the zoom to focurs on whatever is in the center of the screen. Perhaps I'll fix that later. A few more lines of code and this will actually progress through time with the user being able to change how quickly time progresses. I currently have the capability for the world map to include differing colors, textures (IE, desert, arctic, etc) I just haven't gone in and changed any of the #s to something else. Once I get the time progressing, I'll add in the night/day progression when you can actually see where night and day are on the world map, then I'll add the layer(s) which will let me see where the (if any) bases are, and cities perhaps. (though I doubt I'll put in any cities right now, at least, not more than 2 or three, just enough to make sure it works. I think I'll have the cities be asterixes or something on the world map, and the ASCII characters will be followed by a sequence of city names, in the order that the asterixes were found in the map file. I could do the same the countries, except that I don't know how I would define country borders, through the map. I could make it a bit more simple, and just have a country's capital/center of mass or something be labeled and connected to it's starting pay amount... and anytime there is any activity that would cause a country to increase/decease its payout, the location where said thing happened will be calculated for its distance from the nearby countries. Or something... but I might not do that.

Wednesday, October 15, 2008

Just a bit.

I fiddled around with my code and fixed the color output for the geoscape window. I also changed it so that scrolling makes it jump 5 sqaures at a time and shift-scrolling takes it to ten. I fixed a weird bug that caused the bounds-checking when moving to get borked. The fix is just a hack though, until I figure out where I got X and Y values crossed. But, out of this, I have the basic framework for all of the file-parsing (I assume that I'll have rooms and components of levels saved as editable text files) functionality. Next, I'll implement a zoom (which will basically print every other unit in the array (though, will arbitrarily place 'important' units nearest where they actually are, IE, Bases and the like.)

Tuesday, October 14, 2008

Geoscape


I've just been fiddling with the Geoscape, which appears once you select a difficulty. This is what I have so far. (It loads the world map from a text file when the game is started) and yes, that is a scrollable window, using the w-a-s-d keys. The colors are off for some reason, but I'll have to figure that out later. Also, I'll need to streamline things because the scrolling isn't as smooth as I'd like it to be.

Monday, October 13, 2008

I guess I could start with the beginnig



So, I've been cobbling things together, building stuff, writing LOTS of method stumps and stuff. I'm slowly plodding through, trying to implement things... allow myself to implement things in the future, etc. When the code is executed, this first window appears first. (It'll likely follow a nifty ASCII graphic image in the future)

Selecting "New game" causes the next image to appear, and from there, a WorldManager object is created with the proper difficulty level.
I find that as I do things, I write code in one method until I have a chunk of it that seems to go beyond what that method was meant to do, so I cut it out and put it in its own method. I don't know if this is the normal way of doing things; I've never programmed anything this large before.

I still have all of the tactical code that I wrote before, (only a fraction of what I'll eventually have) but it's just floating around in unacessable methods. Next I've got to build the 'geoscape' setup and get some of its functionality working. This is quite good fun, and once again, I should be doing Calculus 2.