Your Digital Media Has Never Looked So Good

 
User avatar
Komag
Posts: 808
Joined: Fri Aug 22, 2014 3:42 am

Re: BrightScript Draw 2D Emulator (in development)

Tue Sep 03, 2019 6:03 pm

i know I have a lot of Integer.ToStr() instances, and I also surely have a lot of IF, THEN in a single line all over the place, so maybe I'll wait for an update.

I checked the first couple errors
- One is an IF THEN on single line
- The next is complaining about text in a comment of mine, since the comment contains "If"! I have LOTS of comments all over my code, so I wonder if that will cause other problems.
 
User avatar
marcelo.cabral
Topic Author
Posts: 377
Joined: Tue Mar 20, 2012 8:53 am

Re: BrightScript Draw 2D Emulator (in development)

Wed Sep 04, 2019 1:30 am

Komag wrote:
i know I have a lot of Integer.ToStr() instances, and I also surely have a lot of IF, THEN in a single line all over the place, so maybe I'll wait for an update.

I checked the first couple errors
- One is an IF THEN on single line
- The next is complaining about text in a comment of mine, since the comment contains "If"! I have LOTS of comments all over my code, so I wonder if that will cause other problems.

Can you send me a private message with pieces of your code from both issues above? 
I want to reproduce here.
 
User avatar
marcelo.cabral
Topic Author
Posts: 377
Joined: Tue Mar 20, 2012 8:53 am

Re: BrightScript Draw 2D Emulator (in development)

Sun Sep 08, 2019 12:46 am

Image

I released the first prototype of the emulator (0.1.0 Alpha) and adapted my games (Prince of Persia and Lode Runner) to run on it. The performance is not great, as this is an interpreter running in javascript, it depends a lot on the current load of your browser and machine. The multi-room modes of PoP are really slow on the emulator.

Only Chromium based browsers are supported (more info on the link below) Please try it and give me your feedback, to run the games and the demo just click on the icons, it will download the zip and run it automatically. You can also still load your own code. This is a client-only application, no file is uploaded to the server, if you want you can get the latest release on the repository.

https://lvcabral.com/brs
 
User avatar
squirreltown
Posts: 870
Joined: Sun Apr 21, 2013 2:20 pm

Re: BrightScript Draw 2D Emulator (in development)

Sun Sep 08, 2019 1:07 pm

/brs/lib/brsEmu.min.js:33 source/Main.brs(11,25-26): 'SetPort' is not a function and cannot be called.

             
 m.screen.SetPort(m.port)

I've made a stripped-down thing, with stuff commented out, and got all the way to drawobject, so I'll have to wait for that one.
Kinetics Screensavers
 
User avatar
marcelo.cabral
Topic Author
Posts: 377
Joined: Tue Mar 20, 2012 8:53 am

Re: BrightScript Draw 2D Emulator (in development)

Sun Sep 08, 2019 8:56 pm

squirreltown wrote:
/brs/lib/brsEmu.min.js:33 source/Main.brs(11,25-26): 'SetPort' is not a function and cannot be called.

             
 m.screen.SetPort(m.port)

I've made a stripped-down thing, with stuff commented out, and got all the way to drawobject, so I'll have to wait for that one.

You can use setMessagePort() what component m.screen is ? a roScreen ? The documentation only mentions setMessagePort() and I always used it, not aware of SetPort()
https://developer.roku.com/docs/references/brightscript/components/roscreen.md
https://developer.roku.com/docs/referen ... ageport.md
I published today the full support for custom fonts, it was relying on the OS fonts only, next thing I will do will be the rgba on DrawObject()
Thanks for the feedback! 
 
User avatar
squirreltown
Posts: 870
Joined: Sun Apr 21, 2013 2:20 pm

Re: BrightScript Draw 2D Emulator (in development)

Mon Sep 09, 2019 6:54 am

Yeah, it's a roScreen.  SetMessagePort works. This thing is from 2014, you used to be able to use either ( never that clear on why there were two different ways).
I'll look forward to the RGBA fix.
Kinetics Screensavers
 
User avatar
marcelo.cabral
Topic Author
Posts: 377
Joined: Tue Mar 20, 2012 8:53 am

Re: BrightScript Draw 2D Emulator (in development)

Thu Sep 12, 2019 11:33 am

squirreltown wrote:
Yeah, it's a roScreen.  SetMessagePort works. This thing is from 2014, you used to be able to use either ( never that clear on why there were two different ways).
I'll look forward to the RGBA fix.

I'm almost done with 0.3.0 that will bring .tostr() (and all other intrinsic methods do numeric types) the missing .tokenize() (on strings) and the rgba fix too.
Just to understand better the usage of this parameter, all I ever used it was to make the crossfade effect proposted in the link below, my understanding this parameter only affects the alpha of the image, do you guys use it in other scenarios ?
https://forums.roku.com/viewtopic.php?f=34&t=64834&p=437365&hilit=drawobject+crossfade#p437365
 
User avatar
squirreltown
Posts: 870
Joined: Sun Apr 21, 2013 2:20 pm

Re: BrightScript Draw 2D Emulator (in development)

Thu Sep 12, 2019 7:19 pm

my understanding this parameter only affects the alpha of the image, do you guys use it in other scenarios ?

I use reversed/white graphics, and use it to assign a color in addition to the alpha at runtime. So, I'm using it all the time.
Kinetics Screensavers
 
User avatar
marcelo.cabral
Topic Author
Posts: 377
Joined: Tue Mar 20, 2012 8:53 am

Re: BrightScript Draw 2D Emulator (in development)

Mon Sep 16, 2019 4:40 pm

squirreltown wrote:
my understanding this parameter only affects the alpha of the image, do you guys use it in other scenarios ?

I use reversed/white graphics, and use it to assign a color in addition to the alpha at runtime. So, I'm using it all the time.

I understand the use case. I released yesterday v0.3.0 with partiall support of rgba in roScreen.DrawObject() (alpha only), will work on this feature and also add it to roBitmap and roRegion too.

Who is online

Users browsing this forum: No registered users and 2 guests