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

Messages - Jonás Perusquía

#46
Hi, i have a game (DitraFall) where i show an image in the background and some text is displayed, but i would really like to scale that text to fit several screens, and i want to achieve this by doing this:

Code (glbasic) Select
SUB intro:
WHILE TRUE
rel.released();
STRETCHSPRITE 21,0,0,sx,sy
INC mn,1

X_MAKE3D 1,1000,45  // TEST FOR SCALABLE TEXT //
X_CAMERA 0, 0, 0, 0, 0, -1
SETFONT 8
IF PLATFORMINFO$("LOCALE") = "es"
X_PRINT "presenta...",sx/2-(LEN("presenta...",TRUE)/2), sy/1.5, -1, 1//TRUE // TEST FOR SCALABLE TEXT //
ELSE
X_PRINT "presents...",sx/2-(LEN("presents...",TRUE)/2), sy/1.5, -1, 1//TRUE // TEST FOR SCALABLE TEXT //
ENDIF
IF mn > 260
PLAYMUSIC "hola.mp3", TRUE
X_MAKE2D // TEST FOR SCALABLE TEXT //
IF PLATFORMINFO$("LOCALE") = "es"
GOSUB MENU
ELSE
GOSUB MENUE
ENDIF
ENDIF
SHOWSCREEN
rel.released();
WEND
ENDSUB


but no text is displayed :( is there something wrong with the X_CAMERA or X_PRINT commands i placed?

i already tried commenting the STRETCHSPRITE but still nothing displayed... thanks in advance :) you guys are awesome
#47
PLAYMUSIC WORKS AMAZING, ALSO I CAN PLAY .MP3 OR .WAV FILES IN ANY FOLDER!!!

THANK YOU FOR YOUR HELP, MY APP IS FINALLY WORKING! :D
#48
Im trying to play those wav files, not mp3 files but not works, also maybe the wav files are encoded different?

Anyway, im going to try PLAYMUSIC thank you
#49
Are you sure?
i ask because in the help document says:
Code (glbasic) Select
LOADSOUND file$, num%, buffers%
channel% = PLAYSOUND(num%, pan#, volume#)

Sample:

LOADSOUND "Super.wav", 0, 1

PLAYSOUND (0, -1, 1)

also i am using:
Code (glbasic) Select
SETCURRENTDIR("Media") // go to media files
Anyways, doing what you suggested compiles without errors but still without sound :(
#50
This is my App (screenshot) and translation is below:

Sound Effects Player v1.000
Select the sound effects you wish to use:

bear_growl_y.wav - Press 1 key
sound 2 - Press 2 key
sound 3 - Press 3 key
sound 4 - Press 4 key
sound 5 - Press 5 key
sound 6 - Press 6 key
sound 7 - Press 7 key
sound 8 - Press 8 key
sound 9 - Press 9 key
sound 10 - Press 10 key
only .WAV files are admitted

The intention of my App is to select a button (click it) and then file dialog appears, allowing you to choose a file, after closing the dialog with choosen file, the name of the file is displayed on the button BUT the main feature is to be able to reproduce the sound of the file, pressing a key, so you can play many sound just pressing keys...
Useful for theater plays
#51
Thank you for your help,

The LOADSOUND shouldn't have problems since im using: SETCURRENTDIR("Media") // go to media dir

that's why i'm stripping the full path, all sound files are located in "Media"

Code (glbasic) Select
** EDIT: Is there any reason you used a STRING type for the pos variable?
mistake :D


Still not working the LOADSOUND, I don't know why it doesn't work :(
#52
thank you for your help, im unable to reproduce sounds, :( wav files

both solutions gave me the filename, but how to make it usable with a FOR, TO , LOADSOUND?

here is my App:

Code (glbasic) Select
number=10
DIM sound$[10]
DIM pos$[10]
DIM keycode$[10]
keycode$[0] = "02"
keycode$[1] = "03"
keycode$[2] = "04"
keycode$[3] = "05"
keycode$[4] = "06"
keycode$[5] = "07"
keycode$[6] = "08"
keycode$[7] = "09"
keycode$[8] = "10"
keycode$[9] = "11"

Code (glbasic) Select
WHILE TRUE
DDgui_show(FALSE);
SHOWSCREEN
FOR files=0 TO (number)-1
IF DDgui_get$("sound"+files, "CLICKED") = TRUE
sound$[files] = FILEREQUEST$(TRUE, ".wav|*.wav|Todos los Archivos|*.*")
pos$[files] = REVINSTR(sound$[files], "/")+1
sound$[files] = MID$(sound$[files], pos$[files])
DDgui_set("sound"+files, "TEXT", sound$[files])
LOADSOUND sound$[files], files, 1
//LOADSOUND DDgui_get$("sound"+files, "TEXT"), files, 1
ENDIF
IF KEY(keycode$[files]) = TRUE THEN PLAYSOUND(files, 0, 1)

NEXT
WEND


keycode$[10] is defined as "02", "03" to match key code

is anything wrong? thank you
#53
this is great! nice work on there :D
#54
Hi people :)

Is there a way to get only the filename with FILEREQUEST$() or DDgui_File() ?

I want my App to import .wav files and play them, but these ones give me the full path :(


Thank you in advance :D
#56
thank you for your replies, can't X_PRINT work also? it has a #scale property...

The game where i would like to resize the text and sprites (i see it's posible to resize sprites) it's in 2D mode, but i think 3D mode allos scaling of sprites and text, anyway i will keep looking and thank you for the links! they will be very very handy
#57
Hello all of you :), i just wanted to ask you if it was posible to resize a Font using for example using GETFONTSIZE command?

Thanks in advance :)

I would like to create a big Font file and resize the characters at any size, depending on screen resolution :)

maybe something like this?

Code (glbasic) Select
GETSCREENSIZE sx, sy
GETFONTSIZE tx, ty
tx = sx/99
ty = tx * 1.2


what about using X_PRINT?
#59
hey Kitty Hello, i think the translation of the "Setup: Pack&Go" feature is incomplete, since the language shown is German
#60
Easy way to test your games:
http://www.socketeq.com/

real Android running under Windows... Windroy

btw, i'm unable to open my game DitraFall on it, my game just goes FC, but hope it Works for you :)