Closed BroadcastGames closed 7 years ago
Counterfeit Monkey is using the beginnings of my window constraints code, so that it no longer just uses half the width for the graphics window. It's also still fairly buggy.
Get your metrics right, and then see if it still produces different results from other interpreters.
Thank you again for patiently explaining these two related oversights on my part. I was stuck in the old init method thinking and did not correctly wake up and listen to the new init params.
Now I'm getting a glk window:
"graphwidth":360, "graphheight":384
With the 2nd image in the Monkey stack as:
"image":59, "width":322, "height":384
Nearly the full window I'm expecting. Using this init of an old VGA screen mode:
{ "type": "init", "gen": 0, "metrics": { "width":720, "height":400, "charwidth":9, "charheight":16 }, "support": [ "timer", "hyperlinks", "graphics", "graphicswin" ] }
Thank you, closing issue.
Thanks for jumping in on this, @curiousdannii -- I haven't had time to look at remglk since I put up the library update yesterday.
I can open a new issue if desired... Init:
{ "type": "init", "gen": 0, "metrics": { "width":720, "height":400, "charwidth":9, "charheight":16 }, "support": [ "timer", "hyperlinks", "graphics", "graphicswin" ] }
Can you guys try RemGlk + Nitfol (or any other Z-terp) with the game freefall.z5 ? http://mirror.ifarchive.org/if-archive/games/zcode/freefall.z5
rgwin_graph.c win_graphics_destroy function seems to be hard-crashing for me? signal 11 (SIGSEGV), code 1 (SEGV_MAPERR). C Monkey and others are working with Git.
EDIT: If I make win_graphics_destroy function do an immediate return, crash goes away. Must be a Alexey Pajitnov name mixup.
I'm still having problems with legacy C Monkey, this time using the Release 6 binary: http://mirror.ifarchive.org/if-archive/games/glulx/CounterfeitMonkey.gblorb - using Init:
{ "type": "init", "gen": 0, "metrics": { "width":720, "height":400, "charwidth":9, "charheight":16 }, "support": [ "timer", "hyperlinks", "graphics", "graphicswin" ] }
And I'm getting this image window and image data:
{"type":"update", "gen":5,
"windows":[
{ "id":38, "type":"graphics", "rock":1030,
"graphwidth":360, "graphheight":384,
"left":0, "top":16, "width":360, "height":384 },
{ "id":32, "type":"grid", "rock":202,
"gridwidth":80, "gridheight":1,
"left":0, "top":0, "width":720, "height":16 },
{ "id":29, "type":"buffer", "rock":201,
"left":360, "top":16, "width":360, "height":384 }
],
"content":[
{"id":38, "draw": [
{"special":"fill"},
{"special":"image", "image":58, "width":360, "height":193, "x":0, "y":193, "url":"file:///sdcard/blorbA/pict-58.png"},
{"special":"image", "image":59, "width":322, "height":384, "x":19, "y":0, "url":"file:///sdcard/blorbA/pict-59.png"},
{"special":"image", "image":57, "width":30, "height":30, "x":0, "y":0, "url":"file:///sdcard/blorbA/pict-57.png"},
{"special":"image", "image":24, "width":30, "height":30, "x":45, "y":264, "url":"file:///sdcard/blorbA/pict-24.png"}
] }
Now, it's the small image 57 that's way out of position, In both online GlkOte and Gargoyle-free it's actually supposed to be positioned right near the similar size 30x30 image 24. Instead, it is x:0 y:0 origin position. http://iplayif.com/?story=http%3A%2F%2Fwww.ifarchive.org%2Fif-archive%2Fgames%2Fglulx%2FCounterfeitMonkey.gblorb
Alos, If there are other story files out there with multiple images in one Glk window, please let me know. Thank you.
It would probably help to connect this up with remote-if-demo so we can see some screenshots.
Alabaster stitches together images in weird ways. Kerkerkruip uses the Glimmr framework.
Is the https://github.com/erkyrath/remote-if-demo behind on GlkOte - because it doesn't seem to want to do graphics - when fed http://mirror.ifarchive.org/if-archive/games/glulx/CounterfeitMonkey.gblorb it errors - it is working fine for advent.ulx file. I did fresh checkouts of git + glulxe + remglk + remote-if-demo to make together. Running both interpreters without remote-if-demo gets me similar to the JSON output I posted.
Ok, trying to update remote-if-demo manually:
wget https://raw.githubusercontent.com/erkyrath/glkote/master/glkote.js --output-document=./static/glkote.js
wget https://raw.githubusercontent.com/erkyrath/glkote/master/glkote.css --output-document=./static/glkote.css
It does seem to make attempts to fetch gblorb graphic images from the server - tips on setting that up? Tried:
python3 remote-if.py --debug --command='../glulxe/glulxe -stderr -resourceurl /tmp/blorbA gamefile.gblorb'
But the console for the remote-if.py shows that it is looking for GET /undefined
Yes, it was behind. I forgot to push the change that declared graphics window support. Sorry.
ok, thank you. Did a git pull. Any idea why images aren't mapping to path related to RemGlk -resourceurl param? The Python web server shows "404 GET /undefined " for each image in the story.
I took a look at this and updated the documentation. See the README file.
Thank you for the additional instructions, expanded README. Got RemGlk working with GlkOte. Here is the requested screen-shot depicting the C Monkey Release 6 small 30x30 graphics out of place:
You see the white § graphics, section sign / silcrow, way up in the upper left - where in gargoyle-free I'm seeing it right near the N graphic. This visual layout problem matches the hand-reading of the JSON posted here.
EDIT: Well, damn it, spending 15 more minutes I was able to get gargoyle-free 2011 to do the same position problem. I was hand-matching the size of the glk graphics window on the same desktop system (resizing the window) and (after the first few C Monkey prompts) typed a "restart" command to get the interpreter to go back to where RemGlk update 1 JSON comes at the new screen size -- and guess what, I can reproduce the graphic out of place in Gargoyle: - you have to slightly resize gargoyle to get it to correctly position the graphic (which when you open gargoyle-free the first time, it seems to do). So, it isn't just Remglk - sorry!
Also - did anyone get a chance to quickly try out http://mirror.ifarchive.org/if-archive/games/zcode/freefall.z5 - which is hard-crashing RemGlk for me in function rgwin_graph.c win_graphics_destroy()? Thank you.
Try the change I just committed with remglk+whatever interpreter you were using for Freefall.
Freefall crash fixed, thank you! Sorry about all the noise over layout with graphics and my confusion.
I know your code is very new and you very well may have issues you already know of. Or it could be that I'm misinterpreting something here. Prior to this, I didn't even realize that Counterfeit Monkey was putting multiple images into the same window ;)
Latest checkout, https://github.com/erkyrath/remglk/commit/65611898821b4f6c911df20f891a4e87aee5c9b7 except I did undo one single line from commit https://github.com/erkyrath/remglk/commit/4ca002581cc95132f7046d4682b3969e1c7e4c65 to get the setcolor back. Git interpreter.
Init I'm using:
And the window of concern, the map window of Monkey:
And the new graphics window content you have added to RemGlk code:
Now, the image of concern is the second image in the list. The other images are just decoration to that 2nd image (59). What's odd about it is that the map image has width:23 when the window itself is width:62. And the x:19 value seems questionable, as I think this image is supposed to be "full window". In other words, it's being told half the width of the Glk graphics window. In Gargoyle, that 2nd image is the full width of the graphics window.
Of note, this Monkey gblorb is one I compiled myself with Inform 7 6M62 off of Github on 2016-12-15 - it should be fine, as I'm directly comparing the same exact gblorb in Gargoyle for layout comparison. But, your image index numbers may be different if the gblorb is different. If you need, I can upload my gblorb here on Github. Thank you.