Giter Site home page Giter Site logo

kubix's People

Contributors

cburgard avatar lettis avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

kubix's Issues

camera control by keypresses

It's annoying that you can only rotate the camera by right-click-drag. On some touchpads, that doesn't work. Rotating via arrow key presses should be possible.

switch to vbo rendering

glBegin(...), glEnd(), glVertex3*, etc. are deprecated and probably won't be available in future OpenGL versions, resp. are already not available in recent versions of OpenGL ES.

use vbo rendering instead.

Bug: fast-play triggers various problems

Steps to reproduce: Play extremely fast, always making a move as soon as you are allowed to. Problems that occur may include

  • game inconsistency (skipped turns)
  • false victory ("the computer gives up" without apparent reason)
  • crashes (gazillions of message boxes cause memory overflow)

ai parallelism

Modern computers have multiple cores, but we're only using two of them (one for UI, one for AI). The AI can (and should) use multiple cores if available!

switch timer for opengl rendering on/off depending on need

opengl refresh is only needed, if there is an animation, a user-interaction or another kind of interrupt.
we should switch the refresh off in case there is no such event to save cpu cycles.
in case of an event, we switch the timer on again, until interrupt / animation is over.

Coding Conventions Consistency

The current coding convention is inconsistent - sometimes, getter functions are named "getX()" [Tile], while sometimes they are simply called "x()" [DieState].

nicer / better graphics

need, e.g., special 'king field' to show, where you can win, if you want to move your king on opponent's field.

change color management

change color management to support dynamically setting color in rendering (e.g. for multi-colored objects) while keeping picking mode functional

Networking

Playing against each other via local network and over the internet.

General Code Cleanup in GameWidget

In the current code, the function names are somewhat inconsistent and misleading:

  • What does update() do? Only graphics buffer update? Or general game Update? (Hint: the latter is the right one.)
  • What does _needUpdate() refer to? Only graphics buffer, or general game? (Hint: the first one.)
  • What about _updated()?
  • What about _autoUpdate?
  • What about autoRefresh()?
  • What about changed()?

All of these should be cleaned up and renamed consistently!

crash when losing

[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
Kubix: Fatal IO error: client killed
Kubix: xcb_io.c:179: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed.
zsh: abort (core dumped) ./Kubix

{"mode":0,"next":-1,"aiDepth":2,"aiStrategy":{"name":"default","coeffDR":1,"pat":0.95,"rnd":0.01},"dice":[{"x":0,"y":0,"col":1,"fS":23,"cS":19},{"x":1,"y":1,"col":1,"fS":9,"cS":9},{"x":2,"y":2,"col":1,"fS":17,"cS":25},{"x":3,"y":0,"col":1,"fS":22,"cS":22},{"x":6,"y":1,"col":1,"fS":24,"cS":24},{"x":6,"y":4,"col":1,"fS":14,"cS":19},{"x":6,"y":0,"col":1,"fS":9,"cS":5},{"x":7,"y":1,"col":1,"fS":9,"cS":9},{"x":8,"y":0,"col":1,"fS":19,"cS":19},{"x":0,"y":8,"col":-1,"fS":17,"cS":17},{"x":1,"y":8,"col":-1,"fS":17,"cS":3},{"x":2,"y":8,"col":-1,"fS":19,"cS":7},{"x":3,"y":4,"col":-1,"fS":18,"cS":23},{"x":4,"y":8,"col":-1,"fS":24,"cS":24},{"x":5,"y":8,"col":-1,"fS":8,"cS":23},{"x":5,"y":7,"col":-1,"fS":10,"cS":21},{"x":7,"y":8,"col":-1,"fS":3,"cS":3},{"x":2,"y":2,"col":-1,"fS":0,"cS":7}],"history":{"moves":[{"idx":5,"rel":{"dx":-1,"dy":0,"fX":1}},{"idx":12,"rel":{"dx":-1,"dy":1,"fX":1}},{"idx":4,"rel":{"dx":1,"dy":0,"fX":1}},{"idx":15,"rel":{"dx":-1,"dy":-1,"fX":0}},{"idx":4,"rel":{"dx":1,"dy":0,"fX":1}},{"idx":12,"rel":{"dx":1,"dy":-5,"fX":0}},{"idx":5,"rel":{"dx":2,"dy":4,"fX":0}},{"idx":17,"rel":{"dx":-2,"dy":-1,"fX":1}},{"idx":4,"rel":{"dx":0,"dy":1,"fX":0}},{"idx":17,"rel":{"dx":2,"dy":-3,"fX":1}},{"idx":1,"rel":{"dx":0,"dy":1,"fX":0}},{"idx":17,"rel":{"dx":-2,"dy":-1,"fX":0}},{"idx":7,"rel":{"dx":0,"dy":1,"fX":0}},{"idx":17,"rel":{"dx":-4,"dy":-1,"fX":0}},{"idx":2,"rel":{"dx":0,"dy":2,"fX":0}}],"deaths":[-1,-1,-1,-1,-1,-1,-1,2,-1,-1,-1,-1,-1,-1,-1],"movesPending":[],"deathsPending":[]}}

object serialization

suggested format:

  bool read(istream& is);
  bool write(ostream& os);

returning true on success and false on failure.
implement for Vector, RelativeMove, Move, Game and every other class that needs to be serialized.

suggested marker between objects: \n
suggested marker at end of list: additional \n, i.e. \n\n after last object.

end-marker for serialization should be globally available inside KBX-namespace for easy change.

memory leak in evaluation

there seems to be a memory leak when evaluating moves.

reproduce: set level high ( >= 5) and evaluate a move.
expected memory consumption should be much less than real consumption.

serialization: use correct json

currently the format is similar to json, but not quite the same.
keys, e.g. have to be written as strings: {"key" : number, "key2" : "string"}
test against python-json parser.

Kubix crash

Initial crash message was

[xcb] Unknown request in queue while dequeuing
[xcb] Most likely this is a multi-threaded client and XInitThreads has not been called
[xcb] Aborting, sorry about that.
Kubix: xcb_io.c:179: dequeue_pending_request: Assertion `!xcb_xlib_unknown_req_in_deq' failed.

Upon opening savegame (attached), the following happens:

X Error: BadImplementation (server does not implement operation) 17
Major opcode: 20 (X_GetProperty)
Resource id: 0x0
Kubix: Fatal IO error: client killed


{"mode":0,"next":-1,"aiDepth":2,"aiStrategy":{"name":"default","coeffDR":1,"pat":0.95,"rnd":0.01},"dice":[{"x":0,"y":0,"col":1,"fS":1,"cS":19},{"x":1,"y":0,"col":1,"fS":9,"cS":1},{"x":2,"y":2,"col":1,"fS":12,"cS":17},{"x":3,"y":0,"col":1,"fS":18,"cS":22},{"x":4,"y":3,"col":1,"fS":24,"cS":24},{"x":5,"y":0,"col":1,"fS":1,"cS":22},{"x":6,"y":2,"col":1,"fS":22,"cS":17},{"x":7,"y":0,"col":1,"fS":1,"cS":1},{"x":8,"y":0,"col":1,"fS":11,"cS":19},{"x":0,"y":8,"col":-1,"fS":17,"cS":17},{"x":1,"y":8,"col":-1,"fS":3,"cS":3},{"x":2,"y":8,"col":-1,"fS":19,"cS":7},{"x":3,"y":8,"col":-1,"fS":6,"cS":23},{"x":4,"y":8,"col":-1,"fS":24,"cS":24},{"x":5,"y":8,"col":-1,"fS":4,"cS":23},{"x":6,"y":8,"col":-1,"fS":7,"cS":7},{"x":7,"y":8,"col":-1,"fS":3,"cS":3},{"x":3,"y":4,"col":-1,"fS":3,"cS":3}],"history":{"moves":[{"idx":4,"rel":{"dx":0,"dy":1,"fX":0}},{"idx":17,"rel":{"dx":-3,"dy":-1,"fX":0}},{"idx":4,"rel":{"dx":0,"dy":1,"fX":0}},{"idx":17,"rel":{"dx":4,"dy":-1,"fX":0}},{"idx":4,"rel":{"dx":0,"dy":1,"fX":0}},{"idx":17,"rel":{"dx":-2,"dy":-1,"fX":0}},{"idx":2,"rel":{"dx":0,"dy":2,"fX":0}},{"idx":17,"rel":{"dx":-4,"dy":-1,"fX":0}},{"idx":6,"rel":{"dx":0,"dy":2,"fX":0}}],"deaths":[-1,-1,-1,-1,-1,-1,-1,-1,-1],"movesPending":[],"deathsPending":[]}}%

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.