lettis / kubix Goto Github PK
View Code? Open in Web Editor NEW3D OpenGL implementation of the board game Tactix/Duell with AI
License: GNU General Public License v3.0
3D OpenGL implementation of the board game Tactix/Duell with AI
License: GNU General Public License v3.0
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.
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.
Steps to reproduce: Play extremely fast, always making a move as soon as you are allowed to. Problems that occur may include
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!
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.
it makes more sense to call opengl objects 'models' to discriminate them from other objects...
The current coding convention is inconsistent - sometimes, getter functions are named "getX()" [Tile], while sometimes they are simply called "x()" [DieState].
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 to support dynamically setting color in rendering (e.g. for multi-colored objects) while keeping picking mode functional
Playing against each other via local network and over the internet.
In the current code, the function names are somewhat inconsistent and misleading:
All of these should be cleaned up and renamed consistently!
[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":[]}}
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.
king slain is ok, but king on other king's field not...
The current definition of aiDepth is not transparent to the user - how many moves are actually computed?
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.
they killed my desktop...
reproduce:
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.
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":[]}}%
when clicking on an object, background color turns from grey to black and objs. are sometimes not recognized.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.