Sign in to follow this  
recursive404

Unity Prevent logic from running until screen 'loads'?

Recommended Posts

recursive404    100
Hello gamedev.net! I'm new here and have finally decided to join the community here after a couple years of lurking around. Looking forward to meeting/helping other game devs/programmers :)

Anyways, I'm working on a project for a client of mine which is a game that runs on a tablet PC. This project has been a nightmare because of the awful design specifications, but that isn't something I can fix.

I'm having an issue with the presentation of the intro at the launch of the game. The computer I'm developing it on is -much- faster than the tablet it runs on, so it loads instantly and shows the intro as intended. However, when the tablet boots up and launches into the game, by the time the screen has had time to "come up" on the tablet, it has already gone through half of the intro.

I need to come up with a means to prevent the logic from running until the screen has "come up". I've tried to add a "click me when finished loading" button, but the client wants the whole experience to be seamless. The next thing I tried was seeing how long it takes for the tablet to launch and have the screen appear, but the times were too variable for me to code around this.

Long story short - I need to prevent the logic from running until the screen has "come up". I've tried googling this, but can't find anything about it.

Thanks for the help :)

Share this post


Link to post
Share on other sites
zerothrillz    152
It would be more helpful if you posted the specifics about what you're targeting for. What language and what operating system. I'm not a tablet pro, but I do have some experience with Android applications.

Share this post


Link to post
Share on other sites
recursive404    100
Quote:
Original post by zerothrillz
It would be more helpful if you posted the specifics about what you're targeting for. What language and what operating system. I'm not a tablet pro, but I do have some experience with Android applications.


The tablet the game is running on is the Archos 9 running Windows 7 Starter.
I'm programming the game in C++, using SDL (and related libraries) for input/graphics, and Audiere for audio.

Basically, I'm programming for Windows. The fact that it runs on the Archos 9 just means that everything is extremely slow. Again, I have no idea why the client picked this for his games to run on, they are incredibly slow and expensive, but its what I got stuck with.

Thanks!

Share this post


Link to post
Share on other sites
zerothrillz    152
So you are changing the screen resolution of the tablet and in the time it takes for the video controller of the device to begin refreshing the display, your process is halfway through the beginning intro.

Crazy guess here but maybe waiting for vsync before beginning your opening animation will rectify this?

Or wait for an SDL video expose event?
http://sdl.beuc.net/sdl.wiki/SDL_ExposeEvent

Share this post


Link to post
Share on other sites
recursive404    100
Quote:
Original post by zerothrillz
Or wait for an SDL video expose event?
http://sdl.beuc.net/sdl.wiki/SDL_ExposeEvent


Hmm... I'll try this. I'll get back with results in a bit. Thanks :)

Share this post


Link to post
Share on other sites
zerothrillz    152
Yea, that seems like a good path to look down. You will likely have to initialize the event-subsystem first and in a separate thread, and synchronously initialize the video-subsystem and start waiting for that first expose event. So long as windows and SDL are playing nicely together on that tablet you SHOULD receive that first expose event, that is ;P

Share this post


Link to post
Share on other sites
recursive404    100
Quote:
Original post by zerothrillz
Yea, that seems like a good path to look down. You will likely have to initialize the event-subsystem first and in a separate thread, and synchronously initialize the video-subsystem and start waiting for that first expose event. So long as windows and SDL are playing nicely together on that tablet you SHOULD receive that first expose event, that is ;P


Yup, did exactly this, and it worked perfectly. Thanks a ton for pointing that one out, time to turn this project in :D

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this