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

#391
Any new additional target platform would be great, specially such emerging and supported by larger company that know what is doing so it shouldn't end like with HP. Of course that OS probably changed a lot from times that GLB could compile for it, so it would require some work to get it on track again. And as you wrote such niche markets can be great place to publish/sell games as there is just a small variety of games on them. There is also another thing, that would be good advertising for GLBasic if it could make apps for new WebOS, as one of only few tools.
There are also some others possible platforms, but it's different story.
#392
New version uploaded, I would call it 'preview' of beta =D As mentioned earlier it's VB 2013, .Net 4.0 and newer ScintillaNet 3.x project. All functions available in previous version should work, and there are few new and nice features.
Now editor uses custom written lexer for GLBasic so all keywords/comments/variables are colored properly, thanks to this I could also implement proper code folding, margins colored depending on changes in code (yellow - new code, changes to green after compilation), bookmarks saved in separate file.
Support for both GLB v12 and v14 compilers, so you can switch between them fast, still compilation tested only for WIN32 target.
Many small changes, fixes to other stuff.
But can't get new auto-completion working properly so I'm still using that simple build into Scintilla itself.
That release is mainly to test new things, and find any bugs to fix, more polishing, and UI changes may come later. It would be nice to get e.g. Debug command working and so on.
Check first post for download, new screenshot and updated feature list.

Note: Current version of Scintilla doesn't use hard tabs (like most of modern text editors/ide), default soft tabs are 4 spaces width,
#393
FAQ / Re: Windows 8
2016-Aug-13
This is kind of offtopic, but I must say that Windows 10 is a bad system, it much depends on your version (Home have less options and more stuff to do with sys registry) and how much time/effort you want to spend to disable annoying things. Like running in background anti-spyware/autoupdate/sys memory optimization/and other tools, if you are on gaming/dev desktop machine with i5/i7 it's not a problem but if you are using office pc, or net designed notebook then those applications can consume even 50% of your cpu power (and of course constant disc usage) during you normal work, so pc becomes unusable. Despite that, they start even if you are using notebook without power adapter plugged-in, so...
No option to choose what update you can install is also a pain, as this also is set to periodic updates in background, I prefer to choose one big cumulative update than daily little patches that clog the OS.
Problems with switching graphic on notebooks (between integrated and dedicated), graphical artifacts in games (testing on different drivers versions), total hang-ons while Alt-Tabbing, Xbox DVR that messes even more. Overall system stability (much more crashes, explorer.exe is stable like in Win XP days), and more more bugs, strange design paths...
You can try to fix some issues with dedicated software, playing with registry but disabling one thing blocks/change another (e.g. in Home version disable auto-updates disable whole Windows Update system, so to do manually updates you need to again enable it in registry and so on). And really is this what a good system should look like? To force user to waste time and fix such things...
After updating my OS and one week on Windows 10 I used 'back to Windows 8.1' option, and I'm happy with it.
#394
Just put that inline to second file and add it to your project, like in my previous post. ;]
Don't remember if you can somehow bypass that and have include in main source...
#395
Hm... probably you need to put Inline part out of main source code, don't remember why atm, but in separate file it works ok:
main file:
Code (glbasic) Select
// Note:
// Check "Project->Options->Console" to make console exe



GLOBAL value%
GLOBAL A$
STDOUT "***INLINE Test***\n"
value=0

STDOUT "Enter Hex Number > "
A$=STDIN$()

scan_key()

STDOUT "Decimal Value = " + (value)

// wait for user input to exit
A$=STDIN$()

second file:
Code (glbasic) Select
INLINE
        }
                extern "C" {
                        #include <cstdio>
                }
        namespace __GLBASIC__ {
ENDINLINE

FUNCTION scan_key%:
INLINE
sscanf(A_Str,"%x",&value);
ENDINLINE
ENDFUNCTION

Another thing that to use GLB variables you need to be in GLB scope/namespace when in Inline.
#396
Get rid of 'startXorY2', or in other words don't use it in such way.
Code (glbasic) Select
GLOBAL startXorY2 = FALSE
GLOBAL Dir = 1

TYPE character
   x%
   y%
   w%
   h%
   moving%
   start_x%
   start_y%
   
   
   FUNCTION init:
      self.x = 200
      self.y = 200
      self.w = 50
      self.h = 50
      self.moving = FALSE
   ENDFUNCTION
   
   FUNCTION draw:
      DRAWRECT self.x, self.y, self.w, self.h, RGB(100,200,50)
   ENDFUNCTION

   FUNCTION move: speed, distance, direction, startXorY
      IF self.moving=FALSE
         self.start_x = self.x
         self.start_y = self.y
      ENDIF
     
     
      IF direction = 0
         IF self.start_x-distance< self.x-speed
            DEC self.x, speed
            self.moving = TRUE
         ELSE
            //startXorY2 = FALSE
            direction = ""
            self.moving = FALSE
         ENDIF
      ENDIF
      IF direction = 1
         IF self.start_x+distance>self.x+speed
            INC self.x, speed
self.moving = TRUE
         ELSE
            //startXorY2 = FALSE
            direction = ""
            self.moving = FALSE
         ENDIF
      ENDIF
     
      IF direction = 2
         IF self.start_y+distance> self.y+speed
            INC self.y, speed
self.moving = TRUE
         ELSE
            //startXorY2 = FALSE
            direction = ""
            self.moving = FALSE
         ENDIF
      ENDIF
     
      IF direction = 3
         IF self.start_y-distance< self.y-speed
            DEC self.y, speed
            self.moving = TRUE
         ELSE
            startXorY2 = FALSE
            direction = ""
            self.moving = FALSE
         ENDIF
      ENDIF
   ENDFUNCTION
ENDTYPE


GLOBAL player AS character
player.init()


LOOP:
   checkForPressedKey()
   player.draw()
   
   IF Dir = 0 OR Dir = 1
      player.move(2, 64, Dir, player.x)
   ELSEIF (Dir = 2 OR Dir = 3)
      player.move(2, 64, Dir, player.y)
   ENDIF
   
   IF KEY(57)=1
      END
   ENDIF
   PRINT Dir,20,20
   
  SHOWSCREEN
GOTO LOOP

FUNCTION checkForPressedKey:
   IF KEY(203)=1
      Dir = 0
   ELSEIF KEY(205)=1
      Dir = 1
   ELSEIF KEY(208)=1
      Dir = 2
   ELSEIF KEY(200)=1
      Dir = 3
   ELSE
     IF player.moving = FALSE
      Dir = -1
      ENDIF
   ENDIF
ENDFUNCTION

But this way is still faulty, as you can interrupt moving in one direction and start moving in another, either use moving/drawing really based on tiles, or set moving direction in character type, that could be changed only in player isn't moving (new move only after last is done).
#397
Any code to begin with? C++ inline gives freedom to use any c lib/function but requires more knowledge about C. If you don't need it, use internal GLB commands.
First include 'stdio' lib as in any C app:
Code (glbasic) Select
INLINE
        }
                extern "C" {
                        #include <cstdio>
                }
        namespace __GLBASIC__ {
ENDINLINE

Then you may use functions from that lib in that source file:
Code (glbasic) Select
LOCAL sentence$ = "Rudolph is 12 years old"
INLINE
char str [20];
  int i;

sscanf (sentence_Str,"%s %*s %d",str,&i);
printf ("%s -> %d\n",str,i);
ENDINLINE

This is example from cplusplus.com
Note that it's using printf (stdout) so result wont be visible in debug window, either use other editor or command line:
Code (glbasic) Select
c:\project\test\your_app.exe >> out.txt
#398
Yeah just you don't get some features out of box like state/animation handling for in-game objects so you need to code them by your self.
Basically I would advise to use StartPoly / PolyVector commands with all images needed for whole particle engine on one sprite  (as sprite atlas) so it would just use one openGL draw command.
You can take a look at those topics:
Sprites or PolyVectors - Mixed Opinions
and Sprite Speed Tester
For some usefully particle example codes look here: X_SPRITE replacement and SpriteZ - 2d particle engine
#399
It all depends on what you need.
Generally I would describe GLBasic as rather game/demo oriented procedural BASIC-similar programming language that sit's on top of C++ core. As it's a language, but not a rapid game dev tool or game engine you don't get all fancy features like physics, particles, animations (and so on) out of box, but you can make/code your own, and thanks to it nature (c++ inline) you can use any custom library for that (or use already made wrappers that are on available on forum).
For another generic platformer, AngryB clone, simple logic, 2d shooting games... it will of course require more work than rapid game dev tools, but it gives you much more freedom, and ability to make more complex games, as just more depends on you as the programmer. Whatever tool you will use it takes more than working game mechanics to have ready to publish mobile game.
Another advantage is that GLB produces real native code with all graphic stuff based on openGL, so it's really fast (e.g. 2d game that needs tons of destructible objects).
If you are not sure, download demo - it's fully functional, look around on forum, grab some example codes, see how they work and think about what you want to have in your project.
Check some published projects made with GLBasic: iOS and Android
Notice that if you are looking for even faster simple prototyping language take a look at html5/js tools as they take almost no time to compile (GLBasic uses c++ to JS translation with emscripten so it takes some time to make html5 output with it).

GLBasic is still maintained, all bugs are fixed from what I know (with help of some community members). But on other hand don't expect adding 'game' changing features to it, at it's more like real indie dev tool.
Future of GLBasic is of course large topic, any website refresh or even putting GLB on Steam would help to get larger user base, but there is other thing: there is so many game developing tools/languages that for potential customer/user it is difficult to discern what to use/buy. In addition to recent price drops/license changes on some more recognized software it would require some good marketing, with support from user made apps (one very successful mobile/steam game with 'GLB splash screen/or made wit GLB' would generate more traffic than ad banners on other websites), and maybe some new tutorials / more complex sample projects.
#400
Yes in that directory you can find c++ sources, full path would be: 'x:\Users\<user>\AppData\Local\Temp\glbasic\'
Files are named sequentially:
gpc_temp0.cpp - main source file
gpc_temp1.cpp - first additional source
and so on.. also few additional header files (*.h) are generated.
#401
Quote from: monkeybot1968 on 2016-Aug-03
The IDE complains when it can't find a file in your project but i can't find the window to add files.
Does it happen in one particular project or more often, does source code file name contain special chars, or is placed in separate directory? You can send me more info with PM, or if you found any other such bug.
Note that project managing is literally very basic, at least for now... Hope that any such bug will be easy to fix.

I need to do some code rework to make it more easy to read (as there are tons of old unused stuff, and so on), beside that it would be nice to have other stuff like code folding, better auto-completion menu, additional functions with parsing (like custom background colors).
Still any debug/tracing/profiler stuff is out of reach for now.
#402
Customizable styles for syntax coloring added (You can find them in 'styles' directory). It's probably last function that I add to this version.
Now I'm switching to VS 2013 with .Net >4.0 to use newer and still maintained ScintillaNET 3.x version, and again main language it will be VB (I just don't have such C# skills to port whole code fast, and patience/time to do it in slower way). Maybe someone has working c# project that can load GLB projects and so on? Beside that ScintillaNET API changed a lot so it requires a bit of time to get it working with all current features. Hope that newer .Net version will also address some issues.
#403
1. Just added colored tabs to my IDE. Their background color depends on file modification counter, for start I used similar colors as on your screenshot.
2. Markers on project file list are doable but needs some testing, they would be saved in project file as additional info, and have no idea if standard GLB ide can save them again if project would be opened with it.
#404
Currently only compiling for WIN32 is working, there were some changes in GLB14 compile scripts, and even in GLB12 I had problems with other platforms so now I just don't test them.
Some important changes today:
- Now each project is compiled in separate temp directory - that is cleared when editor exits. In standard GLB ide, the editor uses one temporary directory for all projects so you can't make small changes in few projects and compile them fast (skipping not changed sources) at same time. Now it's possible. Still I need to check this if all is working fine.
- Ide forces WIN32 plaftorm (as compiling for other targets fails) when loading project.
Thanks to that you can edit your project in br ide, compile it for win32 and test/debug, for other platforms currently use standard glb editor (that uses other temp directory and wont mess with your files).
- Network debugging is disabled - it was done with UDP, but there some problems and it's just better to do it in other app that you can customize, And now you can open few instances/windows of br ide.
- changes in 'show function definition' code, and so on...

Just remember to read first post and setup ide correctly (license file, glb path)..
#405
@r0ber7:
Yes it comes with auto-complete and hints for GLB and user typed functions, variables and types, that was the main reason to start such project. Mostly it's working but there are still some minor bugs.

@Schranz0r:
You know, there is full source code of my editor in download package, with all that VB madness :D and tons of messed code hehe. This was evolving project, and most of unused code is still somewhere in source.