Actually, two steps back. The first step back was going back to the drawing board on the lobby. I'd struggled for days to adapt the sample code to the Spacewar game without success. Without any success. So I decided that, with the huge mess I'd made, it would be easier to go back to the drawing board on my design of the lobby interface.
In the process of reworking my lobby, I discovered another serious problem. Just as Professor Keenan forewarned, the data-driven code did indeed require more work once the networking stuff started coming into play.
So my second step back was to re-evaluate the data-driven stuff and make sure that the distinctions between Player 1 and Player 2 were being made properly. Now that these things are all looking perfect, I'm returning once again to the lobby functionality. Third time's a charm, right?
A blog dedicated to my coursework in SE558: Architecture and Design for Multiplayer Games at DePaul University.
Tuesday, May 31, 2011
Thursday, May 26, 2011
A Discovery and Cautious Optimism
Just for the heck of it, I decided to log in to both games using the same login ID -- the one that works -- and I made an interesting discovery.
So now the question is whether I can get by using the same ID on both machines as long as I use the System Link option. Time will tell. I'm moving forward with this approach for the time being.
- First, I logged in to one machine and created a session using System Link.
- Then I logged in to the other machine with the same ID and joined that session.
- On the first machine, I got an message that said I had been disconnected from the LIVE service.
- However, both machines went into the lobby, and both IDs were listed.
So now the question is whether I can get by using the same ID on both machines as long as I use the System Link option. Time will tell. I'm moving forward with this approach for the time being.
Wednesday, May 25, 2011
Venting frustration...
I've spent all day trying to run the network game state management demo, and I have just now discovered the reason for my lack of success. To make matters worse, it turns out that Professor Keenan had warned us about this issue weeks ago and the fact somehow slipped past me. Here's my stupid, boneheaded story:
I set up the accounts for my first login (using my DePaul email address) back when the assignment was first given. There were no problems.
To have a second computer to test with, I brought home my work laptop from the office. The versions of XNA and Visual Studio were older than the versions needed for this project, so I had to upgrade both. Why did I have to upgrade Visual Studio? Because my second Windows LIVE login was causing the program to crash and I wanted to try to debug it.
The reason for the crash, according to the debugger, was that the account didn't have an XNA Creators Club membership associated with it. That's when I remembered that I never finished the setup process for that email address.
Then I started setting up the App Hub/Dreamspark stuff for that account. I got to the point where I needed to enter the code provided by Prof. Keenan, and the system wouldn't take it. It kept saying "Please enter a valid code". No matter how careful I was, or what combination of "O" and "0" I substituted for that ambiguous character, the code was never valid.
So, to get another functional login to use for this project, I've asked several of my game developer friends if anyone has a spare XNA Creators Club account login that I could borrow for a couple of weeks. While I wait for responses, I'm going to finish what I started with the lobby screen. Hopefully, by the time I finish it tomorrow, I'll have a second login that will enable a "Player 2" to join.
My hopes are resting on the fact that I have no plans whatsoever for the coming weekend, and plan to use the entire time to work on the project and get caught up.
Wish me luck.
I set up the accounts for my first login (using my DePaul email address) back when the assignment was first given. There were no problems.
To have a second computer to test with, I brought home my work laptop from the office. The versions of XNA and Visual Studio were older than the versions needed for this project, so I had to upgrade both. Why did I have to upgrade Visual Studio? Because my second Windows LIVE login was causing the program to crash and I wanted to try to debug it.
The reason for the crash, according to the debugger, was that the account didn't have an XNA Creators Club membership associated with it. That's when I remembered that I never finished the setup process for that email address.
Then I started setting up the App Hub/Dreamspark stuff for that account. I got to the point where I needed to enter the code provided by Prof. Keenan, and the system wouldn't take it. It kept saying "Please enter a valid code". No matter how careful I was, or what combination of "O" and "0" I substituted for that ambiguous character, the code was never valid.
So, to get another functional login to use for this project, I've asked several of my game developer friends if anyone has a spare XNA Creators Club account login that I could borrow for a couple of weeks. While I wait for responses, I'm going to finish what I started with the lobby screen. Hopefully, by the time I finish it tomorrow, I'll have a second login that will enable a "Player 2" to join.
My hopes are resting on the fact that I have no plans whatsoever for the coming weekend, and plan to use the entire time to work on the project and get caught up.
Wish me luck.
Monday, May 23, 2011
Back in the Swing
After being forced to abandon the project for a week, I am now back into the deep concentration required for it. My mother came to visit for a week, and she kept me insanely busy the entire time. It was really awesome to have all that time to spend with her, but it did set me back just a little bit and caused me to miss the deadline for the lobby.
No worries, though. I've written multiplayer game lobbies before, and I did spend some time last Monday analyzing the sample code and speculating on how it might be adapted to the Spacewar project, so it's not like I'm coming in cold. "Nothin' to it but to do it." Right? (Fingers crossed....)
No worries, though. I've written multiplayer game lobbies before, and I did spend some time last Monday analyzing the sample code and speculating on how it might be adapted to the Spacewar project, so it's not like I'm coming in cold. "Nothin' to it but to do it." Right? (Fingers crossed....)
Friday, May 13, 2011
Data-Driven Me Crazy
Well, as it turns out, three of the problems I mentioned in my previous post all shared the same root cause: I was not handling the message correctly! I designed my system so that all data packets have a type field that tells the queue processor how to handle them. For the asteroids, I had forgotten to specify the message type as ASTEROID_INIT. Without this identifier, the message was being handled like a TURN message that was owned by the host. And THAT, my friends, is why Ship 1 was facing down the Z axis: it was getting the asteroid's rotation values.
So now the only problem I have to solve before moving on to the lobby is to figure out why the game is throwing an exception when transitioning to the next screen.
On to the next challenge!
So now the only problem I have to solve before moving on to the lobby is to figure out why the game is throwing an exception when transitioning to the next screen.
On to the next challenge!
Complications With the Data-Driven Approach
I've been working on this phase of the project every day this week, but I had completely forgotten to keep up with the blog, so here's an update of what's happened:
I started out by focusing on the Retro mode since it's considerably simpler. I got Fire and Hyperspace working almost right away. Over the following couple of days, I got Thrust and Turn working.
Now that all of the player commands in Retro were successfully data-driven, I turned my attention to the Evolved mode. This one isn't turning out to be nearly as simple.
On the plus side, the data-driven controls from the Retro version transferred over with no issues. Fire, Hyperspace, Thrust, and Turn still work by processing the messages from the queue. However, there are some issues. Here is a list of the current challenges and things to fix:
As a result, I'm probably going to miss this first deadline. But I plan to have a lot of time to myself next week, so that should provide enough opportunity to catch up. Here's hoping!
I started out by focusing on the Retro mode since it's considerably simpler. I got Fire and Hyperspace working almost right away. Over the following couple of days, I got Thrust and Turn working.
Now that all of the player commands in Retro were successfully data-driven, I turned my attention to the Evolved mode. This one isn't turning out to be nearly as simple.
On the plus side, the data-driven controls from the Retro version transferred over with no issues. Fire, Hyperspace, Thrust, and Turn still work by processing the messages from the queue. However, there are some issues. Here is a list of the current challenges and things to fix:
- The asteroids aren't showing up.
- When the level ends, it throws an exception.
- Ship 1's model is facing down the Z axis for some reason.
- This causes his bullets to miss the opponent because they're passing by behind him.
- Ship 2 doesn't have these issues. He's facing the right direction and his bullets hit Ship 1.
As a result, I'm probably going to miss this first deadline. But I plan to have a lot of time to myself next week, so that should provide enough opportunity to catch up. Here's hoping!
Monday, May 9, 2011
Fire and Hyperspace done!
After several analysis sessions, I finally think I have a good idea on how to data-drive this thing and make it conducive to networking. So far, it works great for the Fire and Hyperspace commands.
I'll provide more details later after I get the thrust and turning commands working, because then I'll have a better idea about whether this approach is really going to work. I have faith!
I also skipped ahead and looked at the lobby code from the Invites example. I may be mistaken, but it looks like a lot of that code can just be borrowed as-is, with little rework. I hope I'm right! We shall see soon enough.
I'll provide more details later after I get the thrust and turning commands working, because then I'll have a better idea about whether this approach is really going to work. I have faith!
I also skipped ahead and looked at the lobby code from the Invites example. I may be mistaken, but it looks like a lot of that code can just be borrowed as-is, with little rework. I hope I'm right! We shall see soon enough.
Wednesday, May 4, 2011
Preppin' for the project
I've set up one set of logins for the project now. What an utterly annoying process!
For mhenson@mail.depaul.edu:
For mhenson@mail.depaul.edu:
- Windows Live...check.
- Dreamspark...check
- App Hub...check.
- Xbox Live...check.
Subscribe to:
Posts (Atom)