Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / AGK Broadcast app problems

Author
Message
RavenFelman
6
Years of Service
User Offline
Joined: 9th Oct 2017
Location:
Posted: 9th Oct 2017 18:17
Hello, i'm having some problems with the AppGameKit broadcasting app from the playstore, when i broadcast the program on my android for the first time when i launch the app, every code read is fine but the resolution change, every next time i launch the broadcast the program resolution is fine but the "Random" command dosen't, it show the same value every time and it's not random.

I really need help, THANKS.

Attachments

Login to view attachments
RavenFelman
6
Years of Service
User Offline
Joined: 9th Oct 2017
Location:
Posted: 9th Oct 2017 18:54
I can't see what i write in my post.
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 10th Oct 2017 08:36 Edited at: 10th Oct 2017 08:52
EDIT: Removed my comments about the resolution as it looks like I was talking rubbish.

The randomness works fine for me, even your code. Try increasing the range to random(1, 10) or something to see if you're seeing a difference.

Another way to test the random is to put it inside the loop i.e.



What you should see is the number continuously flick between 1 and 2.
MikeHart
AGK Bronze Backer
20
Years of Service
User Offline
Joined: 9th Jun 2003
Location:
Posted: 10th Oct 2017 11:01
Regarding your random values. That is normal that it will return the same numbers. You need to set a different seed. Look into SetRandomSeed2 and SetRandomSeed. Maybe use a current time value as a seed.
Running Windows 7 Home, 64 bit, 8 GB ram, Athlon II X2 255, ATI Radeon HD 4200. Using AGK2 Tier 1.
Kevin Cross
20
Years of Service
User Offline
Joined: 15th Nov 2003
Location: London, UK
Posted: 10th Oct 2017 11:49
@MikeHart, from my understanding and according to the wording in the help files the seed is automatically generated from the time when the app is launched so you don't need to set a random seed up front, unless you want a specific seed each time.
ShaunRW
DBPro Developer
16
Years of Service
User Offline
Joined: 7th Jan 2008
Location: Brisbane, Australia
Posted: 10th Oct 2017 13:09
Looks like RickV answered this in another thread?
https://forum.thegamecreators.com/thread/220678
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 10th Oct 2017 14:29
The problem I found with generating a random boolean is the scope between (0/1) 0r (1/2) is just not enough and the seed always seem to generate the lower of the 2, I found increasing the scope (1/10) gives better results

Login to post a reply

Server time is: 2024-04-18 22:45:53
Your offset time is: 2024-04-18 22:45:53