-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Community] Loading screen and menu screen and pause screen #61
Conversation
The world saving is defiantly quicker than the loading |
There is no joystick support for the buttons yet :( |
Cool! I'll check it out in a bit.
That makes sense, all saving does is save block ID's of modified chunks, whereas loading has to load every chunk & generate their meshes, which is the most computationally expensive part.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good!
A couple other things I wanted to note:
- When the game starts loading, it should be paused by default.
- Resizing doesn't work properly anymore (
on_resize
removed?).
Overall nice work!
self.texture_manager = texture_manager.TextureManager(16, 16, 256) | ||
class MenuScreen(Scene): | ||
def __init__(self, window): | ||
image = pyglet.image.load("textures/dirt.png").get_texture() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably set magnification filtering to GL_NEAREST
(see episode 5).
if texture is None: | ||
self.texture = pyglet.image.SolidColorImagePattern(convert_hashColor_to_RGBA(color)).create_image(width,height) | ||
else: | ||
self.texture = texture |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Texture should be tiled. Not sure how such a thing could be done easily with Pyglet, but you can set a texture to repeat in OpenGL like so:
gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_WRAP_S, gl.GL_REPEAT)
gl.glTexParameteri(gl.GL_TEXTURE_2D, gl.GL_TEXTURE_WRAP_T, gl.GL_REPEAT)
(Don't forget to bind the texture obviously.)
Thank you, will try do them :) |
how do i merge them into my branch? |
Pardon, how do you merge what into your branch? |
your sugesstions |
There should be? Idk it works for me |
@drakeerv but no support for my GUI clickable buttons yet |
Ah I will try to get it working if I have free time |
Ah well you can't "merge" those. You can address them by simply committing to your branch though. |
I recommend adding the "Loading world" text just when clicking on "singleplayer" to prevent people getting confused why the game is suddendly freezing |
@Jukitsu I will do that once I've done the other stuff |
on_resize is missing on the main window |
"refresh rate" is unnecessary |
and toggle fullscreen needs "window.set_fullscreen" isntead of self.set_fullscreen |
@Jukitsu quick tip: you can make a review for that kinda stuff instead of putting everything into individual comments |
Most things are done now |
Will take a look later today. Could you tell me which changes you made to the world save? There seem to be some conflicts. |
Just added a hidden jukebox somewhere to find. it's quite easy to find tho |
Right. I'll have to see if there's a way/write a program to easily merge Minecraft worlds because obviously git can't do that on its own 😄 |
Still don't have a working on_resize implementation for the menus/buttons but the main game sill rezies |
here's a good font: https://www.dafont.com/grand9k-pixel.font (click download btn there) then use font in pyglet |
In Minecraft, that's not how it works (as far as I know). It is not paused by default (when I say paused, I mean the pause menu is on screen). |
wdym? easter egg? noice |
If the world is still loading, then I do think it should be paused for better user experience. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The code is not proper. It crashes the whole computer, windows 11, python v 3.9
@aniketm32012 The last time I tried it, it did work. But that was ages ago and pyglet may of changed somethings. Does the normal version (from obiwac) work? |
Closing in favour for #104 |
Currently the menu background is not tilled and the single player button once clicked the game freezes then the world loads. Buttons do not work properly if window scaled
Still execute main.py to run it