GithubHelp home page GithubHelp logo

szxc-wg / localgen-new Goto Github PK

View Code? Open in Web Editor NEW
14.0 14.0 6.0 46.11 MB

Offline version of https://generals.io named LocalGen. Feel free to play with robots or friends under the same LAN.

License: MIT License

cpp cpp14 fast-paced-game generals-io local-game websocket xege

localgen-new's People

Contributors

appofficer avatar chrhaa avatar ihave4oranges avatar ktq1124298818 avatar nfls20210805 avatar xiaruize0911 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

localgen-new's Issues

Program crashing in web game

When a player is playing web game function, the client will suddenly crash in game. The time it crashes is uncertain, but it'll crash most of the time and crashes more quickly on faster computers. The problem exists in v4.0.0.

Game Robot Collection

If this issue is open, then the post below will take effect.
But if this issue is closed, then the post below won't take effect and we won't handle your robot requests.


We are now allowing contributing robots to the project LocalGen!

Your robot must fit in these rules:

  1. The robot always obey the game rules.
  2. The robot is written in the C++ language (that LocalGen is written in).
    Other languages are not allowed, unless it fits in the grammar of C++ (for example, the C language).
  3. The robot is written in a single .hpp file and the file's name is the robot's name.
  4. The robot is written in a namespace of which name is the same as the robot's name. (for example, the robot smartRandomBot is written in namespace smartRandomBot.)
  5. The robot's main function is like this:
    namespace botName {
        moveS calcNextMove (int playerId, coordS playerFocus);
    }
    which returns a moveS with two paremeters int and coordS.
    About what struct moveS and struct coordS are, see the project codes.

You can fork a copy of the project to write your own robot.

When you finished, you can create a pull request to merge your robot branch to the project.

The LocalGen developing team will test your robot and (probably) merge your robot.

Then, your robot will appear in the next version of LocalGen.


If you still have any problems, you can comment below.

Army location swapping

In the game, if two players have their army next to each other, and if they next step go to the other's place, the two player's army will stay the same, but location swapped. But according to game rules, the two armies should bump into each other and cause a subtraction of the two armies.

Replay showing wrong map

The replay system got something wrong when analysing the replay. It will give a wrong answer when starting from the beginning, but stay right when jumping turns.

Bot showing error in replay

image

At the top right corner, it shows that all the players were played by "smartRandomBot". It is wrong as the red one must be "HUMAN".

Invalid macro name

Maybe the macro names of the files contain invalid characters such as `-' in "LOCALGEN-NEW_PRIVATE_H".
When i use the Dev-Cpp to compile it, it warns "extra tokens at the end of #ifndef".
It means that it only checks if macro name "LOCALGEN" exists or not, but not "LOCALGEN-NEW_PRIVATE_H".
The macro checking might be useless.

About game rules

In the real generals.io, players can move their armies twice in a turn, but in LocalGen, we can only move once.

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.