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.


Messages - Yommy

Pages: [1]
1
Bug Reports / Re: RND allways outputs 1
« on: 2010-Jun-25 »
wow, something so simple had me stumped  =D

thanks guys
Yom <3

2
Bug Reports / RND allways outputs 1
« on: 2010-Jun-25 »
Code: (glbasic) [Select]
// --------------------------------- //
// Project: rnd
// Start: Friday, June 25, 2010
// IDE Version: 8.006

GLOBAL Tile = RND(500)
PRINT Tile,1,1
SHOWSCREEN
KEYWAIT

i have tried with various SEEDRND options, and still allways 1 :(
please can you look into this for me

Yommy <3

3
Off Topic / Re: Whatever happened to CogWorks?
« on: 2009-Dec-08 »
i quite liked this game too, i lost my copy of the source gernot sent me last year :(

YomNom

4
Off Topic / Re: IRC Chat
« on: 2009-Nov-05 »
* Yommy moved bot :)
you can add the user count thing back now
freenode is much better, we have nick and chan services :D

5
GLBasic - en / card fan problem
« on: 2009-Sep-06 »
im having alot of problems trying to fan some cards in an arc style
my current code is -
Code: (glbasic) [Select]
count = LEN(p1cards#[])
start = 380 - (count/2)*40 // x of first card
stepangle = 60/count
angle = 30
FOR i = 0 TO count -1

ROTOSPRITE p1cards#[i], i*40+start, 500-COS(angle)*100, angle
angle = angle - stepangle
IF angle < 0
angle = angle + 360
ENDIF

NEXT
which makes it look like



please can someone spot my mistake and explain what i am doing wrong
thanks

Yommy x

6
Quite random, i cannot recreate this bug o_O
im not sure what i was doing wrong the first time.

you fixed it Gernot, iseewhatyoudidthar ("\(^_^)/")

Yommy
glad to be back :D

7
if i add 2 players to the server and then remove them in the order they was created
the last player stays in the server :(

server
Code: (glbasic) [Select]
WHILE TRUE
num% = NETNUMPLAYERS()
GLOBAL gIDs%[]
DIM gIDs%[num%]
PRINT "ID  - Player name",10,40
FOR i% = 0 TO num%-1
   gIDs%[i%] = NETGETPLAYERID(i%)
   PRINT gIDs%[i] + " - " + NETPLAYERNAME$(gIDs%[i%]),10,60+20*i
NEXT

WEND


8
Announcements / Re: IRC chat online count
« on: 2008-Jul-31 »
 =D its all good
i want to help this small comunity grow
already more people using the #glbasic channel now

Yommy

9
Beta Tests / Re: onscreen keyboard
« on: 2008-Jul-22 »
SMOOTHSHADING is default to true, setting this to false has a bad effect too :(

10
Beta Tests / Re: onscreen keyboard
« on: 2008-Jul-22 »
so, the whole draw the keyboard idea went perfect.....until i got the scaling text onto the keys
ROTOZOOMANIM with 36x32 arial font

kinda works, but kinda bleh
also the other idea was multiple font files, but then i may aswell just use keyboard images
anybody have any more ideas to achieve a nice scalable text

Yommy

11
Beta Tests / Re: onscreen keyboard
« on: 2008-Jul-17 »
although a code drawn keyboard wont use resources, i still like the sprite way
its simpler to edit the resource, less code, keyboard can look nicer as an image (gradient etc),
getting the same image result from code would be a waste of resources.

or am i wrong, i dont know, i have only been coding a few days
i dont see any other advantage other than it using no resources

Yommy

12
Beta Tests / Re: onscreen keyboard
« on: 2008-Jul-17 »
ohh now i see, not only do i not have the game in the background, im also stopping the game while the keyboard is active, thanks
i will also give this polyvector thingo a try , i saw your post about round oblong shapes :)
Would drawing the keyboard be more cpu intensive, since this is aimed at devices with no keyboard, ie not 10ghz pc's

Yommy

13
Beta Tests / Re: onscreen keyboard
« on: 2008-Jul-17 »


Code: (glbasic) [Select]
// --------------------------------- //
// Project: gp2x Keyboard            //
// Start: Saturday, July 12, 2008    //
// IDE Version: 5.322                //
// --------------------------------- //
LOCAL text$
Kinit()
KShow(text$)
PRINT text$,20,20
SHOWSCREEN
KEYWAIT

// ------------------------------------------------------------- //
// ---  KCLICK  ---
// ------------------------------------------------------------- //
FUNCTION Kclick: mx, my, BYREF t$
       LOCAL row, key2
       GLOBAL lchars$[], uchars$[]
       LET row=INTEGER((my-13)/25)-5
       LET key2=INTEGER((mx-16)/24)-1
       IF key2<0 OR key2>10 OR row<0 OR row>4 THEN RETURN
       IF row=2 AND (key2=8 OR key2=9) // delete key
              t$ = MID$(t$,0,(LEN(t$)-1))
       ELSE
              t$ = t$+(MID$(lchars$[row],key2,1))
       ENDIF
ENDFUNCTION // KCLICK


// ------------------------------------------------------------- //
// ---  KSHOW  ---
// ------------------------------------------------------------- //
FUNCTION KShow: BYREF t$
//WHILE KeyboardEnabled = TRUE
WHILE TRUE //debug loop
       LOCAL mx, my, b1, b2
       DRAWSPRITE 0,39,138
       MOUSESTATE mx, my, b1, b2
       IF b1 THEN Kclick(mx,my,t$)
       PRINT t$,0,0
       SHOWSCREEN
       MOUSEWAIT
WEND
ENDFUNCTION // KSHOW


// ------------------------------------------------------------- //
// ---  KINIT  ---
// ------------------------------------------------------------- //
FUNCTION Kinit:
       SETTRANSPARENCY RGB(255,0,255)
       LOADSPRITE "lcase.bmp", 0
       LOADSPRITE "ucase.bmp", 1
       LOADSPRITE "symbol.bmp", 2
       LOADFONT "smalfont.bmp", 0
       SYSTEMPOINTER TRUE
       DIMDATA lchars$[],"qwertyuiop","asdfghjkl'","#zxcvbnm##","##      ##"
       DIMDATA uchars$[],"QWERTYUIOP","ASDFGHJKL'","#ZXCVBNM##","##      ##"
ENDFUNCTION // KINIT

im trying to make it so i can easily add this without much code hacks.
i think this is going to fail at showing something in the background behind the keyboard, while the keyboard is in use :(
any way i can avoid this.

Thank you for your help Gernot, it really cleaned up nice <3
Yommy

14
Beta Tests / onscreen keyboard
« on: 2008-Jul-13 »
well i am trying to make an onscreen keyboard that i can use in future projects


Code: (glbasic) [Select]
// --------------------------------- //
// Project: gp2x testing
// Start: Saturday, July 12, 2008
// IDE Version: 5.322
SETTRANSPARENCY RGB(255,0,255)
LOADSPRITE "keyboard.bmp", 0
LOADFONT "smalfont.bmp", 0
SYSTEMPOINTER TRUE
DIM key3$[6][13]
//first row
LET key3$[1][1]="1"
LET key3$[1][2]="2"
LET key3$[1][3]="3"
LET key3$[1][4]="4"
LET key3$[1][5]="5"
LET key3$[1][6]="6"
LET key3$[1][7]="7"
LET key3$[1][8]="8"
LET key3$[1][9]="9"
LET key3$[1][10]="0"
LET key3$[1][11]="-"
LET key3$[1][12]="="
//second row
LET key3$[2][1]="q"
LET key3$[2][2]="w"
LET key3$[2][3]="e"
LET key3$[2][4]="r"
LET key3$[2][5]="t"
LET key3$[2][6]="y"
LET key3$[2][7]="u"
LET key3$[2][8]="i"
LET key3$[2][9]="o"
LET key3$[2][10]="p"
//LET key3$[2][11]="BACKSPACE"
//LET key3$[2][12]="BACKSPACE"
//third row
LET key3$[3][1]="CAPS"
LET key3$[3][2]="a"
LET key3$[3][3]="s"
LET key3$[3][4]="d"
LET key3$[3][5]="f"
LET key3$[3][6]="g"
LET key3$[3][7]="h"
LET key3$[3][8]="j"
LET key3$[3][9]="k"
LET key3$[3][10]="l"
LET key3$[3][11]="ENTER"
LET key3$[3][12]="ENTER"
//forth row
LET key3$[4][1]="SHIFT"
LET key3$[4][2]="z"
LET key3$[4][3]="x"
LET key3$[4][4]="c"
LET key3$[4][5]="v"
LET key3$[4][6]="b"
LET key3$[4][7]="n"
LET key3$[4][8]="m"
LET key3$[4][9]=","
LET key3$[4][10]="."
LET key3$[4][11]="/"
//fifth row
LET key3$[5][2]=";"
LET key3$[5][3]="`"
LET key3$[5][4]="'"
LET key3$[5][5]=" "
LET key3$[5][6]=" "
LET key3$[5][7]=" "
LET key3$[5][8]=" "
LET key3$[5][9]=" "
LET key3$[5][10]="["
LET key3$[5][11]="]"
LET key3$[5][12]="\\ "

LET GLOBAL text$="text:"

WHILE KEY(28)=FALSE
DRAWSPRITE 0,63,159
MOUSESTATE mx, my, b1, b2
IF b1
IF mousefree THEN keyboardclick(mx,my)
mousefree=FALSE
ELSE
mousefree=TRUE
    ENDIF
    PRINT text$,0,0
SHOWSCREEN
WEND



// ------------------------------------------------------------- //
// ---  KEYBOARDCLICK  ---
// ------------------------------------------------------------- //
FUNCTION keyboardclick: row, key2
LET row=INTEGER(my/16-9)
IF row=1 OR row=3 OR row=5
LET key2 = INTEGER(mx/16-3)
ELSEIF row=2 OR row=4
LET key2 = INTEGER((mx+8)/16-4)
ENDIF
IF key2<1 OR key2>12 OR row<1 OR row>5
row=0
key2=0
ENDIF
IF row=2 AND (key2=11 OR key2=12)
text$=MID$(text$,0,(LEN(text$)-1))
ELSE
text$=text$+key3$[row][key2]
ENDIF
ENDFUNCTION // KEYBOARDCLICK

a few questions
how could i make this cleaner?
what would be the best way for the return key?
also im getting a lot of warnings about variables:
"gp2x testing.gbas"(78) warning : probably unassigned variable : b2
"gp2x testing.gbas"(9) warning : implicitly created GLOBAL  : key3$

thank you
Yommy

Pages: [1]