Tuesday, November 27, 2007

Network Problem Solved

Correction: my network is fine. Sever and the Net Rumble Starter Kit were broken for two different reasons. The Net Rumble Starter Kit didn't work because the GUID's were different on each computer. Sever didn't work because I wasn't updating the network session each frame. Doh! It works now. Awesome.

clevceo

Network Trouble, Gameplay

I just received my second comment, only this one's legit. It wasn't long or detailed, but it was a complement, and that always counts for something, especially when it's all you've got. Anyway, it was from Zygote. He has a blog, Ziggyware XNA News and Tutorials, and a website, www.ziggyware.com. Thanks, Zygote.

On to the update:

I made some minor improvements and fixes to my input library. Nothing important enough to mention, especially since I'd have to explain how the whole library works first.

I also finally tested the network. It didn't work. I googled and googled, finding nothing, so I decided to test a sample game from the web, namely the Net Rumble Starter Kit. It didn't work either. Conclusion? Something's up with my network.

I've somehow completed four years toward an IT degree and still don't know a whole lot about networks. It's probably because I hated IT (I'm now CS) and blocked it all out of my mind. Anyway, I'll just have to figure it out.

I made some changes to the lobby and join screens. In the process, I think I've found some bugs in the beta. When I end a session, the SessionEnded event is never raised. This will cause problems on the client end. Nevertheless, I went into this knowing it was beta. They say they'll be releasing fairly soon, so I won't give up.

I've gotten as far as I can for now on the main menu. Now I'm just beginning to work on the gameplay (once again). Before I get too far, however, I'm brainstorming better ways to implement it. I already have a few ideas. I have to keep in mind the fact that it will be running over a network.

I'm also keeping scripting in mind. I said before that I'll implement it last, but I've had a few ideas for an interesting single-player with an AI that is purely made from scripts. The opponent would expand in interesting patterns from his base and the player would have to eliminate him within a time limit. If I'm going to have scripting, I may as well prepare for it now.

I'm going to redo my camera class. My previous camera class supported rotation, which was never used in Sever and probably never will be (as long as it's 2D; who knows what's in store?). Less math in the calculations means better performance.

I'm pretty sure I'm going to make each little person a Vector2 as opposed to a special class. The X value will be the person's progress through the route section and the Y value will be his current speed. Structs are faster than objects, so the performance should be improved.

Also, I'm thinking of hiding opponents' people. Each player will only be able to see his own people. This sounds arbitrary, but it means that I won't have to send data about each little person over the network. Much much less traffic. It also means less sprites to display. Can you go wrong with better performance all around?

I'm also going to look into geometric collision detection and fog-of-war. Geometric collision detection is important because it will allow me to places obstacles in a map. If I didn't have those, then what would distinguish one map from another aside from tiling?

Fog-of-war is important for two reasons. First, I think it will add to the fun. It will allow players to scheme in private. It will also allow players to move around the map without the opponent noticing, allowing for more complex strategies, such as sneaking around and attacking from the side. Without fog-of-war, the game would be brute-force. Second, I think I would enjoy implementing it. It would be a real challenge, but I think it would be worth it.

I'm planning to post some gameplay videos from my last Sever implementation. I don't know why I didn't do that before.

Suggestions? Questions?

clevceo

Sunday, November 25, 2007

Intro Screen

I added an intro screen that fades in and out with the Clev logo. It's nothing huge, but plenty of fun to do. I made the logo a few days ago as I was working on a website design for Clev. Anyway, here's my working logo:



Like it? Suggestions? Questions?

clevceo

First Comment!

I just received my first comment on the post just before this one! It may be spam, but hey, you take what you can get. Furthermore, it's advertising dialup, which is useless considering the fact that those reading my blog already have an internet connection, most likely broadband at that. But the best part of the spammy comment is that it's in Portuguese. It doesn't get better than that. Thanks for the laugh, crescenet.

Anyway, he wanted me to add his url to my blogroll. While I won't go that far, I will add a link right here in this post for the sake of laughs: www.provedorcrescenet.com

clevceo

Saturday, November 24, 2007

ListBox & Scrollbar, GUI Rendering

The scrollbar and listbox are both complete. However, as with everything, changes will probably be made in the future. Nevertheless, they work and that's the most important thing. They took the better part of the day to complete, so it feels good to be done.

Anyway, the Join Game window now displays all available games. Excuse me, the Join Game window would display all available games if there were any to display. Excuse me, I don't know whether or not the Join Game window displays all available games because I have yet to create another game on a separate computer, and thus have not tested it, and thus have no idea whether or not it works. In other words, the listbox is blank.

Nevertheless, the listbox is there and it works beautifully. I must say, I love my GUI library. The only problem with it at the moment is that it's drawn with scaled sprites. Scaled sprites can be a pain sometimes, and they're inflexible, but they're easy to implement. In fact, in my last implementation of Sever, I scaled and rotated a single-pixel sprite to draw lines.

However, once I understand shaders (when and if), I will use them to render the GUI (and lines). Shaders mean more flexibility and efficiency for the GUI. If only they weren't so weird and confusing!

Suggestions please? Questions?

clevceo

Friday, November 23, 2007

Local Sessions Xbox-Only, Join Game Window

Unfortunately, the whole idea of a "Local Network Session" (split-screen play on a single system) is Xbox only. That took me no less than four hours to figure out. For some reason, it wouldn't let me add any local players, so I searched and searched online until I finally found the bad news. The help files don't even make this clear.

I am forced to use an alternative, but I can't use the internet because Live play requires a Gold membership. Furthermore, Live play in the beta release also requires a Creators Club membership. To sum it up: not free.

Therefore, I can only use System Link, which means multiple computers over a local subnet. I'll probably eventually add Live support since the devs went to great lengths to make Live and System Link behave like twins in XNA. Only a few minor differences.

Anyway, without Local, testing will be a challenge. I can probably test the gameplay in a single-player mode, but I'll have to make arrangements for network testing (all I've got is my laptop).

At the moment I'm working on the Join Game window. I've basically finished the New Game window. For the Join Game window, I'll need a listbox, and for the listbox, I need a scrollbar. Scrollbar it is.

clevceo

Starting Fresh

Wait until I'm done before you say anything.

I'm starting over on Sever. Agh! I said it! Fact is, it could be done better. Plus, I want the entire game created with multiplayer in mind.

First, however, I'm creating a template for any future games I start. Trying to get RefLib on its feet was a real pain because of all the nuances in my GUI and Input libraries. I've done a thing or two to make it easier, but I still want a template. The template will contain a simple main menu and no more.

Also in the template, I'm creating a server window for multiplayer games. That's what's occupying my time at the moment. It's a learning experience. I'm finding it easier than I expected, but still daunting all the same.

I'm always tempted to give up on it. I continually let myself become distracted by small things (like blogging), or find myself staring at a wall for long periods of time trying to remember what I'm doing. And then I think about how I should be working on RefLib. It's a painful process.

I wish I could jump a few years into the future when all schooling is over and I've established myself as a software engineer.

Anyway, thanks for reading. Comment please.

clevceo