Search Results

Search found 3 results on 1 pages for 'jarx'.

Page 1/1 | 1 

  • Game engine design: Multiplayer and listen servers

    - by jarx
    My game engine right now consists of a working singleplayer part. I'm now starting to think about how to do the multiplayer part. I have found out that many games actually don't have a real singleplayer mode, but when playing alone you are actually hosting a local server as well, and almost everything runs as if you were in multiplayer (except that the data packets can be passed over an alternate route for better performance) My engine would need major refactoring to adapt to this model. There would be three possible modes: Dedicated client, Dedicated server and Client-Server (listen mode) * How often is the listen-server model used in the gaming industry? * What are the (dis)advantages of it? * What other options do I have?

    Read the article

  • C++: How to build an events / messaging system without void pointers?

    - by Jarx
    I'd like to have a dynamic messaging system in my C++ project, one where there is a fixed list of existing events, events can be triggered anywhere during runtime, and where you can subscribe callback functions to certain events. There should be an option for arguments passed around in those events. For example, one event might not need any arguments (EVENT_EXIT), and some may need multiple ones (EVENT_PLAYER_CHAT: Player object pointer, String with message) The first option for making this possible is allowing to pass a void pointer as argument to the event manager when triggering an event, and receiving it in the callback function. Although: I was told that void pointers are unsafe and I shouldn't use them. How can I keep (semi) dynamic argument types and counts for my events whilst not using void pointers?

    Read the article

  • C++: Pass array created in the function call line

    - by Jarx
    How can I achieve a result like somebody would expect it according to the following code example: // assuming: void myFunction( int* arr ); myFunction( [ 123, 456, 789 ] ); // as syntactical sugar for... int values[] = { 123, 456, 789 }; myFunction( values ); The syntax I thought would work spit out a compile error. How can I define an argument array directly in the line where the function is called?

    Read the article

1