I’m just starting out with solar2d; and really enjoy it so far, amazing work ! I would like to use some bit operators (bit.band, bit.lshift, …) I found out it is not included in the base install, but a plugin is required. I think this fits exactly what I need : http://docs.coronalabs.com/plugin/bit/index.html
Sadly If I add the require and the settings to my project I still get an error that this plugin is not found; Can I download this ? I found on the web this was originally “the Corona bit plugin is only available to Pro subscribers” is this still the case, if so where would I be able to find this ?
When/where do you get the error message that the plugin is not found? I’ve been using it for years, and it still works just fine for me, so I guess that you have some kind of configuration error.
Documentation regarding plugins are not up to speed after Corona SDK went fully open source with MIT license and rebranded as Solar2D. Bit is definitely a free plugin at the moment. Plugins that are found at https://plugins.solar2d.com/ are completely free and you can find more plugins at solar2dmarketplace.com/ and https://www.solar2dplugins.com/ .
Thanks for the help! I’m using 2020.3619 (2020.9.25).
One major mistake is I put the plugin info in the config.lua file; I now moved it to building.settings; But I get the same issue; I run my game in Solar2D Simulator; (I assume this is fine ?) (or do I need to build it to test ?)
-----------------------------------------------------------------------------------------
--
-- main.lua
--
-----------------------------------------------------------------------------------------
local composer = require( "composer" )
local bitLib = require( "plugin.bit" )
-- Hide status bar
display.setStatusBar( display.HiddenStatusBar )
-- Seed the random number generator
-- math.randomseed( os.time() )
math.randomseed(os.clock()*1000) -- os.time() is to easy
-- Reserve channel 1 for background music
audio.reserveChannels( 1 )
-- Reduce the overall volume of the channel
audio.setVolume( 0.5, { channel=1 } )
-- Go to the menu screen
-- composer.gotoScene( "game" )
I uncommented the last line just to show that even before the goto, it generates this error;