Giter Club home page Giter Club logo

linbound2's Introduction

LinBound2

Github Actions build status Appveyor Build status Snap Status Quality Gate License

LinBound aims to be an open-source clone of the game GunBound, a multiplayer turn-based arcade game with a gameplay very close to Worms, Hedgewars or WarMUX. It is primarily targeted to Linux but it aims to be as cross-platform as possible.
This repository is an attempt to start again implementation from a clean state, using more state-of-the-art software engineering and coding practices.

Documentation

Please see the wiki for more information about the goals of this project, implementation details and roadmaps. Many of these can date back to 2012 or earlier, so be careful.

Dependencies

Linbound uses SDL2, SDL2_image, SDL2_ttf, SDL2_mixer, SDL2_net and SDL2_gfx.
It also relies on TinyXML2 for XML processing.
GUI subsystem will be handled by guisan (https://github.com/gbaudic/guisan).
For the server part, SQLite will be used.

Credits

Unless otherwise stated, the code is covered by the Mozilla Public License.
Some of the artwork (test maps) comes from the WarMUX project. The SDL2 libraries, TinyXML2 and Box2D use a zlib license. Guisan is under a BSD license.

linbound2's People

Contributors

gbaudic avatar

Watchers

 avatar

linbound2's Issues

Sprite class

Add a base class for animated 2D objects (aka Sprites). All steps have the same duration, specified on construction. Drawing a Sprite requires setting the right SDL_Rect to show the right step AND the right state.

Chat manager

Implement a management class, to reopen conversations when a new message arrives and start new ones if necessary. No messages will be recorded server-side: if you try to reach a player who is not connected, the messages are lost.

Use a context stack

It would be useful to keep the previous contexts, so we can get back to them without necessarily losing the state. To do this, instead of the current state of a single pointer, using a stack would be beneficial. The only edge case here is when you want to leave a room while playing, which should move you back to the room list instead of the lobby.

Common classes

Factor the parts in classes representing objects shared between the client side and the server side which are needed on both sides.
Such classes include:

  • player
  • room
  • server

Game view

Obviously the most important one. Should feature a scrolling background, with possibilities to move by putting the pointer at the edges of the screen.

Game map class

Store a game map. On construction, parse the whole XML description file, but only load the preview. Offer a method to load the rest. Be able to destroy terrain (SDL2_gfx filledCircleColor will be useful, but we will have to use internal textures and probably a dedicated renderer to a texture to make this work).

Appveyor use

Once #1 is completed, set the project to use Appveyor for Windows CI.

Chat balloon

New UI component: chat balloon. Make the text appear character by character, lines of 20 characters max, 10 char/sec. Once fully displayed, must be kept visible in full for 5 seconds. At most 1 balloon per player at a time: if a new one arrives, destroy the previous one.

Network manager

Manage the different requests sent, check timeouts, repeat timed out requests and create listeners for the various message types (chat, user shots...). Be the interface between the network and classes inside the software which need to send/receive messages.

Room creation dialog

From the server view, it should be possible to create a new room. Required info is:

  • name
  • password (can be left empty)
  • map
  • sudden death type
  • sudden death delay
  • size

SQLite support

At the server side, it may be necessary to have a database in order to store user data, avatar item list and manage rooms currently being played.
Because the traffic and update requests are likely to be quite low, and to keep software requirements low too, I plan to include SQLite.

Toggle button

GUI improvement for #11, may be better in guisan.
In #11, there could be a filtering option to select which types of rooms you want to see. Implementing this with checkboxes would be possible, but less elegant.

Colorkey management

On some machines, the colorkey is not taken into account. This is especially visible with the mouse cursor.

User item list

Be able to load the avatarlist.xml into the system, so we can fetch an item when needed. Key is a unique identifier (Uint16), attributed in sequence. As with game maps #12, only load the actual image data when requested.

Install target in CMake

Before envisioning packaging for Linux (RPM, DEB...), an installation target needs to be set for Linux in CMakeLists.txt. Related to #1.

CMake compilation

Use CMake instead of autotools to ease multiplatform compilation.

Colorkey management

On some machines, the colorkey is not taken into account. This is especially visible with the mouse cursor.

Server list

Write the view for the list of servers.
A quick note:

  • for the LAN operation mode, a broadcast message should be sent on startup so that local servers can announce their presence
  • for the WEB operation mode, we should rely on a hardcoded list of servers (or on a configuration file).

In both cases, it should be possible for the user to specify manually the IPv4 of a server to connect to.
The LOCAL operation mode directly jumps from the menu to a room, hiding the fact that it actually connects to a server running locally and creates a new room in it, then joins this room.

Room button

Useful for #11, the Room button should be able to feature basic data about a game room prior to entering it:

  • number
  • title
  • show if password-protected
  • current status
  • current map being played
  • number of players in it / capacity.

If possible, right-clicking on it should toggle an extended view showing who is actually inside.

Room list (server view)

Shows the different rooms, buddy list, communication channel, list of connected players. Allows access to the item shop. Allows to create a new room.

Results dialog

When a match is over, this dialog should pop up with the gained money and experience for each of the players. For simplicity, no order is implemented, the only requirement is that winners and losers show up in two different columns.

  • Add an extra mode in RoomView for when this window is displayed
  • Auto click on OK (only button) after a short delay closes the window and transitions back to the lobby
  • The PlayerResults struct should be used here.

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.