vladislavbelov Posted June 11, 2021 Report Share Posted June 11, 2021 If it's cold in your room, then there is the following mod. Another useless application of our engine: just ray trace a simple scene written completely on JavaScript. The mod is attached, feel free to play with it. 0ad-js-rt-demo.pyromod 0ad-js-rt-demo.zip 3 2 Quote Link to comment Share on other sites More sharing options...
nani Posted June 11, 2021 Report Share Posted June 11, 2021 Very nice, you might like to try the same with ray marching. Quote Link to comment Share on other sites More sharing options...
nani Posted June 12, 2021 Report Share Posted June 12, 2021 @vladislavbelov ok from what I understand you created a new special font where you map one glyph to one RGB color and then each line is broken with an non printable "\n" codepoint. Each glyph is just a rectangle? I wonder if it would also be possible to just use the block code character and then for each one (or range) add a <color > tag around (then no new font needed). Still don't know how you did the raytraced font. Would be cool to make these kind of posts something like an ester eggs or a 0ad blog entry. Fun nonetheless. (at first I thought you used some new pyrogenesis <canvas> object but seem not) Quote Link to comment Share on other sites More sharing options...
wraitii Posted June 12, 2021 Report Share Posted June 12, 2021 6 minutes ago, nani said: Fun nonetheless. (at first I thought you used some new pyrogenesis <canvas> object but seem not) Feels like that would be worthwhile now we have a canvas class. Drawing lines seems nice. Quote Link to comment Share on other sites More sharing options...
nani Posted June 12, 2021 Report Share Posted June 12, 2021 (edited) Uff, for some reason after using the mod alpha 24 won't work. The mod is disabled but now when 0ad 24b is open it shows a black window, nothing more, no crash, no logs. I tried deleting user config, cache. Will try to reinstall now. Edited June 12, 2021 by nani Edit, its alpha 24 not 23 Quote Link to comment Share on other sites More sharing options...
vladislavbelov Posted June 12, 2021 Author Report Share Posted June 12, 2021 18 hours ago, nani said: Very nice, you might like to try the same with ray marching. Yeah, I was experimenting with it: 2 hours ago, nani said: ok from what I understand you created a new special font where you map one glyph to one RGB color and then each line is broken with an non printable "\n" codepoint. Each glyph is just a rectangle? Yes, square for each R5G5B5. 2 hours ago, nani said: I wonder if it would also be possible to just use the block code character and then for each one (or range) add a <color > tag around (then no new font needed). It's possible but more slow, as on each frame you need to do a lot more work for rendering. 2 hours ago, nani said: Still don't know how you did the raytraced font. Just generated by a script. 2 hours ago, nani said: Would be cool to make these kind of posts something like an ester eggs or a 0ad blog entry. We don't have a blog, so I just post some of my local stuff on the forum. 2 hours ago, wraitii said: Feels like that would be worthwhile now we have a canvas class. Drawing lines seems nice. It's impossible without performance loss at the moment. 17 minutes ago, nani said: Uff, for some reason after using the mod alpha 24 won't work. The mod is disabled but now when 0ad 24b is open it shows a black window, nothing more, no crash, no logs. I tried deleting user config, cache. Will try to reinstall now. Cleaning up the cache should help, because there should be no other relation between mods. 1 Quote Link to comment Share on other sites More sharing options...
nani Posted June 12, 2021 Report Share Posted June 12, 2021 35 minutes ago, vladislavbelov said: Cleaning up the cache should help, because there should be no other relation between mods. Ok found the cause, seems some data got written to Documents/My Games/0ad/mods/user for some reason and deleting it fixed it. @wraitii you might want to check this as it I find it weird that fonts from the mod get stored there (which means that they get executed even when no mods are enabled) Quote Link to comment Share on other sites More sharing options...
wraitii Posted June 12, 2021 Report Share Posted June 12, 2021 Mh, this would make sense actually if you're not in a dev copy & the mod writes data. Edit: seeing how you played this with A24, it's definitely 'expected behaviour'. The issue is that the mod shouldn't be writing data like that tbh, but given it's a hack, meh. I dislike the user mod in general and would probably favour doing things differently, but it's not a 'bug' for now. 1 Quote Link to comment Share on other sites More sharing options...
nani Posted June 12, 2021 Report Share Posted June 12, 2021 :/ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.