Wednesday, November 21, 2007

Route Theft

I'm debating whether to allow the player to steal his own routes. That doesn't sound right but I couldn't think of a better way of saying it next to explaining it in full.

However, a full explanation I will give. You have an extensive set of routes on the board. You send in a separate route route and connect it to an existing node within the first set, retracting its original source route. This way, if the source route is severing, you can save the rest of the route.

Here's a little ASCII art to illustrate:


\   /
 \ /
  Y      O
  |      |
  O      |
 /       |
/        |


\   /
 \ /
  Y------O
         |
  O      |
 /       |
/        |


The following route is no longer part of its original source, but becomes part of the second route. It is effectively stolen from its parent.

I thought of this a while back, but at the time I thought it was just "another feature" that I'd thought up in my head, contradictory to my goal to rely on the simplicity of the game to move it forward. However, I've recently begun to see the strategic possibilities the feature would present. Plus, it's still simple to do in-game. It would be a mere drag-n-drop. It would fit perfectly. As I write this, I like it more and more.

I'm going to do it. If you think I shouldn't, say so now. If you have any suggestions, please share them. Thanks for reading.

clevceo

Tuesday, November 20, 2007

XNA Networking

First off, Sever and its referenced libraries all converted just fine to XNA 2.0, though there were a couple deprecated functions. It ran fine without changing them, but the changes would be so small that I did it anyway.

I've been reading up on networking within XNA. I was deathly afraid that it would require as much code as the game itself, but fortunately, it does not. XNA has once again managed to simplify something so complex without losing any capability that I will need any time soon.

Anyway, it's still daunting. I have no experience with this stuff and it's still going to take some figuring out. Fortunately, it seems Sever's current structure is a perfect fit for networking (wipe the sweat off my forehead). I must be a prophet. No, that's going a little far. I'm probably just a genius.

Fortunately, I'll be able to do part of the multiplayer testing without a second computer. XNA allows multiple players to play from one instance on one pc. In other words: split-screen. I could've implemented split-screen before, but the required code would've gone off course from the intended structure of the game. I would've had to undo alot of code come XNA 2.0. But the waiting is over, so I can move on.

Please comment your suggestions, questions, thoughts, praises, musings, etc. Thanks for reading.

clevceo

Monday, November 19, 2007

XNA 2.0 Beta

What do you know. At the end of last night's update, I mentioned that the next step in Sever's development depends on XNA 2.0's release. Lo and behold, here I am in my bedroom with my laptop on (guess) my lap with the beta downloading at 76%. Hanginaround by Counting Crows shuffled its way to my speakers to celebrate.

I've never been much for beta testing. I've always been one to use the stable versions because I'm afraid I'll either lose some work or lose my patience with bugs. However, I will try the XNA 2.0 beta because my work is stunted without it. Plus, the what could happen, other than an in-game crash? The code always saves before it runs, so there's nothing to lose.

Visual Studio Express 2008 is also out. I downloaded it, but I haven't used it yet because it doesn't like XNA and any non-XNA code I've written was with VS 2005 Pro, which is a step up from Express, even if it is 2008. So if I ever use it, it will be purely for fun. Even if it does eventually accept XNA, I won't switch because...

XNA 2.0 integrates into Visual Studio 2005 Pro! I was bummed when I found out that XNA 1.0 required Express. I know I could add the references and all that to get it to work in Pro anyway, but it's just a nuisance that it isn't supported natively. Anyway, the biggest problem I had with Express was that there wasn't an option to retain tabs rather than treating them as spaces.

Anyway, the download is complete. Goodbye XNA 1.0, hello XNA 2.0 Beta! I know I shouldn't be working on Sever with RefLib on the clock, but I can't help myself. Expect updates.

clevceo

Sever: Explained in Full

I realize that I haven't explained clearly what Sever is all about. I've spoken mostly to myself in this blog and haven't given any readers a chance to understand what the hay is going on. I would very much like to get your input, so I'm going to explain it as best I can.

For starters, imagine you're designing a connect-the-dots picture, no intersections. Say some impatient kid is connecting the dots right as you draw them. In other words, every time you make a dot, the line makes its way to your pencil in realtime. Now, say the path we are making can split into two lines like a Y, then three, four, and so forth.

Now lets throw in another person at the other side of the sheet drawing his own dots. How dare he? And to make things worse, he's crossing your lines with his own. To your surprise, the lines he crosses are severed and all lines beyond them disappear. Your ears are steaming now.

You start making dots like mad, hoping the kid connecting them can keep up. You start cutting your enemy off, driving him back to where he started. Finally, when he only has a few dots left on the page, you cut off his first line and everything disappears. You have effectively conquered the page.

That's Sever.

Back to reality (meaning the Seververse), there's no page, no impatient kid, no pencil. The dots are, in Sever terminology, called Nodes. The lines are called Routes, each individual segment called a route Section. These terms are merely a working vocabulary, subject to change.

There are a few more mechanics to make the game more interesting. Instead of a kid drawing the routes, there are little people building them. These people are little dots that run mindlessly back and forth through the routes. Every time a person runs into the end of an unfinished route section, the section's length increments. Once the section is complete, the people then begin to build the node in the same fashion.

These people are generated at a consistent rate by the two connected dots that each player begins with, called Father Nodes. The section connecting them is called the Soul Section. When the source section is severed, the player is finished.

A player can sever his own routes if he chooses. However, when a route is severed, all people within it are lost and must be regenerated in time. If he's not in a hurry, he can retract his routes, drawing them in at a rate slow enough for the people inside to retreat to safety. This is what happens to the offensive route in a severance.

There are different kinds of nodes. Each one varies in a the following properties: radius, spacing, branches, speed boost, and person generation rate. Radius is the size of the node. Spacing is how much space is required between this and another node owned by the player. Branches is how many branches can follow this node. Speed boost is how much of a boost to give each person that passes through the node. Person generation rate is how many seconds between each person generated (0 if none). At the moment, I have only four different types:

Father Node: Gives a speed boost; generates people; doesn't split the route; not buildable.
Sub Node: Builds fast; doesn't split.
Switch Node: Splits the route in two.
Accelerator Node: Gives a boost; doesn't split; large spacing.

That's the current status of the game, only there is no multiplayer or AI. If you've read my past posts (you don't have to; I'm writing this to compile all the important stuff into one post), you'll know my future plans. However, for the sake of clarity, I'll give a short list:

1) Multiplayer
2) Fog-of-War
3) Map Obstacles
4) AI
5) Scripting

Multiplayer can't be done (with my experience) until XNA 2.0 is released in the next coming months (hopefully). But I plan to get to work on it as soon as I can because I can't truly playtest until I have an opponent that fights back.

Fog-of-War was the last task I had been working on when I took my hiatus to work on RefLib. I hadn't yet put any code into it because I was still brainstorming how I would implement it in Sever. It was (and is) a daunting task, but it is doable.

Map obstacles are required if I'm going to make unique maps, and as of yet I'm trying to figure out how to implement them in a way that's workable with AI pathing and performs well with collision testing.

AI is very daunting. I've read up on pathing, which doesn't sound so bad, but getting the AI to make a plan and implement it is beyond me. This feature I will put on the backburner until I'm ready for it.

Scripting is definitely doable, but it's useless without AI. It would only be used on a single-player campaign, and a single-player campaign makes no sense if the baddies have no AI to drive them. Until I do the AI, Sever will be a multiplayer game.

So that's the plan. As I've mentioned, I'm working on RefLib right now, so Sever will have to wait at least another month. Once Sever is back on track, I will start on the fog of war unless XNA 2.0 is out, in which case I will set to work on the multiplayer.

Please, please, please comment. Tell me what you think. Give me suggestions. Criticize me. Ask questions. Please.

Thanks for reading!

clevceo

Thursday, September 13, 2007

Why, XNA 2.0/Multiplayer

For the past month or so, I've been slacking on my projects. A lot is going on right now in my life, of which I will not elaborate. Anyway, I've missed the enjoyment I always had in my work with Sever. RefLib is not complete, though I planned to finish it by...right now. Anyway, I still have a ways to go with it, so Sever will be put off even longer.

Due to all the distractions, Sever rarely crossed my mind over the past month. But today a co-worker asked me about my personal projects and I ended up showing her Sever and Idea, and suddenly I realized how much I had invested in them and how much enjoyment I'd had working on them. And suddenly I dearly wished that I could drop everything, form a team, and work on them fulltime. I've had that wish many times before, but it hadn't been seen for over a month.

I sometimes wonder what it is about software development that intrigues me. I think it is similar to what novelists feel...in more ways than one. On the surface, you could say that mainstream developers are like mainstream novelists. They spit out their projects like a machine gun and reel in the money. But underneath, you'll see that some developers (ex. indie) are like the rare novelist that writes for his own fulfillment, sans success.

There is something about seeing all the code I've written come together on the screen. Knowing that my blood and sweat actually accomplished something. I can't get enough of it. Knowing that I'm capable of creating a full-fledged real-deal computer game, ignoring the scale, baffles me. It makes me feel like I can do anything.

There is also something about the indie cause. I call it a cause because it seems all indie developers have a common purpose: to bypass the publisher and enter unfamiliar territory, doing what hasn't been done before. The thought that I'm creating a game that is new and original excites me.

Plus, I feel I'm not settling. Many indie developers create casual games, as they're called. Casual games have their place, but I want to create something of real merit. Something with depth. Something immersive, beyond casual. Not many indie games can claim such a feat. But Introversion is one developer who's done it. Games they've made stand up to mainstream games. Many indie developers cower beneath the mainstream, but Introversion stands apart with games that are different but every bit as fun. And the ambience of their games is often more influential than your average mainstream game. It is that that I am striving for. I don't know that I'll achieve it any time soon, but I'm not going to stop until I do.

It's this passion that drives me. I just hope I'll eventually have the resources and the luck to make a living off of it.


On a different note, Microsoft plans to release XNA 2.0 later this year. This will be pivotal in the development of Sever. There is a new feature in the upcoming release that was conspicuously absent in the previous: multiplayer support! One of my biggest discouragements during the development of Sever was knowing that I could never really test the gameplay. I could never actually play the game. Of course if I were to stick some AI in there, I could, but I don't know enough. That will take a ton of work and research just to figure out. And I'd probably run through a hundred tries at the AI before I'd have something that would actually work.

Anyway, this news has me excited. Unfortunately, I'm afraid that I might have to start over on my development of Sever because its current structure may not be comfortable for multiplayer networking. Then again I could be wrong and it might be just perfect. We'll just have to wait and see.


The most important mission of this post is to remind my readers (and myself) that I'm still excited about Sever and I have no intention of dropping it. Thank you for sticking with me, and please stick with me a little longer. Thanks.

clevceo

Thursday, July 26, 2007

RefLib

Recently, I've been focusing on another project, codenamed RefLib, which is a game I've mentioned a couple times before as a commission from my boss. It may not be as interesting as Sever since it is much simpler, but it's my first commission and also my first collaboration. Also, it has a deadline: september, so it will also be my first completed project, as Sever and Idea are long-term projects.

Anyway, if you're interested, you can find my new RefLib blog here.

I may get bored with RefLib every once in a while and spend a day or two working on Sever, so don't go away. After RefLib is complete (in september), I plan to get back to work on Sever. Thanks.

clevceo

Friday, July 20, 2007

Grid, GUI, Cosmetics, Settings, Custom Maps

I discovered yet another problem with grid interaction. For those who don't know, I separate all nodes and route sections into a grid so that when searching for collisions, I only have to test the relevant grid squares. This, of course, improves performance. The problem comes when deciding which squares to test with a route, which passes through multiple squares. Unfortunately, though my code worked fine when the slope of the route was positive, when negative it went all over the place. However, I devoted an hour to fixing it and it's working fine now.

I did some more work on the GUI, making it even more flexible. Also, I'd previously been using a font that I'd created myself, but it didn't look too good, so for the time being, I'm using Haettenschweiler, which looks much better. I also bolded and centered the title bars of the forms.

I also changed the node spacing from thick broken lines to a thin solid line that's less distracting. All in all, the game looks pretty good (especially when fullscreen).

What I plan to do next, before I start the fog of war or map objects, is use xml to create a settings file in which I would contain the specs for the different nodes and the settings for the GUI and anything else I would need. That way I can avoid recompiling after every single tiny change (not that it takes a long time to compile). This would also allow for more flexibility. Less hardcoding.

The next step after that is to create custom map functionality. Until I get a better idea of how to implement the fog of war and the geometric map objects, I will do everything I can to create the basis of the maps. The objects and fog will extend what is already there. I think they will be easier to do once I have a better idea how things will work.

clevceo