• Advertisement
Sign in to follow this  

Unity Prevent logic from running until screen 'loads'?

This topic is 2623 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement
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
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
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
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
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
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
Sign in to follow this  

  • Advertisement
  • Advertisement
  • Popular Now

  • Advertisement
  • Similar Content

    • By RoKabium Games
      Custom coffee mugs have arrived... More caffeine!
      Have a great weekend everyone! 
      #gamedev #indiedev #sama #caffeine
    • By Atwo Studios
       
      Hey guys,

      Anthony here from Atwo Studios bringing you some new updates for the new year!
      In this video I go over our game ROY, the new games and some general updates to the company!

      If you have not checked out ROY feel free to give it a try! Many people have said they enjoyed the game thus far!
      ROY: https://goo.gl/o6JJ5P
       
    • By Affgoo
      https://play.google.com/store/apps/details?id=com.NE.Alien
      still a lot of work to do, but its pretty stable  please let me know what you think <3
      Atlas Sentry is a game of destroy everything. Using your turret, simply swivel and shoot your way to victory, upgrading your weapons to unleash destruction on the variety of spaceships. The bigger your combo’s the more score you get! Earn silver as you play and then purchase new weapons and abilities to better deal with your enemy. Different enemies use different tactics and weapons, work out your own priorities in their destruction order. 

      Features: 
      **2 different game modes 
      **A level select mode with 20 difficult levels including a final boss, can you defeat it? **Arcade mode of endless destruction, how long will you last? 
      **High scores to compete against others, see who can take the top spot. 
       
    • By Chamferbox
      Chamferbox, a mini game asset store has just opened with some nice game assets, 
      Here you can find a free greek statue asset 

      Also check their dragon, zombie dragon and scorpion monster out:



      They're running the Grand Opening Sale, it's 30% off for all items, but for gamedev member, you can use this coupon code:
      GRANDOPEN
      to get 50% off prices What are you waiting for, go to
      http://chamferbox.com
      and get those models now!

      View full story
    • By Dafu
      FES Retro Game Framework is now available on the Unity Asset Store for your kind consideration!
      FES was born when I set out to start a retro pixel game project. I was looking around for an engine to try next. I tried a number of things, from GameMaker, to Fantasy Consoles, to MonoGame and Godot and then ended up back at Unity. Unity is just unbeatable in it's cross-platform support, and ease of deployment, but it sure as heck gets in the way of proper retro pixel games!
      So I poured over the Unity pipeline and found the lowest levels I could tie into and bring up a new retro game engine inside of Unity, but with a completely different source-code-only, classic game-loop retro blitting and bleeping API. Months of polishing and tweaking later I ended up with FES.
      Some FES features:
      Pixel perfect rendering RGB and Indexed color mode, with palette swapping support Primitive shape rendering, lines, rectangles, ellipses, pixels Multi-layered tilemaps with TMX file support Offscreen rendering Text rendering, with text alignment, overflow settings, and custom pixel font support Clipping Sound and Music APIs Simplified Input handling Wide pixel support (think Atari 2600) Post processing and transition effects, such as scanlines, screen wipes, screen shake, fade, pixelate and more Deploy to all Unity supported platforms I've put in lots of hours into a very detail documentation, you can flip through it here to get an better glimpse at the features and general overview: http://www.pixeltrollgames.com/fes/docs/index.html
      FES is carefully designed and well optimized (see live stress test demo below). Internally it uses batching, it chunks tilemaps, is careful about memory allocations, and tries to be smart about any heavy operations.
      Please have a quick look at the screenshots and live demos below and let me know what you think! I'd love to hear some opinions, feedback and questions!
      I hope I've tickled your retro feels!



      More images at: https://imgur.com/a/LFMAc
      Live demo feature reel: https://simmer.io/@Dafu/fes
      Live blitting stress test: https://simmer.io/@Dafu/fes-drawstress
      Unity Asset Store: https://www.assetstore.unity3d.com/#!/content/102064

      View full story
  • Advertisement