Menu

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

Topics - Kyo

#1
Hi Guys,
I have a problem with my Media Folder!

My Media folders it's to big to put it inside the app (105 MB).

If I leave the Media folder, inside the app, the game does not install and crashes!

But with external Media Folder the game start fine, but  appear all images in the gallery in Android phone (over 1.000 images, it's horrible  >:D)

I use SHOEBOX, for hide all Image files on Android phone, but in my Zopo ZP 900 it works well, but in my Samsung Note 4 the App crash (don't start).

Why?

I use for test the same APK and the same data.sbx!

#2
Hi,
when I read one pixel of a sprite with this system:
Code (glbasic) Select

LOADSPRITEMEM("1.png", w2%, h2%, pixels[])
FOREACH pix IN pixels[]
FOR x% = 0 TO value_palette
IF pix = memo[x][0]
pix =  memo[x][1]
BREAK
ENDIF
NEXT
        NEXT


the var pix return this value: -5462343
I have to convert in Hex (Exmple: #000301), it's possible?
#3
GLBasic - en / Shader Info
2014-Oct-29
Hi,

I test this example of shader (C64colorshader):

Code (glbasic) Select

// --------------------------------- //
// Project: C64izer
// Start: Tuesday, March 25, 2008
// IDE Version: 5.212


LOADBMP "test.png"
X_LOADSHADER(0, "", "C64izer.frag")


DRAWRECT 0,0,64,64,RGB(0,255,0)
DRAWRECT 0,0,32,32,RGB(0,0,255)
DRAWRECT 32,32,32,32,RGB(255,255,255)
PRINT "C64", 8,8
GRABSPRITE 0,0,0,64,64

// C64izeOld()

WHILE TRUE
ROTOZOOMSPRITE 0, 140,100, GETTIMERALL()/20, SIN(GETTIMERALL()/37)+1

C64ize()
SHOWSCREEN
WEND


FUNCTION C64ize:
// Grab the 320x240 image from screen
GRABSPRITE 1000, 0,0, 320,240

// Make smooth downscaling for better quality
SMOOTHSHADING TRUE

// Set the C64 color shader
X_SETSHADER 0

// draw the sprite 160x240 with C64 colors
STRETCHSPRITE 1000, 0,0,160,240
// unlink the shader - we're done
X_SETSHADER -1

// grab the image 160x240
GRABSPRITE 1000, 0,0,160,240

// make hard pixels for final output
SMOOTHSHADING FALSE
// stretch by factors 4x2 -> C64 has 2 neighbored pixels of same color
STRETCHSPRITE 1000,0,0,640,480
ENDFUNCTION


But if i delete all shader command the result it's the same, it's the STRETCHSPRITE command which has the effect C64 style!

I test with other .frag but the result don't change.

I would like to get the 2D effects (on sprites) as:
- Black / White (greyscale)
- Distortion
etc.

It's possible? and how?
#4
GL_B support Animated Gif?

I found this http://www.glbasic.com/forum/index.php?topic=8472.msg71729#msg71729
but not work on Android (i not test on iphone).

Gif is great for create animated presentation (example for Logo).

Thanks for help  ;)
#5
Hi Guys!
I want to give you a few questions on collisions!

there is a function to calculate the collision between two triangles??


there is a function to calculate the collision between two rotated rectangles?


and if I want to use the shape collisions?


Thanks for help!
#6

The problem is the black line that is created when approached two tile that are not Px2 Texture.

Code (glbasic) Select

IMPORT "C" void __stdcall glTexParameteri(unsigned int flag0, unsigned int flag1, unsigned int flag2);
GLOBAL GL_CLAMP_TO_EDGE%                                   = 0x812F
GLOBAL GL_TEXTURE_2D%                                      = 0x0DE1
GLOBAL GL_TEXTURE_WRAP_S%                                  = 0x2802
GLOBAL GL_TEXTURE_WRAP_T%                                  = 0x2803


FUNCTION z_drawstage: num%,x%,y%

        STARTPOLY num
                glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);// Changed \\
                glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);// Changed \\
                POLYVECTOR x1,y1,0,0,color
                POLYVECTOR x1,y1+y2,0,sy,color
                POLYVECTOR x1+x2,y1+y2,sx,sy,color
                POLYVECTOR x1+x2,y1,sx,0,color
        ENDPOLY
ENDFUNCTION

#7
Other problem in Mac
1) if ISMUSICPLAYING() = TRUE then STOPMUSIC  the music dosn't stop!
2) MUSICVOLUME  don't work!
3) PLAYSOUND(num%, pan#, volume#) with WAV don't work, what format should I use?
#8
 test with:
- SETSCREEN 480,320,TRUE (and False)
- SETSCREEN 960,640,TRUE (and False)
- SETSCREEN 9999,9998,TRUE (and FALSE)
and i test with resolution from Option -> Resolution  (On Gl_B IDE Menu)

But the game run i portrait ... WHY?

Other info:
i use xcode 5.1 and ipod 4th gen with ios 6.0.1
#9
Hi,
I compiled my game for Mac (both X86 and uni) and after 1 Month of Test I have always the same error.....
In Win 7/8/8.1 and Android the game work fine.

This is my configuration:
osx Mavericks 10.9.4 Niresh
Processore Intel® Core™ i7-3630QM di 3a gen. with Intel® Turbo Boost Technology 2.0
Hard disk 500 GB
4,096 (1x) MB, DDR3 RAM (1,600 MHz)
AMD Radeon HD 7670M (2GB memory)

I test with game downloaded from iTunes, and all game works fine!
I test a simple demo of GLB and work fine.

I have in my code:
- SETSCREEN 1366,768,FALSE
- Z Project - universal screen size scaling system
- This Code
Code (glbasic) Select

IMPORT "C" void __stdcall glTexParameteri(unsigned int flag0, unsigned int flag1, unsigned int flag2);
GLOBAL GL_CLAMP_TO_EDGE%                                   = 0x812F
GLOBAL GL_TEXTURE_2D%                                      = 0x0DE1
GLOBAL GL_TEXTURE_WRAP_S%                                  = 0x2802
GLOBAL GL_TEXTURE_WRAP_T%                                  = 0x2803
 


This is the Mac report error

Code (glbasic) Select

Process:         MacOSX [665]
Path:            /Users/USER/Desktop/CC.app/Contents/MacOS/MacOSX
Identifier:      com.xxxxxxxxxx.su
Version:         0.001.0 (0.001.0)
Code Type:       X86 (Native)
Parent Process:  launchd [155]
Responsible:     MacOSX [665]
User ID:         501

Date/Time:       2014-08-25 20:36:38.454 +0200
OS Version:      Mac OS X 10.9.4 (13E28)
Report Version:  11
Anonymous UUID:  837315DB-9B27-D1B8-3358-C3D336BA4671


Crashed Thread:  1

Exception Type:  EXC_CRASH (SIGSEGV)
Exception Codes: 0x0000000000000000, 0x0000000000000000

Thread 0:: Dispatch queue: com.apple.main-thread
0   dyld                          0x8feaa322 misaligned_stack_error + 0
1   com.xxxxxxxxxx.su          0x000b2662 OpenGLRainbows::PolyEnd() + 28
2   com.xxxxxxxxxx.su          0x00065396 __GLBASIC__::ENDPOLY() + 26
3   com.xxxxxxxxxx.su          0x00047cd8 __GLBASIC__::z_drawstage(int, int, int, double, double, double, double, double, double, double) + 680
4   com.xxxxxxxxxx.su          0x0004f916 __GLBASIC__::Update_Logo_samp() + 182
5   com.xxxxxxxxxx.su          0x00006600 __GLBASIC__::__MainGameSub_() + 2560
6   com.xxxxxxxxxx.su          0x0008d8d7 SDL_main + 817
7   com.xxxxxxxxxx.su          0x000633a0 -[SDLMain applicationDidFinishLaunching:] + 88
8   com.apple.Foundation          0x951ff732 __57-[NSNotificationCenter addObserver:selector:name:object:]_block_invoke + 49
9   com.apple.CoreFoundation      0x95a305a4 __CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER__ + 20
10  com.apple.CoreFoundation      0x9591204b _CFXNotificationPost + 3435
11  com.apple.Foundation          0x951ee21f -[NSNotificationCenter postNotificationName:object:userInfo:] + 92
12  com.apple.AppKit              0x944f1575 -[NSApplication _postDidFinishNotification] + 367
13  com.apple.AppKit              0x944f1215 -[NSApplication _sendFinishLaunchingNotification] + 239
14  com.apple.AppKit              0x944edb44 -[NSApplication(NSAppleEventHandling) _handleAEOpenEvent:] + 840
15  com.apple.AppKit              0x944ed431 -[NSApplication(NSAppleEventHandling) _handleCoreEvent:withReplyEvent:] + 277
16  libobjc.A.dylib                0x9355e304 -[NSObject performSelector:withObject:withObject:] + 77
17  com.apple.Foundation          0x9520e47a __76-[NSAppleEventManager setEventHandler:andSelector:forEventClass:andEventID:]_block_invoke + 121
18  com.apple.Foundation          0x9520dfb1 -[NSAppleEventManager dispatchRawAppleEvent:withRawReply:handlerRefCon:] + 430
19  com.apple.Foundation          0x9520ddbb _NSAppleEventManagerGenericHandler + 218
20  com.apple.AE                  0x98f54b15 aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned long, unsigned char*) + 387
21  com.apple.AE                  0x98f23ed6 dispatchEventAndSendReply(AEDesc const*, AEDesc*) + 44
22  com.apple.AE                  0x98f23dce aeProcessAppleEvent + 318
23  com.apple.HIToolbox            0x9ba08571 AEProcessAppleEvent + 55
24  com.apple.AppKit              0x944e9148 _DPSNextEvent + 1089
25  com.apple.AppKit              0x944e8870 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 119
26  com.apple.AppKit              0x944db15c -[NSApplication run] + 727
27  com.xxxxxxxxxx.su          0x000631c8 CustomApplicationMain + 428
28  com.xxxxxxxxxx.su          0x00063643 main + 280
29  com.xxxxxxxxxx.su          0x000022ee _start + 228
30  com.xxxxxxxxxx.su          0x00002209 start + 41

Thread 1 Crashed:
0   libsystem_kernel.dylib        0x92cdc046 __workq_kernreturn + 10
1   libsystem_pthread.dylib        0x97e27dcf _pthread_wqthread + 372
2   libsystem_pthread.dylib        0x97e2bcce start_wqthread + 30

Thread 2:: Dispatch queue: com.apple.libdispatch-manager
0   libsystem_kernel.dylib        0x92cdc992 kevent64 + 10
1   libdispatch.dylib              0x9be49899 _dispatch_mgr_invoke + 238
2   libdispatch.dylib              0x9be49532 _dispatch_mgr_thread + 52

Thread 3:
0   libsystem_kernel.dylib        0x92cdc046 __workq_kernreturn + 10
1   libsystem_pthread.dylib        0x97e27dcf _pthread_wqthread + 372
2   libsystem_pthread.dylib        0x97e2bcce start_wqthread + 30

Thread 4:
0   libsystem_kernel.dylib        0x92cdc046 __workq_kernreturn + 10
1   libsystem_pthread.dylib        0x97e27dcf _pthread_wqthread + 372
2   libsystem_pthread.dylib        0x97e2bcce start_wqthread + 30

Thread 5:
0   libsystem_kernel.dylib        0x92cdc046 __workq_kernreturn + 10
1   libsystem_pthread.dylib        0x97e27dcf _pthread_wqthread + 372
2   libsystem_pthread.dylib        0x97e2bcce start_wqthread + 30

Thread 6:
0   libsystem_kernel.dylib        0x92cdc046 __workq_kernreturn + 10
1   libsystem_pthread.dylib        0x97e27dcf _pthread_wqthread + 372
2   libsystem_pthread.dylib        0x97e2bcce start_wqthread + 30

Thread 7:
0   libsystem_kernel.dylib        0x92cd6f7a mach_msg_trap + 10
1   libsystem_kernel.dylib        0x92cd616c mach_msg + 68
2   com.apple.CoreFoundation      0x95978bf9 __CFRunLoopServiceMachPort + 169
3   com.apple.CoreFoundation      0x959781d1 __CFRunLoopRun + 1393
4   com.apple.CoreFoundation      0x959779ea CFRunLoopRunSpecific + 394
5   com.apple.CoreFoundation      0x9597784b CFRunLoopRunInMode + 123
6   com.apple.AppKit              0x94692b88 _NSEventThread + 283
7   libsystem_pthread.dylib        0x97e265fb _pthread_body + 144
8   libsystem_pthread.dylib        0x97e26485 _pthread_start + 130
9   libsystem_pthread.dylib        0x97e2bcf2 thread_start + 34

Thread 1 crashed with X86 Thread State (32-bit):
  eax: 0x00100170  ebx: 0x00001103  ecx: 0xb0080f9c  edx: 0x92cdc046
  edi: 0x97e27c69  esi: 0xb0081000  ebp: 0xb0080fc8  esp: 0xb0080f9c
   ss: 0x00000023  efl: 0x00000282  eip: 0x92cdc046   cs: 0x0000000b
   ds: 0x00000023   es: 0x00000023   fs: 0x00000023   gs: 0x0000000f
  cr2: 0x0146b000
 
Logical CPU:     0
Error Code:      0x00100170
Trap Number:     132


External Modification Summary:
  Calls made by other processes targeting this process:
    task_for_pid: 5
    thread_create: 0
    thread_set_state: 0
  Calls made by this process:
    task_for_pid: 0
    thread_create: 0
    thread_set_state: 0
  Calls made by all processes on this machine:
    task_for_pid: 1938
    thread_create: 0
    thread_set_state: 0

VM Region Summary:
ReadOnly portion of Libraries: Total=151.7M resident=71.3M(47%) swapped_out_or_unallocated=80.4M(53%)
Writable regions: Total=149.6M written=14.8M(10%) resident=21.7M(14%) swapped_out=0K(0%) unallocated=128.0M(86%)

REGION TYPE                      VIRTUAL
===========                      =======
CG backing stores                  5684K
CG image                             12K
CG raster data                       12K
CG shared images                    172K
CoreServices                         64K
IOKit                              4096K
Kernel Alloc Once                     4K
MALLOC                            114.1M
MALLOC (admin)                       48K
Memory Tag 242                       12K
Memory Tag 249                      156K
Stack                              67.1M
VM_ALLOCATE                        16.4M
__DATA                             16.7M
__IMAGE                             528K
__IMPORT                              8K
__LINKEDIT                         46.8M
__OBJC                             1848K
__PAGEZERO                            4K
__TEXT                            104.9M
__UNICODE                           544K
mapped file                       154.6M
shared memory                         4K
===========                      =======
TOTAL                             533.5M

Model: MacPro3,1, BootROM Niresh12495.com, 4 processors, Intel Core i7, 2.39 GHz, 4 GB, SMC 1.30f3
Graphics: ATI Mobility Radeon HD 7670, ATI Mobility Radeon HD 7670, PCIe, 2048 MB
Memory Module: BANK 2/DIMM1, 4 GB, DDR3, 1600 MHz, N/A, N/A
Bluetooth: Version 4.2.6f1 14216, 3 services, 22 devices, 1 incoming serial ports
Network Service: Ethernet, Ethernet, en0
PCI Card: ATI Mobility Radeon HD 7670, Display Controller, Slot-1
Serial ATA Device: TOSHIBA MQ01ABF050, 500,11 GB
Serial ATA Device: TSSTcorp CDDVDW SN-208DN
USB Device: Hub
USB Device: USB to ATA/ATAPI bridge
USB Device: USB2.0-CRW
USB Device: TOSHIBA Web Camera - HD
USB Device: Mass Storage Device
USB Device: USB Optical Mouse
USB Device: Bluetooth USB Host Controller
USB Device: Hub
Thunderbolt Bus:

#10
What's new in version 12.243 ?
I can not update directly from the IDE of glb!
There are bugs in the new version?
There is a thread that talks about this update?
Thanks  :booze:
#11
when I use the command ENCRYPT$ if the value is:

Code (glbasic) Select

1|1*67|44|128|229*138|273|0*1|99|49|74|222|224*0|0|0|50|50*0|0|0|50|50|273*0|0|0|50|50*0|0|0|0*0|0|56*0|0|56*0|0|56*0|0|2*


it is possible that the hex is:

Code (glbasic) Select

3d10d0faa66aca0a


It's very strange result, i think the "|" separator lock the encrypt conversion!
#12
Since I have not found a easy way to shrink graphics and audio, I decided to use the command: SETSHOEBOX

But when i use a file .sbx and start the game, the problem is seems not erase from memory the last file loaded!

For example:
Start Logo splash - Work Fine
Start Menu - Work Fine
Start Map - Above the map puts the background of the Menu
Loading - Don't see any background
Game Loop - Almost all the sprites are unpacked, taken from other image files (also deleted from memory with command LOADSPRITE "", num_image)
All Musics and Sounds Work Fine

If I use the folder (without command SETSHOEBOX) all Work Fine!

Why?  :giveup:

I have to Pack all File (images and Music) Plese Help me!  :nw:
#13
Sorry for stupid question, but I read in a post that Gl_B has been updated to version: 12.243
It's true or it's an error????
#14
I use this simple code:

Code (glbasic) Select

SETCURRENTDIR("Media") // go to media files

AUTOPAUSE TRUE
SEEDRND GETTIMERALL()

//SETSCREEN 9999,9998,FALSE
SETSCREEN 440,700,FALSE

int_sd$ = PLATFORMINFO$("APPDATA")
ext_sd$ = PLATFORMINFO$("DOCUMENTS")


WHILE TRUE

PRINT "Int_sd: " + int_sd$, 0, 10
PRINT "Ext_sd: " + ext_sd$, 0, 20

PRINT "Path: " + GETCURRENTDIR$(), 0, 30

PRINT "**************2", 0, 50

OPENFILE(1,"1.txt", TRUE)
READLINE 1, nome$
PRINT "1 : " + nome$,0 ,70
CLOSEFILE 1


SHOWSCREEN
WEND


In Windows work fine but in Android Crash...
I use DOESFILEEXIST() but it tells me that the file does not exist.

I test a various option:
OPENFILE(1,"Media/1.txt", TRUE)
or
OPENFILE(1,"Media\1.txt", TRUE)

but the file not found!
#15
I compile for Mac, and GL_B create a folder Game.app.
I copy Game.app in my Mac, but when i run don't start ...

I tried to use the two compilers:
- OS_X X86
- OS_X Uni

But the game don't start.
I have Mac Mini (i7 core) with Maverick (10.9.3)

On Win Vista-7-8 and 8.1 and Android the game run fine!

Help!
#16
2D / Axis Z on polyvector
2014-May-22
1) Please Fix on/off of VSync

2) The polyvector work with X_CAMERA, but the polyvector dont have the Z coordinate, and all sprites are overlapping.

If add the Z coordinate to polyvector and fix the X_Camera for the correct display, we would have a system identical to Unity 2D.

We would not need to use any external libraries (ZProject etc.), and we may use in 2D games: Progressive Zoom, auto resize on various screen resolution etc ....

Please let look at this thread: http://www.glbasic.com/forum/index.php?topic=9809.30
#17
It's possible to use x_camera and polyvector???

hopefully you can give me an example of code?

thanks  :good:

#18
Need to download additional files for Android APK (since the limit of 50MB):

id=DOWNLOADINIT(fileurl$, fileto$, protocol$, username$, password$)
filesize=DOWNLOADFILESIZE(id)
progress=DOWNLOADPROGRESS(id)
status$=DOWNLOADSTATUS$(id)
DOWNLOADCLOSE(id)

Thanks!
#19
I read in a forum the Max Size for APK file is 50MB.

and i found this: http://developer.android.com/google/play/expansion-files.html

this procedure is fine in gl_b ?????
or should I do otherwise?

My APK far exceeds the 50MB!  :glare:
#20
you can integrate it on GLBasic?
how can I integrate it?

it would be nice if we tried to integrate it in favor of the whole comunity!  :good: