Giter VIP home page Giter VIP logo

Comments (18)

boskee avatar boskee commented on July 21, 2024

Key bindings can (will) be adjusted in the menu. Sounds good otherwise.

from minecraft.

BertrandBordage avatar BertrandBordage commented on July 21, 2024

Great :)
I start working on it right now!
I will however implement key bindings with names, since it's fairly easy. Something like:

default_key_bindings = {
    'move_forward': key.W,
    'move_backward': key.S,
    […]
}
for control, default in default_key_bindings.items():
    key_name = config.get('Controls', control)
    key_code = getattr(key, key_name, None)
    if key_code is None:
        # Handles cases like pyglet.window.key._1
        key_code = getattr(key, '_' + key_name, default)

OK?

from minecraft.

boskee avatar boskee commented on July 21, 2024

Do it!

from minecraft.

BertrandBordage avatar BertrandBordage commented on July 21, 2024

Two first steps achieved with 961a1ed and cc1de58.

I also found out why some parameters were ignored (like "disable-save" or "game-mode") since a few days. Overriding global variables was messy. I fixed it. The lesson I learned is to never use the "global" keyword or "from globals import *" again.

from minecraft.

boskee avatar boskee commented on July 21, 2024

global keyword is bad in pretty much every language (that I used), hence why I tried to move as much as I could into config object. Not sure about "from globals import *" tho?

from minecraft.

tfaris avatar tfaris commented on July 21, 2024

Only reason I can think of is if you import * you can't then set the imported variables, because they'll only be set in the local scope instead of at the globals.py module level.

from minecraft.

boskee avatar boskee commented on July 21, 2024

Yeah, just figured it out. You basically import everything from global into the local scope, so what was globals.SOME_VARIABLE is now local_scope.SOME_VARIABLE. Makes sense.

from minecraft.

BertrandBordage avatar BertrandBordage commented on July 21, 2024

@tfaris is right. That's why we lost all the settings that were using global. And if we consider that we can use from globals import * to read variables and import globals to set them, this makes 2 ways to use these variables, which will mislead everyone (as it was the case).

from minecraft.

BertrandBordage avatar BertrandBordage commented on July 21, 2024

One more step achieved with 98d7747 and dd1e3e7.

from minecraft.

ronmurphy avatar ronmurphy commented on July 21, 2024

Damn. ok, so should i start editing like crazy on my end, or ... yeah, i want to keep the blocks that i did today, and toolset, but how can i update to what you have here?

Or should i just wait a it more?

from minecraft.

BertrandBordage avatar BertrandBordage commented on July 21, 2024

I'm still working on this whole issue. Have you committed your changes? If not, do it.
Then you can fetch my changes to your repository using git pull. If there is a conflict, you will have to fix the changes to merge our changes. Then, test the game. If it doesn't work, try to fix it. If you don't know how to fix it or even if it works, do a pull request, so we can see what to do.
You know, maybe you should ask for a PyCharm license (or at least try it for 30 days). PyCharm tells you when you make obvious mistakes and eases git a lot. This could really help you.

from minecraft.

BertrandBordage avatar BertrandBordage commented on July 21, 2024

(Oh god, the last part of my previous message looked like I was trying to convince you to go to a retirement home ^^")

from minecraft.

ronmurphy avatar ronmurphy commented on July 21, 2024

LOL! No, it is ok! I have PyCharm installed now, going to use it for a week to see hwow i like it :D

from minecraft.

boskee avatar boskee commented on July 21, 2024

Sorry, I can't help you as I only use command line. I find it easier than any 3rd party client. You just do:

git pull (to fetch the latest revision)
git commit -a -m "Commit message" (to commit your changes)
git push origin master (to push changes to github)

from minecraft.

BertrandBordage avatar BertrandBordage commented on July 21, 2024

Two more steps: cf0ccd6 & a5e6a98

from minecraft.

BertrandBordage avatar BertrandBordage commented on July 21, 2024

One major step: 3b66650.

Only one thing left: move command-line parameters width, height, show-gui, draw-distance, fullscreen, save-mode & motion-blur to game.cfg.

from minecraft.

BertrandBordage avatar BertrandBordage commented on July 21, 2024

More steps: 1c56c4b, 7d49348, 579dfd6, 8699a6e, 6adee76, 103781b & 8a60d99.

from minecraft.

BertrandBordage avatar BertrandBordage commented on July 21, 2024

Final steps: 688c50e & d2f95f6.

from minecraft.

Related Issues (20)

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.