Code Monkey home page Code Monkey logo

realtimetactics's People

Contributors

echofourpapa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

realtimetactics's Issues

Reorganize message types to have sub-types

Currently, there is only one "type" variable for messages, and it's owned by the parent Message class. As the number of types increases, this field is getting crowded. It's time to make more.

Each message Class should have its own sub-type. And then the existing Message's "type" field should be made to just hold an enum of what class the message should be. (IE: An aide in casting the Message to the correct child class) Each child class will have their own enum that describes what exact message is being sent.

Gtk client doesn't wrap tab matches correctly

If you have 11 or more matches on a server, the GTK client is supposed to include additional matches on other tabs of the match list view. But it doesn't.

There needs to be a changed_tab event handler on the match list view, which queries the server for the matches that should go in that tab.

Future updates and bug fixes with Boost 1.5.0.

After upgrading to Fedora 18, which uses Boost 1.5.0, there is a known bug with Boost and Fedora in which Boost.Thread links to Boost.System, but that link is found to be invalid, requiring both boost_thread-mt and boost_system-mt to be linked. RTT_Client_OGRE will not compile without adding a -lboost_system-mt argument. The latest Boost update for Fedora supposedly fixed the issue, however it still persists in RTT for some reason. At this time I'm unaware if it affects any other distro, however it's supposed to be Fedora specific.

Currently, RTT_Client_OGRE will not build on Fedora without this option, bu should build on others.

Crash when selecting new leader

To reproduce:

  1. Set up a server and one client. Connect the client and go into a match.
  2. Press the leader check mark on the client around 12-20 times.

Should crash now.

Complains about:

*** glibc detected *** ./Debug/RTT_Client_GTK: double free or corruption (fasttop): 0x09de7240 ***

You can stop the crash by commenting out the lines

row[playerColumns.isLeader] = true;
row[playerColumns.isLeader] = false;
(4 of them)

inside case LEADER_CHANGE: of the void *CallbackThread(void * parm) function of RTT_Client_GTK

MatchLobby needs changing/viewing for leader

The match leader is the player in a match who is able to change any settings. Including starting the game. By default, the leader is the stater of the match. But the leader role should pass to someone else if the leader leaves, or it is assigned to someone else.

Use fixed width variables in serialization code

The length of types such as ints and chars is taken for granted in the serialization code. In order to be portable, we need to make sure that all variables are the exact width we want them to be, no assumptions.

Define file structure for Gameboard

We want to be able to save data for a gameboard to file. So that someone can make maps (called gameboard in the code) and save them. We could also then have a visual map editor separate from the current game client and server code.

The basics of what are needed is pretty simple. Maximum lat and long, elevations... The movement penalties to each tile, etc... The complicated part comes in not from the game engine, but the art actually. How to store that is an interesting question.

  • Maybe XML?
  • Plain whitespace separated text?

Segfault in TeamChangedEvent on missing combobox

There is a combo box defined as:

CEGUI::Combobox *playerTeam;

Which is then assigned to a value only in a conditional. This conditional might not get hit. And then all the instances below where playerTeam is accessed will segfault.

There should be an else statement to the 'if' at the top of TeamChangedEvent() to handle this case.

libRTT_Common build type

The libRTT_Common dependency in each project is set to look for libRTT_Common.a in the Debug build directory, so all other project will fail to build when compiled as release.

RTT_Server doesn't compile

RTT_Server after last commit does not compile, like MatchLoop.cpp line 43: usleep(tickDelta);
gives the error: "usleep was not declared in this scope".

Prefix all member variables with "m_"

I've recently started this naming scheme are really liked it. It gives you a really quick idea of the scope of variables you're using. Member variables stick out like a sore thumb. Very useful.

Be careful with struct copies

structs can have passing and all kinds of internal silliness that can make direct memory copy errors. You have to assume that both ends of the communication were both made with the same compiler and everything, which we don't want to assume.

So change any instances of direct copies to/from structs and memory with copies of their contents. This is notably present in the message serialization code.

Ogre client doesn't log to system log location (/var/log/)

Looks like a permissions thing. Usually this isn't a problem because you don't try to write to the directory yourself. You're supposed to use syslog to do it. Maybe OGRE isn't using syslog to do logs, but rather writes directly to the file itself. If so, we'll have to figure something else out.

Team Change drops match

When changing the team of another player, when not the leader, the server will drop the offending player from the match.
This bug exists in both the GTK and OGRE clients.

Steps to reproduce:

Start a server and two clients
create a game and join that game with both clients
in the client that is not the leader, attempt to change other player's team.

Equip sockets with timout values

Right now, read() commands on a socket wait forever. Sometimes, we might not want to. Especially on the server. If we're only expecting an acknowledge message, then we can probably do without receiving it if it comes too late or if the client dies uncleanly.

Server crash after clients quit playing matches

I cannot seem to reliably reproduce this, I've only seen it once. But server crashes are serious, so here is what I know about it:

I was testing two clients out in the Ogre3D code, then quit out of the Ogre code back into the match lobby when the server spit out:

RTT_Server: malloc.c:4631: _int_malloc: Assertion `(unsigned long)(size) >= (unsigned long)(nb)' failed.
Aborted

Judging from this: http://stackoverflow.com/questions/7759696/what-does-this-error-suggest I would say that the error is due to us not deleting on object when we should. We'll have to take a close look at data reads from the server.

Running the server under valgrind would also be a good idea.

User Interface/Experience Design

A general UI/UX design is now needed. Keeping in mind that CEGUI will be used to render the UI, it is time to design the UI and UX(user experience).
A few guidelines:

  • Real Time Tactics is not the final name for the game, and is probably going to be used as the engine name. Do not include it in the design.
  • The design should be clean and functional, and preferably as minimalistic as possible.
  • The theme of the game is Steam Punk, so the look and feel should fit that style.
  • Hexagons are of to use.

Eliminate warning for scoped enums

In the common code, we use a scoped enum type. (Where you specify the exact data type) Which apparently is only available as of c++0x. Which is totally fine, but it produces a compiler warning. (Which we wan to eliminate):

warning: scoped enums only available with -std=c++0x or -std=gnu++0x

But when you throw in the "-std=c++0x" compiler flag, a whole slew of build errors ensue.

Try to figure out wtf is going on, here.

Client authentication

The basic protocol for exchanging client authentication information is present. But the actual authentication mechanism isn't,

Elements in the Google densemap don't get erased

When we delete a Player in QuitServer(), the damned Player shows up again when we call AuthenticateClient().

I haven't the foggiest clue why. I'm considering dropping Google densemaps because they have been such a pain to deal with so far. Terrible documentation (non-existent) and strange code behavior.

Client can't re-join server

Once a client has join a server, then leaves that server, that client cannot re-join that server. Different clients can join that server(but only once), and a client can join different servers, but only once. Output from RTT_Server:

[mark@MarkFedora64 RTT_Server]$ ./Debug/RTT_Server
Client: Authenticated!
Player: has left.
ERROR: Authentication Failure
ERROR: Authentication Failure
ERROR: Authentication Failure
Client: TEst Authenticated!
Player: TEst has left.
ERROR: Authentication Failure
ERROR: Authentication Failure
ERROR: Authentication Failure
ERROR: Authentication Failure

MATCH_JOIN_REPLY does not need returnedPlayersCount

The count of players is provided in the MatchDescription which is also sent in that same message. Instead, the JoinMatch() function in ClientCore should return a bool, and the message have the player count removed.

Possible memory leak with GTK list matches

We make a call to "new MatchListColumns();", but it's not clear whether that object ever gets cleaned up. It might get managed by the parent widget. But I suspect not. This might be causing a memory leak by not cleaning it up.

Rework client as a library, not executable

in order to better access the client functions from any interface, it will be preferable to build the client as a library to link against. Currently, the client is an executable.

Don't respond to an Error message with another error

In much of the protocol handler code, we simply check for our desired message type. And if it's not correct, send out an error message. But we shouldn't reply to error messages with more error messages. For one, it's redundant. And two, it could possibly lead to an infinite loop.

Team numbers, funny initializations

When a player joins a match, the team number that appears is not set to "Team 1" (as the default should be). It appears to be set as whatever the player's team number used to be in the last match they were in.

Salting on password

We do a SHA256 hash of the user's password, but really need to salt it, too. Find either how to do this in the library, or just do it manually.

Make unified logging mechanism

Should allow for different levels:

debug, info, warning, error, critical

Also should write to file and to sterr. Output should be easily parsed so you can just view particular kinds of logs.

Provide clients with more state information in error messages

Particularly about where the server thinks that the client should be. Sometimes we'll get an error where the client thinks he's in a match lobby, but the server thinks he's in the main lobby. So the client just gets stuck there sending the wrong messages. We need to have the server tell the client where he ought to be in error conditions, so he can reset.

When server stops with clients in lobby, clients infinite loop

The problem is that the ProcessLobby commands on the client side only have one error condition. So we don't know the difference between a benign error, and a critical one. So when the server dies. we go back and ask for another message. Then get another error, etc...

Locking and pointers

The playerList and matchList hash tables contain only pointers to objects. So that essentially means that we should be doing locking any time a match or player is accessed. Which is bad. Change the hash tables to contain actual object contents.

Then we can get a copy of the object and immediately unlock. If we want to submit that object back into the table, then you have to relock and go back and do it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.