kitao / pyxel

A retro game engine for Python
MIT License
14.6k stars 826 forks source link

After warpping the glfw,it does help import pyxel,but the pyxel window doesn't work #69

Closed Hyfred closed 6 years ago

Hyfred commented 6 years ago

Firstly, I down the pyxel wrap, then i have try to import pyxel, but it shows "Failed to load GLFW3".So I load the glfw, it also doesn't work. After searching the problem, i went to the computer'path add the environment of the glfw. The function of "import glfw" and "import pyxel" does work. But after "pyxel.init(160, 120)", the pyxel window is black . Then It shows no response. Please help me solve the problem

shivanju commented 6 years ago

Can you post the screenshot or traceback when you try to run basic examples?

Hyfred commented 6 years ago

@shivanju I forget to mention that I can't install the example, how to use the code "install_pyxel_examples"? And I just follow the "How to Use" step one "Create Pyxel Application". Then it jumps the pyxel window like that.

Hyfred commented 6 years ago

@shivanju

_20180913230742

Could you help me?

Hyfred commented 6 years ago

@kitao can you help me solve this problem?

timbledum commented 6 years ago

That looks like it's working fine from the screenshot. What are you expecting to see?

What operating system are you using?

After installing pyxel, just type "install_pyxel_examples" at the command line / terminal. If you're really struggling, try cloning this repository and navigating to the examples folder to check the examples out.

screen shot 2018-09-19 at 6 10 41 am
shivanju commented 6 years ago

@Hyfred Your screenshot looks fine to me. That sample code only does that. Can you try running some examples and see if there is some problem with those.

Hyfred commented 6 years ago

@timbledum I use window10. And i typed "install_pyxel_examples" in the command line succseefully. But after that, i don't understand how to use the pyxel module. following the step"Create Pyxel Application". It still has something wrong. "SyntaxError: unexpected EOF while parsing"

1 2 3
timbledum commented 6 years ago

I think the issue is with how you're running the code rather than the code itself. I think the issue is that you're running the code line by line in the console box, rather than running the whole file as a whole.

If you go to the command line and use python untitled1.py once you've saved the file, that should work! I wouldn't recommend Spyder TBH.

Try this at the command line!

cd pyxel_examples
python 02_jump_gamel.py
Hyfred commented 6 years ago

@timbledum thanks your instuction!! Now I can open the example window. And then how can I try playing the game by myself

111

?

Hyfred commented 6 years ago

@timbledum [Facepalm] I get it!! thanks thanks!! i thought it just an example by the AI to show the game rule. But now i understand it operates by the player!!

Hyfred commented 6 years ago

@shivanju thanks your instruction!! Now I can use it !! [Facepalm][Rose][Rose]