Tag Info

New answers tagged

0

The solution I prefer is to put all game-specific logic in the client. The server only acts as an I/O reflector to make sure all clients are up to date. One benefit of this approach is that the same server can serve different games, since it knows nothing about the content of any specific game. There are a few things that have to be done centrally, such ...


4

As others have said, the first step is separating logic that's shared from logic that's not. While it's great to draw that line wherever it's clear, your addendum illustrates that sometimes you don't have a clean line to split the code down. So, how do we solve cases where the client and server want to do semantically the same thing (play a sound), but take ...


2

Extract any shared code to a library which you maintain separately. Then implement your client and server as a separate applications which implement anything specific themselves and reference the library for any shared functionality.


0

The cleanest way is to create a "core" project that includes shared game code. You can use either interfaces or abstract classes to prepare your game code there and use inheritance [1] to extend/implement these classes in either the server or client side. That way you do not need any if statements to distinguish between client and server code. You should ...


0

To make the moves of the AI more noticeable, you could animate them. Instead of removing the objects immediately, you could, for example, fade them to alpha over the course of a second. You could also do something more flashy like drawing a destruction animation or having them explode with a particle effect, depending on what's appropriate for the theme of ...


1

I think that no matter what strategy you plan to use, you need to consider methods like: KISS (Keep It Simple Stupid) DRY (Don't repeat your self) Read books like: Clean code Simple non repeated code tends to run clean and smooth, use alot of benchmark tests Divide the system's node value with 20 and set a max time for execution, eg. first node max ...


2

Let the user configure the bindings from an options menu in the application. Players might be using QWERTZ (German) or AZERTY (French) layout keyboards, Dvorak layout keyboards, joysticks, etc., and they don't want to have to learn Yet Another Config File Language. But still, a lot of players will want to jump in and play without changing any settings. So ...


1

You could have the users configure their settings when they choose to start for the first time. Some games have you manually set your gamma and screen size, as I am sure you have experienced before. You could prompt each player to select what key they would want to use for the functions you have in your game. A Config file seems less intuitive. A options ...


5

The best way to solve your concerns for flexibility and comfort of the user is to certainly allow them to define their bindings as you have described. Whether you opt to do this through a configuration file they manually edit or an in-game screen that allows them to select the action and then press the key configurations for said binding is entirely up to ...


2

It depends on the keyboard in question. There are certain combinations of keys that don't result in all the keys registering as pressed. For example, pressing A and Q at the same time might only register Q. Since this depends on hardware details, there's no one solution for you. One good solution I saw was the KeyJam for Star Control 2's Super Melee mode. ...



Top 50 recent answers are included