Skip to content
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

Loading stories #8

Open
cheapjack opened this issue Aug 29, 2017 · 5 comments
Open

Loading stories #8

cheapjack opened this issue Aug 29, 2017 · 5 comments

Comments

@cheapjack
Copy link
Contributor

Hey @cefn Im doing a talk on friday about Milecastles and avatap; wanted to play through a game in the talk in emulator. I pulled latest stuff from your repo and emulator loads ups but cant seem to get any of the game text... just the lift & replace interactions...

Am I right in thinking I need to change
storyUid = "arbeia" on Line 5 of avatap/python/loader.py to load the different games before running python3 host.laptop?
with arbeia and corbridge it wont seem to actually get to any game text.

Imagine cos you were focussing on speed timing etc but any chance you could advise on me getting the game text running in the emulator?

@cefn
Copy link
Owner

cefn commented Sep 4, 2017

Just getting back to this. Sorry for not being able to hit the right timings for presenting the emulator. Hoping you figured it out. By the time I had a chance it had already passed.

The local copy I have is apparently synchronized with my remote repository and works just as you describe - change the storyUid and it should simply run.

Wasn't able to recreate the issue as you describe when running host.laptop as a 'Run Configuration' from within PyCharm which is how I do the development, with the 'working directory' as avatap/python.

It wasn't indicated in your report how you were running the emulator or what error, if any, you were seeing on the console. I would imagine the UI behaviour you describe would have been associated with some kind of printed error.

I just tried running it from the console (which is I guess how you are running it) and experienced apparently the same UI issue of no template text appearing. It printed an error (which I guess was appearing in your console when you ran it), like...

FileNotFoundError: [Errno 2] No such file or directory: 'templates/t_arbeia_landing_template.py'

This was to do with the directory I tried to run it in for the first time, which was not the parent directory of templates/. The moment I ran it from the avatap/python directory, (which contains the templates directory) everything worked.

For reference, I'm able run the emulator successfully using the console invocation below. Change the first cd command to point to the parent directory containing all the project git repositories, and all the other paths should line up OK...

cd /home/cefn/Documents/shrimping/git/; export PYTHONPATH=`pwd`/avatap/python/:`pwd`/micropython-st7920:`pwd`/bitfont/python; cd avatap/python; python3 -m host.laptop

@cheapjack
Copy link
Contributor Author

Thanks for getting back! I do all you suggested already from terminal (console on mac) and run it in the avatap/python dir where the templates are visible (pwd doesnt really have right effect on exporting the paths for bitfont and micropython but I do that anyway with $ export PYTHONPATH=$PYTHONPATH:../../bitfont/python:../../micropython-st7920
I dont get the FileNotFoundError: [Errno 2] No such file or directory: 'templates/t_arbeia_landing_template.py' error. What's odd is it runs fine but just wont seem to render the template text..

and the only printouts I get are CARD REMOVED so seems to be finding no errors but no text displays in the pyglet window apart from the LIFT AND REMOVE instructionals...

@cheapjack
Copy link
Contributor Author

What i do get is

CheapBook:python Power5$ python3 -m host.laptop
2017-09-05 12:29:35.419 Python[20673:704326] ApplePersistenceIgnoreState: Existing state will not be touched. New state will be written to /var/folders/wc/j5861hsx0v97stkbg20qzn700000gn/T/org.python.python.savedState

@cefn
Copy link
Owner

cefn commented Sep 5, 2017

Try a pull from the micropython-st7920 repository at https://github.com/ShrimpingIt/micropython-st7920 . My suspicion is that there was a missing checkin (which I had locally) which inverted the colouring for the new plotting logic, although I thought that had been added in. Probably everything is being painted white on white, with only the inverted text appearing (which given the incorrect logic is appearing as black on a white box, instead of white on a black box as intended).

@cheapjack
Copy link
Contributor Author

That was it! Thanks! Great wanted to get it up so we could write another game at some point :)
People got the idea of avatap at the talk last week though and got some pings of interest, but no money sadly yet. Looking at doing library stuff in later oct/nov

cheapjack pushed a commit to cheapjack/avatap that referenced this issue Dec 5, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants