graham-s's Forum Posts

  • Hi folks, I'm close on this, but I just can't seem to wrap my head around it.

    I have a slot machine I'm working on, I have a simple straight across win line, now I'm adding multi lines and its doing my head in!

    I think I need something like an array to hold the winlines, and an array for the reel items. I think I need to go through the win lines, and if the same number appears in the reel items, and my count gets up to 3 matches etc, then its good. Except I can't get my head around how to architect it (and accommodate multiple line wins too)

    Here's an example image of a-the win lines array, and b: A sample value of the array that is holding all the items on display. Finally c: In case you want to see what it looks like :)

    The actual project so far.

    Can someone help me out, even with pseudo code to get my head around it :)

    Thanks

    Tagged:

  • Hi folks, I'm trying to return data from a REST API on my system. I've tried a few different combinations, but I'm not sure I'm even in the ballpark.

    If someone has some pointers it would be appreciated.

    I *HAVE* looked at the AJAX component in the manual, but it didn't help, and I can literally only find one example of an AJAX setup in the tutorials that also wasn't helpful.

    Here's the info from the documentation on the API call. My issue revolves around the authentication/header issue. I do get a connection, but I get 'Not Authorized'.

    Retrieve All data from specific module

    $.ajax({

    dataType : "json",

    url :

    'http://yourdomain.com/sximoapi?module=employee',

    headers : {"Authorization": "Basic " +

    btoa("superadmin@mail.com:pLihtt-I4jzL")},

    success : function(data){

    // Do return value here //

    } })

    View Detail data from specific module

    $.ajax({

    dataType : "json",

    type : "GET",

    url :

    'http://yourdomain.com/sximoapi/1?module=employee',

    headers : {"Authorization": "Basic " +

    btoa("superadmin@mail.com:pLihtt-I4jzL")},

    success : function(data){

    // Do return value here //

    } })

    Here's what I've tried in C3.

    Ajax.SetRequestHeader

    "headers : {Authorization: Basic btoa(superadmin@mail.com:vbzt9Q-mZT7K-G8fTmm-pKezp)}"

    Ajax.SetRequestHeader

    Header ""Authorization"

    Value "Basic"

    (Didn't know where to put the id!)

    I know the btoa encrypts the ID but don't know how to manage that either.

    Any guidance?

    Tagged:

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • You can do that, but the license only allows for 1 commercial project. Unlimited free ones.

    "Licensee may use the Licensed Content in up to 1 commercial projects. A commercial project is one defined as a Work for Distribution launched with the capability to generate revenue, or intention to generate revenue through the sale of, licensing of, or otherwise intend to generate revenue directly from the Work for Distribution. If Licensee wishes to use the Licensed Content in more than 1 commercial projects they will need to purchase an additional License or the Licensed Content at the exclusive price if one is available (c.4)."

    So you can develop an app and publish it on multiple platforms. If you do a second app, you have to buy another license (Although at the price it wouldn't be the end of the world)

  • FYI, happening again... Same error in Chrome and Safari. If I go back and click the link again, it works almost every time.

    Critical error

    This should not of happened. Please contact support.

    StackExchange.Redis.RedisConnectionException: No connection is available to service this operation: GET GeoIP.72.205.160.172; SocketClosed on Construct3.redis.cache.windows.net:6380/Interactive, Idle/MarkProcessed, last: GET, origin: ReadFromPipe, outstanding: 0, last-read: 0s ago, last-write: 57s ago, keep-alive: 60s, state: ConnectedEstablished, mgr: 9 of 10 available, in: 0, last-heartbeat: 0s ago, last-mbeat: 0s ago, global: 0s ago, v: 2.0.601.3402; IOCP: (Busy=0,Free=1000,Min=200,Max=1000), WORKER: (Busy=1,Free=32766,Min=200,Max=32767), Local-CPU: n/a ---> StackExchange.Redis.RedisConnectionException: SocketClosed on Construct3.redis.cache.windows.net:6380/Interactive, Idle/MarkProcessed, last: GET, origin: ReadFromPipe, outstanding: 0, last-read: 0s ago, last-write: 57s ago, keep-alive: 60s, state: ConnectedEstablished, mgr: 9 of 10 available, in: 0, last-heartbeat: 0s ago, last-mbeat: 0s ago, global: 0s ago, v: 2.0.601.3402 --- End of inner exception stack trace --- at StackExchange.Redis.ConnectionMultiplexer.ExecuteSyncImpl[T](Message message, ResultProcessor`1 processor, ServerEndPoint server) in C:\projects\stackexchange-redis\src\StackExchange.Redis\ConnectionMultiplexer.cs:line 2235 at StackExchange.Redis.RedisBase.ExecuteSync[T](Message message, ResultProcessor`1 processor, ServerEndPoint server) in C:\projects\stackexchange-redis\src\StackExchange.Redis\RedisBase.cs:line 54 at StackExchange.Redis.RedisDatabase.StringGet(RedisKey key, CommandFlags flags) in C:\projects\stackexchange-redis\src\StackExchange.Redis\RedisDatabase.cs:line 2281 at C3.Code.Controls.Application.Caching.Distributed.DistributedCacheController.Get[T](String cacheKey) in C:\Construct.net\Source\C3Alpha2\Code\Controls\Application\Caching\Distributed\DistributedCacheController.cs:line 107 at C3.Code.Controls.Application.Caching.Manager.Manager.Get[T](String key, Func`1 getFromExternFunction, Boolean skipLocalCaches) in C:\Construct.net\Source\C3Alpha2\Code\Controls\Application\Caching\Manager\Manager.cs:line 132 at C3.Code.Helpers.SEO.Functions.GetUsersIPRegion() in C:\Construct.net\Source\C3Alpha2\Code\Helpers\SEO\Regions.cs:line 86 at C3.Code.Helpers.SEO.Functions.GetUsersCurrentRegion(UserSession currentSession) in C:\Construct.net\Source\C3Alpha2\Code\Helpers\SEO\Regions.cs:line 138 at C3.Pages.Master_Pages.Global.Page_Init(Object sender, EventArgs e) in C:\Construct.net\Source\C3Alpha2\Pages\Master Pages\Global.Master.cs:line 114 at System.Web.UI.Control.OnInit(EventArgs e) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Control.InitRecursive(Control namingContainer) at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)StackExchange.Redis.RedisConnectionException: SocketClosed on Construct3.redis.cache.windows.net:6380/Interactive, Idle/MarkProcessed, last: GET, origin: ReadFromPipe, outstanding: 0, last-read: 0s ago, last-write: 57s ago, keep-alive: 60s, state: ConnectedEstablished, mgr: 9 of 10 available, in: 0, last-heartbeat: 0s ago, last-mbeat: 0s ago, global: 0s ago, v: 2.0.601.3402

  • CGamez You're welcome.

    The documentation website should be done very soon, I've even added some mini-games for hard to-do features.

    I've noticed some people are a bit overwhelmed by the ACEs. But this should save you the complexity.

    This will be a welcome enhancement. While I appreciate that these are high end add-ons, we aren't all high end users and struggle with the ACEs. It sounds like you're really bridging the gap well with the documentation site.

    Wanted to say thank you for that effort, its appreciated!

  • Out of curiosity, how are you handling it it the player is the host? If the host leaves the game, would all players get tossed too?

  • I'm with Elliott, perhaps you have some assets that can be misconstrued, web calls you aren't using directly etc.

    I suspect they see a callout to an API and think you're up to no good. Giving apple your C3p file won't do a thing, they won't look at it ever. You should be able to get more info based on the reject.

    Apple historically has driven me nuts with vague rejections and its been trial and error to find out what it is!

  • An easy option is assets at Kenney at Kenney.nl

    I also subscribe to craftpix.net who have great assets including spriter sets.

  • Note when exporting your game, remove the option to condensar the script, otherwise it will give black screen. Good luck!

    Oh THANK YOU! I did have the minify option on. That did the trick.

    For the other guys, to host the file, you can use netlify for free. Just set up an account and drag/drop the HTML5 output, but deselect minify script.

    Panic over.

  • Not wishing to panic, but PANIC :(

    I test my entry in the emulator, everything is fine.

    I export it to HTML5 and load it to Netlify and I get an error, I host it myself and get the same 'Unhandled Promise Rejection: ReferenceError: Can't find variable: g_axH' error and it won't start.

    I removed the Gamee plugin from the game and it hosted fine, I added it back in with NO events, and get the same error.

    I am using R157 of C3 and Chrome 75.0.3770.100

    How can I get this entry in if I can't get the HTML5 hosted? I'd anticipate that even the zipped file will have the error so it wouldn't be testable.

  • But then Ashley, Tom and the Scirra staff can't eat this week. If you can never afford the cost, perhaps an alternative like Corona is viable, but its not quite as easy as Construct 3.

    (Or, run Construct 2 and miss out on all the new goodness)

  • Never mind, it appears to be an issue with Safari on the Mac, under Chrome it ran just fine.

    I left the post in case others run into the same issue.

  • I seem to run into an issue where the game runs off to the left of the main window. Its the second time its done it and I can't figure out why.

    My layout and viewport size is 480 x 854

    Thoughts?

  • Per Ashley on this post...

    Mobile web browsers actually prevent any audio playback until the first touch. After that sound can play at any time, but music is still limited to only being started in touches. There is no workaround in the browser, it's a limitation to stop websites annoying you with sound. If you build an APK, it doesn't have the restriction.

    https://www.construct.net/en/forum/construct-3/how-do-i-8/sound-doesnt-play-130580

  • I do believe that this isn't possible, I think that there's a requirement that means a key press (interaction) has to occur before music will play.

    I will see if I can find it documented.