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 - Catoct

#1
Tengo mi GLBasic que compré hace mas de cinco años, y me funcionan bien los programas en el PC, pero no se como compilaros e instalarlos en mis dos Androids. Creo que puede ser porque necesite instalar alguna especie de SDK en mi PC. ¿Alguien puede decirme donde hay un tutorial sobre este tema?

No necesito  subirlos a Internet y venderlos, sino solo para ver como funcionan en mis dispositivos y quizás compartiros con algunos amigos.

------------
I have my GLbasic purchased about five years or more, and my programs works perfectly in my PC, but I don't know how compile an install my programs in my two Android devices. May be because I need to install any kind of "SDK"  in my PC.
Somebody can show me where is a tutorial about this question?

I need not to upload them to Internet to sell them, but t is only for to see how those work in my devices and perhaps share with some friends.
#2
Alguien puede decirme como debo hacer  dibujar o clocar un sprite  o  linea en el background y que quede fijo?

Estoy haciendo un mapa conectado por sus bordes y no acabo de ver como hacer esto. 

¡Gracias!  :)

Code (glbasic) Select

// --------------------------------- //
// Project: JacquardScroll1
// Start: Wednesday, March 23, 2016
// IDE Version: 12.308

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


GLOBAL gwidth ,gheight
gwidth = 800
gheight = 600
SETSCREEN gwidth ,gheight,0

GLOBAL sprite, VistaGrandx1, VistaGrandy1, VistaGrandx2, VistaGrandy2 // Zone to view
VistaGrandx1 = 1 ; VistaGrandy1 = 1 ; VistaGrandx2 = 600 ; VistaGrandy2 = 430
GLOBAL speedH, speedW, imgX, scrW, imgWide, imgY, scrH, imgHeight
GLOBAL worldX, worldY ,MundoX, MundoY

GLOBAL mx,my, b1,b2 ,phi
GLOBAL tile
LOADFONT "smalfont2.png",1
SETFONT 1
GLOBAL map = GENSPRITE()
SYSTEMPOINTER TRUE
map=1 //  sprite 1
LOADSPRITE "cachemir01.jpg", map //actualmente el tamaño es 1200*920. La imagen tiene que ser mas grande que lo que aparece en pantalla.
                        //  salen 80 tiles X 60 de 16 pinxels
GETSPRITESIZE map, imgWide, imgHeight

scrW=imgWide ; scrH= imgHeight // <-------I do this solution, even it is was the best it works FOR my purpose.


imgX=0 ; imgY=0 ; speedW=4 ; speedH=4

//Esto seria para hacer un array de los tiles poniendo zonas
GLOBAL tilex,tiley
tilex= MOD (MundoX/16,imgWide)
tiley= MOD (MundoY/16,imgHeight)



//-------------------------------------------------------------------------
//                           inicio

LIMITFPS 60
//Un sprite A
//DRAWRECT 0,0,64,32,RGB(255,255,0)
//DRAWRECT 7,23,4,4,RGB(255,0,0)
//GRABSPRITE 0, 0,0,64,32

GLOBAL id =0

main:

VIEWPORT VistaGrandx1, VistaGrandy1, VistaGrandx2, VistaGrandy2

DRAWLINE VistaGrandx1-1,VistaGrandy1-1,VistaGrandx2+1,VistaGrandy1-1, RGB(0,0,255)    // horizontal - arriba - derecha
    DRAWLINE VistaGrandx2+1,VistaGrandy1-1,VistaGrandx2+1,VistaGrandy2+1, RGB(0,0,255)    //vertical - derecha -abajo
    DRAWLINE VistaGrandx2+1,VistaGrandy2+1,VistaGrandx1-1,VistaGrandy2+1, RGB(0,0,255)    //horizontal -abajo izquiuierda
    DRAWLINE VistaGrandx1-1,VistaGrandy2+1,VistaGrandx1-1,VistaGrandy1-1, RGB(0,0,255)    //Vertical-arriba-izquierda

IF KEY(200) THEN imgY=imgY-speedH ; IF (imgY+scrH)<0 THEN imgY=imgY+scrH
IF KEY(208) THEN imgY=imgY+speedH ; IF imgY>0 THEN imgY=imgY-scrH
IF KEY(203) THEN imgX=imgX-speedW ; IF (imgX+scrW)<0 THEN imgX=imgX+scrW
IF KEY(205) THEN imgX=imgX+speedW ; IF imgX>0 THEN imgX=imgX-scrW

// Convert world coordinates into imgX AND imgY (the IF makes it handles POSITIVE world coordinates too)
MundoX = MOD (worldX,imgWide) ;MundoX = -imgX ; IF worldX < 0 THEN MundoX = imgX - imgWide
MundoY = MOD (worldX,imgHeight) ; MundoY = -imgY ; IF worldY < 0 THEN MundoY = imgY - imgHeight
GENSPRITE()
DRAWSPRITE map, imgX, imgY
DRAWSPRITE map, imgX, imgY+scrH
    DRAWSPRITE map, imgX+scrW, imgY
DRAWSPRITE map, imgX+scrW, imgY+scrH

//-------------------
PRINT " imgX = "+imgX + " imgY = "+imgY,1,384 // no se ve el texto fuera del viewport
PRINT " worldX = "+MundoX + " worldY = "+MundoY,1,400
PRINT " tilex = "+tilex + " tiley = "+tiley+ "bla-bla-bla---bla"+map,1,416
//Cambiar el middlehandle del sprite
MOUSESTATE mx,my,b1,b2

IF b1=1

// DRAWRECT mx-1,my-1,20,20, RGB(0,255,0)
       GRABSPRITE id,  mx-1,my-1, 20,20
       //  USESCREEN 1  // con esto se cuelga
         DRAWSPRITE id, mx-20,my                   // <-- ¿Como pongo esto en el fondo o blaground?
         USEASBMP
     //    ¡USESCREEN -1 // con esto se cuelga
         SHOWSCREEN

ENDIF



SHOWSCREEN

GOTO main