GithubHelp home page GithubHelp logo

optimuspi / sko Goto Github PK

View Code? Open in Web Editor NEW
10.0 4.0 1.0 88.45 MB

Stick Knights Online - 2D Side-Scroller Stickman Online Role Playing Game

License: GNU General Public License v3.0

C++ 35.33% Makefile 0.04% Objective-C 1.19% C 63.40% GLSL 0.04%
game stick-knights-online 2d-game 2d linux windows mac ubuntu tile platformer

sko's People

Contributors

leehorobin avatar optimuspi avatar rchaud99 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

jacobodden

sko's Issues

Throwing trophies while typing

While the user is typing, if he or she types 'r', the character throws the trophy. This should only happen when not typing.

Deposit selector for shops, banks, trading, inventory, etc. Needs 'X' selection

Using multiple items in the mentioned areas becomes cumbersome with amounts such as 999, for example.

To deposit 999 items, a user would have to:
-Click Deposit 100 items 9 times
-Click Deposit 10 items 9 times
-Click Deposit 1 items 9 times

Enhancement is to allow user to click either a value higher than the amount desired to deposit (1000, 10k, 100k, etc.) and have the items deposited. The user could also click 'X' deposit selector and type in 999 for example.

Also...
It would be really nice to Shift+Click to deposit all of the selected item into the bank, as well as trading and shops.

Item Thumbnail appears when dragging empty box

  1. When dragging from inventory empty square, the picture of a gold coin is shown on the mouse.

  2. When emptying all of a certain item, and then dragging from the box the item was in, the item is still shown on the cursor.

User input bindings.

Some users may not use qwerty (one popular player uses dvorak)

It would be great to allow the user to set their own controls. Save these settings in a user profile file.

Controls such as WASD for movement, Ctrl and Alt for attack, F1, F2, F3, etc. for some UI toggles.

Map Switching could be smoother

When switching maps, the client could handle it more elegantly.
There is a "flash" where nothing displays except the background and clouds.
This is likely because the X and Y of the player is unknown until it finishes loading.

Organizational Proposal

Organizational Proposals

Overview

We have discussed multiple times before the possibility that I try and help withdevelopment of SKO in any way I can. With no real familiarity with how the project is structured, I figure starting out with some documentation will be a good first step.

Hopefully, helping to write some documentation will allow me to familiarise myself with the code structure as well as make it more accessible to anybody else who would like to contribute.

Before getting started in too much detail, or committing any changes to the codebase, I would like to propose some changes in order to make collaboration and organization as easy as possible.

Please do comment with any disagreements or thoughts you might have. :)


Proposed Project Organizational Changes

Documentation Strategy

I would like to propose implementing a documentation generator in order to force documentation to be consistent across the project and to allow easily publishing in HTML etc.

For example: http://www.stack.nl/~dimitri/doxygen/

Styling Consistency

Agreeing on certain styling conventions to follow will help to make collaboration easier, providing consistency and ensuring an effort is made to keep the project well structured and maintained.

Perhaps [https://google.github.io/styleguide/cppguide.html](Google's C++ Style Guide)

I do not necessarily mean religiously following every single little rule, more so agreeing on things like indentation strategies etc.

Two space indentations with no tabs :D. Editor configured to input spaces in place of tabs, that kinda thing.

Folder Structure

I would also like to propose reorganising the project folder structure slightly. Something like this:-

Directory Contains
./ Makefiles, readme's, git files
lib/ Project sources prividing an interface/api, OPI_Image, SKO_Shop etc
src/ Project source files
bin/ Any binaries, sko.exe, DLL's, that kinda thing
configs/ Configuration files, ini's, maps
thirdparty/ Third part sources, for example the INI parsers

SKO_Client
├───bin
├───client_resources
│ ├───image
│ │ ├───GUI
│ │ └───TILE
│ └───sound
├───config
│ ├───data
│ └───maps
├───lib
├───src
└───thirdparty

Trophy does not animate correctly when attacking

2018-03-11 09_39_28-stick knights online v1 2 0 mar 9 2018

When holding an item in your hand, the trophy does not animate correctly when attacking. Perhaps I animated a Y-value instead of an X-value. Here is an attached screenshot showing this in action.

Upgrade to SDL 2

Upgrading again to SDL2 libraries.

Need to add documentation so it's easier for people to compile.

Convert options.dat to options.ini format

Take advantage of the .INI parser and convert this binary save file to .INI format.

This will be easier to read and also easier to edit manually by the user.

Options.dat is used for master mute, music mute, and sound effects mute. It should be expanded to include more options, perhaps.

Sign issues

The user can no longer click on or read signs when:

  1. Standing on a sign and clicking on another
  2. Standing on a sign and clicking x to close

Possibly more, will add as I find them.

Better input handling

Instead of calling the input handler from different areas of the code, make a thread that always checks. Not sure how fast to check, but could get by with between 100 to <=1000 times per second.

There should be at least 1 millisecond sleep. Checking returns nearly instantly if there was no input. Change if statement to while loop so it runs "faster" if there is more input to process.

This is important for blocking functions such as reconnect with 10 second timeout: that's 10 seconds of input blocking that prevents the user from closing the client. That is not acceptable.

Make input handle checking its own thread and be done with it. :)

OS Specific Directives: Find solution to rendering hack.

There is an OS-specific directive to tell the compiler which chunks of code to use.

This is a nasty hack because I don't know why it works or how exactly to fix it, although it shouldn't be too hard and probably will speed up the game performance anyway.

Look for the string: [#if MY_OS]

Examples:

main.cpp:7869
void physics()
{
# if MY_OS == LINUX_OS


HandleUI();

# endif

main.cpp:7744
while (timestep->Check())
          {
            #if MY_OS == WINDOWS_OS
             HandleUI();
            #endif


        #if MY_OS == MAC_OS
         HandleUI();
        #endif

ipv6 support

Some day, need to change to a different networking library that has ipv6 support.

Picking up thrown trophies displays an incorrect value on the client side.

image

When throwing some of my 54K snowball trophies, the inventory shows 54K.
When picking one trophy up, the value goes to about 114K. When picking another up, the value goes to 11M.

When throwing a trophy that falsely displays as 11M, etc, the value corrects back to 54K indicating the server value is correct and the client is reading the pick-up value wrong.

Networking Refactor

Refactoring of the networking methods and logic in to a dedicated class.

Include methods for building and sending packets (removing those packet codes from the global namespace!), and handling any network events.

Enhancement - Open signs by touching them in addition to existing functionality.

There is current functionality to open signs by clicking them, and close the dialog box by clicking the 'x' in the corner.

Keep this functionality, but make it so signs automatically open when you touch them, and close when you walk away from them. Perhaps tie into the collision detection, follow code such as Target collision detection.

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.