BASIC

Author Topic: Snake Slider - HP TouchPad test, does it play correctly?  (Read 3819 times)

Offline BdR

  • Dr. Type
  • ****
  • Posts: 303
    • View Profile
    • BdR Games
I had update my Snake Slider game and added high-resolution graphics (640x960). It works alright on iPod/iPhone and Palm Pre, and Spacefractal was kind enough to test it on the iPad. I couldn't test it on the HP TouchPad because I don't have one, but I uploaded it to HP anyway. I assumed they would test it before putting it in the App Catalog, but as it turns out they don't. Ian Price posted a TouchPad screenshot (which was lost in the forum crash) showing Snake Slider with a screwed up display (partly rotated, too small, weird buttons etc). :|

Now I've fixed some code and settings, deleted previous GLBasic build results and compiled a new version. So I'm hoping someone would be kind enough to test it on a TouchPad, and post here if the game displays correctly or not. =D Anyone?

You can download the ipk file here:
http://members.home.nl/bas.de.reuver/tmpfiles/snakesliderlite_webos_test.zip (13,6 Mb)
« Last Edit: 2012-Feb-13 by BdR »

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4147
  • On the shoulders of giants.
    • View Profile
    • My Apps
I did a VERY quick test. This time the buttons actually worked - unfortunately the screen remains borked (not as bad), but still borked. This isn't just on the title screen, but throughout as you can see in the screenies.

And remember, never, ever trust HP.

[attachment deleted by admin]
I came. I saw. I played.

Offline BdR

  • Dr. Type
  • ****
  • Posts: 303
    • View Profile
    • BdR Games
Great, thanks for the feed back. :good: It's probably to do with the screen orientation combined with USEASBMP. The program does a USEASBMP every time it starts a different/new screen (main menu, option menu, start a level etc.). Did you tilt the device or does it also appear like this when it's "right side" up? I'll try to compile again tomorrow.
« Last Edit: 2012-Feb-14 by BdR »

Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4147
  • On the shoulders of giants.
    • View Profile
    • My Apps
Tilting made no difference.
I came. I saw. I played.

Offline BdR

  • Dr. Type
  • ****
  • Posts: 303
    • View Profile
    • BdR Games
Looking at the screenshot, it looks like USEASBMP is not working correctly on the TouchPad. I think SETORIENTATION is used one time too many or something?

I've made a thread here -> http://www.glbasic.com/forum/index.php?topic=7668.0

Offline spacefractal

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 3626
    • View Profile
    • Space Fractal
Look like you have found a glbasic bug in USEASBMP, which did not checkout SETORIENTATION at all? Add it to bug section.

In meantime you can load it as sprite and draw that instead. Which should work for webos, here I can't test.

The game in latest beta works nice on iPad....

Edit: I was too slow hehe :-)
« Last Edit: 2012-Feb-15 by spacefractal »
Greedy Mouse - Karma Miwa - Spot Race - CatchOut - Android Extras - is on a vacation trip, home before end of few days in jan.

Offline BdR

  • Dr. Type
  • ****
  • Posts: 303
    • View Profile
    • BdR Games
I don't understand exactly what you mean with CREATESCREEN/DRAWSPRITE/CLEARSCREEN, how can I use that to replace USEASBMP? O_O

Unfortunately it still doesn't work on TouchPad, I compiled with GLB 10.283 and Ian Price generously tested again. I don't know how to solve this. :giveup: My program draws the background once, because I don't want to re-render the basket edges every frame. Because these are lot of small sprites and needless re-drawing; it's not updated during a level, it's static/nonmoving.

My code basically comes down to this:
Code: GLBasic [Select]
// static background stuff
DRAWSPRITE SPR_BACKGROUND_GAME, 0, 0
GameDrawBasket()
//..etc

// store background
USEASBMP

WHILE (bGameOver = FALSE)
  // only draw dynamic moving stuff
  GameDrawSnakes()
  GameDrawObjects() //blocks/keys etc.
  //..handle input etc

  // show screen
  SHOWSCREEN
WEND
 

And something similar for the menu screen. On every platform (Palm Pre, iPhone, Windows etc.) this works correctly, only on the TouchPad it displays like this (see below). Notice how the buttons are drawn correctly, but the background is rotated 90 degrees counter clockwise. Btw the project properties are set to 768x1024 (not 1024x768) I don't know what will happen when I change it to 1024x768, but somehow I doubt that will correct the problem.


Offline Ian Price

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 4147
  • On the shoulders of giants.
    • View Profile
    • My Apps
I've sent you a PM with a possible solution for TP woes.

As for CREATESCREEN - this could solve the USEASBMP problem (if it is a problem).

Use CREATESCREEN 1,SPRITE#, WIDTH, HEIGHT to create what you want to be the main screen. Using USESCREEN 1 draw the sprite(s) onto it (orientated correctly of course), then revert back to using the normal screen with USESCREEN -1.

Then just use DRAWSPRITE SPRITE#,0,0 to draw your main game background screen each loop. This removes the need for USEASBMP completely and is not any slower.
I came. I saw. I played.