Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Dark Schneider

SOUNDPLAYING() always return 0 on iPhone, on PC and with GLBasic v8 this work well. I noticed because when updated to GLBasic 9, I used SOUNDPLAYING() for sound cycling, and that sound now is a continous re-loop each frame, and is annoying (or crazy).
Quote from: DaCarSoft on 2011-Aug-14
There is a problem in iPad related to the bottom bar and multitasking: GLBasic, as is, does not rotate the bottom bar according to the device orientation, you can rotate the GLBasic graphics to landscape, but the bottom bar stay in portrait when the user makes double click on the home button. For this, you can use my codesnippet to rotate the bottom bar when you need it:

I didn't noticed that, but it's true, interesting.
Hi, I have installed XCode 4, then I am confused with one setting. When we choose the target iPhone, in the Summary screen we see a Supported Device Orientations setting, should we set any of them? They are all unchecked by default with the project generated by GLBasic, so I don't know if I should mark any of them.

In the other hand, there is another confusing thing, the degub/release build and where are stored the build files (preferences -> Locations), in summary, "what must I do to submit the App to the App Store?", if you have this question, I have seen for that, take a look at this
The new way, if works  :whistle:, is much more easy IMO than the old one, as is only 3 steps: Archive -> Validate -> Submit.
IMPORTANT: remember to set the release setting in the Archive option for the scheme, and set the Archive Name, that is different than Product Name, the name shown in App Store is the last one (Product Name), but IMO is not much elegant to send files to Apple with the name  ;/
I talk about this:
QuoteBlowfish supports key lengths of 32 to 448 bits
Here says
Quotevariable key length from 1 bit up to 448 bits
But, 1-bit?  :blink:

It is a standard to use 128-bit, but it would be good to know how GLBasic uses it, if it uses a fixed or variable length, if is fixed sized then it "fills" or "cuts" our code$ param, so if is fixed to 128-bit, is important to know because to make full use of it we should use a 16 characters length (128/8 bytes per character), but if it is variable then we can use any code$ up to 56 characters long.

Update: Well I think it uses a variable key length form, I have tested it with a 31-long code$, for encrypt and with the same 30-long one (removed the last character) and it can't decrypt, so it is using the full 248-bit of the code$ param to encrypt.
Take in mind that BASIC always had its own enviroment, and for developing in BASIC you were forced to use that enviroment. So restricting to these rules is not bad at all for us the old-BASIC-users  :)

Maybe that idea of external compiling feature could be the begining of porting GLBasic to other platforms, like Mac.
A great collection  ;/

At this moment is the XCode project, only to test if the leaderboards and achievements tables are shown correctly on iPhones, because I only have an iPad to test it, and assuming than an iPad running in iPhone mode is he same than an iPhone is not good at all  :S

Once tested, I will put the entire project including the GLBasic one to see how to use it in GBasic (this phrase is not a bit redundant?  :zzz: ).
Moved the last attached file version to the first post, also now the showAchievements function should be fully functional, as said it detects the device type, including when we run the app in iPhone mode on an iPad (for non-Universal apps).

Now we need to test it on iPhone models, but I don't have any iPhone supporting Game Center.
Bad, the current code doesn't work on iPad, and on iPhone can freeze in some special situation (sometimes holding pressed while table appears). Look at the development post for the attached GCTest project.
Well currently is fully functional for reporting, but the problem is to show the Leaderboards and Achievements, the current code doesn't work on iPad  :blink:

I attach the XCode project, there is no need of an original iOS device and there is no need of a GC account because there is no need to be authenticated to show the tables, nothing. The project is a GLBasic one, you only need to test it by pressing the 2 last buttons in the bottom row, they have the "Show" text (detects when we leave the finger over its position). If you press on another ones, you will see how the most rigth number at bottom increases, ignore it.

So anyone can use it to find the way these tables should be shown. The file to modify is the GameCenterWrapper.m, functions showLeaderboardCategory and showAchievements.

Take a look at it, earlier they work, earlier we have a full GC features.

Updated: changed the "show" functions so currently they work on an iPad executed in iPhone mode, I need someone to test them on real iPhones, the 3GS and on iPhone 4 and view what happends. So at this moment we can detect the device and in case of iPad show a message "Open the Game Center App", but on iPhones we could show the Game Center tables inside the application, as most game buyers are iPhone users its better than nothing.

But other developers can modify it so they work too on iPad.

Note: the showAchievements works on iPad if we change in the dissmissdelegate:
.view.superview removefromsuperview
.view removefromsuperview

so we could modify it to conditional execution depending on device type. Bu this should be done when leaderboards were working IMO to have a full working Game Center on iPad.
Quote from: Kitty Hello on 2011-May-16

The standard one that takes from 1-448 bits for key or one key long sized (i.e. to 128-bit)?, this is if it autofills or cuts the code$ param.
Yes I know, and when I use POLYVECTORS with no color it runs fine, but if I specify a color it runs slow, I say this because it runs slow only using it 8 times (to draw the select stage buttons) and runs very very slow.
But for drawing the game I use a tile based map using lot of POLYVECTORs without color and runs very good. So the color is the deep problem, not the POLYVECTORs.
If use POLYVECTOR with any color, it runs very slow on the iPad, it is curious because on an iPod 1G it runs fine. But they have different GPUs.

I say this because if you are planning to use POLYVECTORS to change colors of sprites and others (like fonts) take in mind this if you want to release it on iPad.
That is not exactly correct, the return values are wrong (the hurry ;) ).
Also it can be slighty modified to allow user to select the limit, the final function could be like:

Code (glbasic) Select
// --------------------------------- //
// my_drawangle - angle you can pass to ROTOSPRITE for correct orientation
// return:
// 0 = bottom is at right
// 1 = button is bottom
// 2 = button is on left
// 3 = button is top
FUNCTION iPadOrient%: BYREF my_drawangle, limit#=0.75
LOCAL fx, fy
STATIC last%, drawangle
   fx = GETJOYX(0)
   fy = GETJOYY(0)

   IF fy < -limit THEN last = 0
   IF fx >  limit THEN last = 1
   IF fy >  limit THEN last = 2
   IF fx < -limit THEN last = 3

   LOCAL angle = last * 90

   IF ABS(angle - drawangle)>180.0
      IF angle < drawangle
         INC angle, 360.0
         DEC angle, 360.0

   my_drawangle = drawangle * 0.9 + angle*0.1; drawangle=my_drawangle

   RETURN last

Very good function  :good:
Before upgrading to GLBasic v10 I'd like to know if it has support for JPG.

Maybe many think that is not important for games, but it is, because is used for "screens" (like the menus ones) and for backgrounds (that scrolling cyclic sky with mountains). So JPG helps to reduce the application size, particularly for hi-res devices, and image in 2048x1024 (cyclic background in hi-res) uses so much disk space in PNG format, and in JPG can be reduced up to 1/4 of the PNG file size.

Multiply that size by the number of screens and backgrounds...¡are many megabytes!  :noggin: