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

Pages: 1 2 3 [4] 5 6 ... 24
46
Nice, was there any glfw wrapper/include examaple or only straight OpenGL stuff?
btw. You are on some quest? First SDL2 now GLFW, what's next? ;) Vulcan/Metal :D

47
Nice inline stuff, but that quest is to hard and this ImGui library looks strange, so many build/include options oh..
Briefly looked at it, and from one hand it doesn't have it's own lib/a file, but when checking some makefiles that people are using to build apps with it - they are including main cpp files as a library:
for example:
add_library(${PROJECT_NAME}
  src/dynamic_reconfigure.cpp
  src/imgui_ros.cpp
  src/image.cpp
  imgui/imgui.cpp
  imgui/imgui_demo.cpp
  imgui/imgui_draw.cpp
  imgui/imgui_widgets.cpp
  imgui/examples/imgui_impl_sdl.cpp
  imgui/examples/imgui_impl_opengl3.cpp
  imgui/examples/libs/gl3w/GL/gl3w.c
)
and somwehere there is also: "/devel/lib/libimgui/imgui.cpp.so" so it look's like sources need to be compiled as lib file or included somehow in link stage...
Checked some tutorials for that lib, it should be easy to use it, but all of them are using makefiles, not direct g++ command lines. That's best in such solutions, over complicating simple thing in a way so it's hard to bite it..

btw. inline in GLB can be tricky :D

48
Looks that PlayMovie is only Win32 and iOS? So not sure if that's best solution. On windows MCI command are used, maybe something needs to be updated, but there is a other solution, using c++ with ffmpeg libraries. Yet You would need to write a little inline code for that, not sure if You would be interested but here is a good example: https://github.com/bartjoyce/video-app

49
Bug Reports / Re: GLB Update Fail
« on: 2020-May-01 »
hm.. Steam is installed in 'Program Files' directory, on newer Windows modifying file in that path may require admin rights. Are You running Steam with 'Start/Run as admin'?

50
Quote from: spacefractal
but the task manager might still shown the app, but all resource is killed and released the memory and the app will restart. This is far better than a crash on quit.
I think that many app works that way? They are still shown on task list, but tapping on them just relaunches app, so not a problem it this not raise any big errors.

btw Android target is using older SDL or SDL2?

51
Bug Reports / Re: kerning issue?
« on: 2020-May-01 »
From what I understand, in such example it's working as it should, because font bitmap background is red so it's treated as part of a font, in order to change font transparent color (that will be omitted during drawing and such functions like LEN or rather when loading a font) use "SETTRANSPARENCY color%". Default transparent color for loaded font is black.

52
Bug Reports / Re: kerning issue?
« on: 2020-May-01 »
hm.. I'm using Print only for basic info like FPS counter, for in-game stuff using my own text drawing routines. Can You provide any small source / project to verify that fast?

53
GLBasic - en / Re: Playmusic freeze
« on: 2020-Apr-29 »
@SnooPI: nice tools but out of my artistic possibilities ;-)

So best advice is to use either small mod files (will check that in next project), use PlaySound with wav's, or changing music track only when in menu, this can be some solution, but only for games that have quite short level time play. Maybe this could be minimized by changing audio buffer size in source or something, btw. is ther way to force using SDL_mixer on Windows, as I assume it's using DxSound as default.

But if someone has similar problem and target platform is Windows you can use SDL2 Mixer, it plays mp3 files without freezes. Surely could be used on other platforms if someone has time to test and fix stuff..
Example lib in attachement, usage:
Code: (glbasic) [Select]
GLOBAL mySDL AS SDL2_helper
SDL_vibes.MusicPlay("music.mp3", 0)
// other commands are similar: MusicIsPlaying(), MusicStop(), MusicPause(pause_it), needs volume control
// and on quit:
mySDL.CleanUp()
SDL2 just needs some setup: check this and You need to add SDL2_mixer stuff to that include/libs/dll..

ps. Maybe those Android issues are due using old SDL? hm..

edit: if target is 60fps with full game logic inbound, it still can freeze game for few frames - on hdd, on ssd didn't noticed drops when previously it could freeze game for 300ms, but this is a fast straight forward solution. Best would be either loading music files from other thread or just use couple SDLmusic object's as tracks, load them once and later just play - don't destroying object and reload it each time..

54
GLBasic - en / Re: Playmusic freeze
« on: 2020-Apr-29 »
With playsound there is one problem that You need to load all music files into memory and wav's ale larger that ogg/mp3, so if I have couple music files they will take some time to load and will occupy precious ram :/
Yet I'm checking some other solutions, currently testing SDL2 mixer and it looks that this way mp3 files can be played without visible freezes during gameplay.

ps. *IT files, You mean mod music? this also may be an idea but will need to find such resources that would fit my project.

55
GLBasic - en / Re: Playmusic freeze
« on: 2020-Apr-29 »
It's not only Your pc problem erico, this is still a thing.. ofc will be dependent on file and mostly hard drive that's in use, surely more notable on hdd than on ssd, and this annoys me. Remember days that I wrote some mp3 player with VB6 that was using Win API precisely MCI stuff, there was no visible file loading time as file was read in chunks, and now this... :> So what is the best solution for now? As SnooPI mentioned use only PlaySound even for music (what sound format it currently supports fo have proper results? mp3 will work or only wav's or something :/) or maybe using threads and PlayMusic from separate thread (would that be safe for all platforms and so on)??

btw. any one has that multi-threading code as can't find working attachment on forum with any source..

56
File is in the shoebox, as I said, same code, same shoebox file: compiled with GLB v16 doesn't work, but compiled with v15 work without problems. Host OS not important, same results on win7 and win10.
Maybe some compression code for unpacking shoebox files was changed or something.. other thing is that shoebox tool from v16 makes a little different file than v15, image packing is same, differences only aplies to *wav files, difference in size in negligible (literally few bytes per file or something).
To get that error just compile with v16, and run that bat file that's in 'shoebox_bug.app' directory. Don't know if that's some internal GLB error or image processing library dependend.

57
hm.. don't get me wrong, as GLB is rather game programming language I would consider such feature like playing movies only for intro or something like this.
Not sure in what container (mpeg, mp4, avi, mkv, mov) and what codec (mpeg2, x264 and so on) should file use to be playable, tried few file that were on hand without a luck. If You want to know exactly what combination of container/codecs are used in some file get any advanced video player, best would be VLC and open that file, got to tools - info about codec. And pls share result's this may be helpfull ;-)

58
Windows 7.. same code, GLB v16 - Steam crashes, older standalone v15 works without problems.. 32bit PNG images.. will check on Win 10 laptop later, and with other png depths..
That's it if You uncomment SETCURRENTDIR than LoadSprites first goes to Media dir and load sprites from that location, not from ShoeBox, loading normal files is ofc ok, but loading from Shoebox fails.

Edit: reuploaded with 32bit png's and it crashes as mentioned above on my machine, only happens with Steam version, don't have previous v16 backups before updates so can't tell if it;s something new or what.

59
hm.. serious problems :/ Not sure if I get all right.
does calling sdl to stop music/sound before calling GLB_ON_PAUSE also causes issues? If not, this could be an option to stop audio like this by automatic, and the in main game loop dev would just need to check ismusicplaying after getting resume flag from GLB_ON_RESUME.

What's currenlty needed to target Android from GLBasic - Android Studio surely, and some specifi JRE, JDK or something? Rather for curiosity, and just to see if my chinese device has some additional debug options ;-) Ah and can I install those tools in any directory or it need to be specific, like "C:\Android_crap\" ?

Below will be deleted after gettint resposne:
Other thing: is there way to get current GLB source (as downloads from GLBasic Dev ┬╗Sourcecode) point to old source version without those bat scripts for autoupdate.

60
Hi, unfortunatelly during final release tests of my project I encoutered serious bug in Steam version v16.
Trying to load sprite larger than 128px from shoebox will fail with fatal error like this:
Code: (glbasic) [Select]
Error: 3. Not a JPEG file: starts with 0x02 0x00This wasted me couple of hours figuring what's wrong with my game, as that info is outputted in stderr stream so wont appear in editor, and I forgot to include stderr in *bat file for outputting stdout..
Problem appears in v16 (Steam version), I checked and v15 ofc is working properly.
Simple project to show the issue. Baisically put larger sprite like 1024x1024px in shoebox then:
Code: (glbasic) [Select]
SETSHOEBOX "Media.sbx", ""
LOADSPRITE "sprite.png", 0
Will crash app... Hope that this will be an easy fix ;-)


Pages: 1 2 3 [4] 5 6 ... 24