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.


Topics - S.O.P.M.

Pages: [1] 2 3
1
Hi guys,

since a few days I suddenly got the compiler error "error: 3" for win compiling. My code seems to run fine though. I've absolutely no clue what this error mean so I ask you, did you ever discover them too? "Injection started" and then 6 lines of "error: 3" without any hint what's going wrong. I made some changes before, yes, but I was not able to find out what changes caused this. I do many backups but to restore an old version could kill my progress.

Any ideas?

S.O.P.M.

2
Good morning,

I wonder how to use DIMPUSH in the following way, if possible. I've a 128 x 24 two dimensional array and I'm looking for an easy way (as less code as possible and standard basic only, of course) to add emtpy rows and columns to it.

To add these rows/columns below and on the right side I simply can REDIM that array - everybody knows that. But I also want to add on top and on the left side! Then I have to shift the array contents element by element which could be quite slow and inefficient. How can I use DIMPUSH for that?

What I also want to know is, how do professional programmers handle this situation high efficient with any array they use in their application? With the same code/function? Working with lists maybe?

The perfect solution for me would be to have one single function where I can pass every array and add a row or columns on every position. For example something like AddColumnRow(Array[], [Row][Column], Position)

Thanks for your attention, have a good day.

-S.O.P.M.-

3
<a href="http://www.youtube.com/watch?v=VFMDs7xWBBE" target="_blank">http://www.youtube.com/watch?v=VFMDs7xWBBE</a>

Hello, please watch this short demonstration. This is my current project. For several reasons I've written my own window- and gadget-management that fits my purposes perfectly. The game itself is already there but I've to rebuild the user interface with a new level editor. Design comes later. Anyway, I've no clue at the moment, why everything is running so slowly, the old application reached 60 fps on Android easily.

The window management works as follows. Windows are defined via functions and stored in arrayed types. Then there's a window list to define the order all opened windows will be displayed. Only windows that can be visible will be drawn so for performance reasons it's basically not necessary to close each window when a new one is completely in front of the other. There can be subs that are appended to each window and will be called via the CALLBYNAME command.

Is it known that this command causes trouble under Android? At least I've never used it before.

Also each window has it's own gadget list that tells the window drawing routine which gadgets has to be drawn within a window. And there's a buffer for a window background- and foreground drawing routine. Gadgets will drawn between. Finally each window has a function list that contains all functions that are executed before everything will be drawn. These functions can be triggered by changing window state slots.

Unfortunately I cannot show you the full source code because the project shall go a little beyond the hobby state, let's say.

Any suggestions what could cause the speed issue? Note the sudden speed gain when the world overview window is opened. And I can tell you for sure, all other windows are still there...

4
GLBasic - en / GLBasic IDE Font
« on: 2014-Jul-12 »
Hello everyone,

today I would like to know what font are you using for the GLBasic editor. The reason I ask is because I changed it from time to time and till this day I've never found the perfect looking one for me. There's always something that I don't like. Sometimes it's a spacing issue for certain chars or the anti-aliasing doesn't look always good depending on what line/column/char is displayed or what size the font has. Currently I use a font called "DejaVu Sans Mono" whereby I've the best looking result for my liking. I think I'll keep it until I found a better one.

Maybe you can also tell me what are the best free fonts for coding and where can I download it?

Thanks for your attention :)

S.O.P.M.

5
Hallo,

mich beschäftigt zur Zeit dieses Thema, da mein Rechner, der ja alles andere als High-End ist, da keine Geschwindigkeitswunder vollbringen kann. Wie schnell compiliert GLBasic bei euch? Als aktuelles Beispiel habe ich mein Projekt, welches derzeit rund 2500 Befehle umfasst. Die Erstcompilierung dauert rund 18 Sekunden, was in meinen Augen schon recht viel ist. Diese Zeit kann einem schon lang vorkommen, wenn man davor sitzt und wartet.

Daher würde mich sehr interessieren, wie lange das Compilieren bei euch so dauert. Bitte testet das mal und schreibt eure Werte hier rein. Auch bitte die verwendete Hardware, falls sie nicht schon in der Signatur steht.

@Schranz0r: gerade bei deiner Hardware würden mich die Zeiten interessieren um mal einen Vergleich zu haben, was noch so gehen könnte.

Ich selbst werde mir sobald keinen neuen Rechner zulegen, weil sich das nur für GLBasic nicht lohnt. An aktuellen, ja selbst älteren, 3D-Spielen bin ich gar nicht interessiert. Aber für einen i5 Prozessor in Kombination mit einer SSD kommen mir meine Zeiten etwas lang vor. Zum Vergleich: vergleichbare große Projekte in PureBasic brauchten nur einen Bruchteil der Zeit zum compilieren. Hm...

6
Hello,

while I'm working on a quite large project there're 2 features/improvements that would help me alot to code much more comfortable. I'm one of the programmers who compile really often while coding so compiling speed is a very important issue for me. In my current project I use 8 .gbas files and skipping of unchanged files makes compiling much faster, that's fine. But some of these .gbas files become larger and larger and I've no idea to split the project in much more single files to keep a good overview and a sensible code seperation.
So it would be fantastic if GLBasic would handle the code skipping different in the future. The compiling speed could be still much more improved if only the code segments would be compiled that were really changed, added or deleted since the last compiling. So GLBasic should record the changes I make inside a code file and only compile that - file independent! Would it be very hard to implement?

Another thing is that I look for a way to monitor several variables, fields of variables in a fast and comfortable way. When I search for errors I don't want to add and delete different display routines of variable values to my code. The DEBUG command might be useful for single variable monitoring but to have a good overview of several ones, especially areas of a field variable, a handy tool to select and display my variables, listed in tabular form, would be great to work with!

Thanks for your attention :)

-S.O.P.M.-

7
GLBasic - de / Transparenz-Kanal bei Fonts?
« on: 2014-Jan-24 »
Guuuten Tag,

und zwar wollte ich mal wissen, bevor ich mir die Arbeit mache, ob bei den Bitmap Fonts, die GLBasic nutzt, ein transparenter Kanal möglich ist? Sprich, der Font wäre dann eine 32 Bit png-Datei. Die Frage deshalb, um das Problem mit den 1-Pixel Zeichenabständen zu umgehen, ohne eine eigene Routine schreiben zu müssen. Ich stelle mir nämlich vor, einfach ein paar transparente Pixel an jeden Buchstaben zu setzen, um so mehr Abstand zu gewinnen. Hat das jemand schonmal probiert?

Danke & Gruß

8
Hello,

until now I wrote games and applications for a fixed screen resolution which is quite easy. But now I want to code something that works dependable on several mobile devices whatever the screen's resolution is. The method to scale each element separately during runtime and calculate each position would be very disagreeable for me. The smartest solution I guess would be to have a virtual screen with a fixed size to draw everything on and resize that image to fit the current screen resolution.

Is there a way to do that (without using 3D commands or Inline C++ of course)?

There must be a smart way to accomplish that otherweise GLBasic is not the easiest programming language. Every todays game can work with different resolutions. The possibility to code such thing should be self-evident :/ It's urgent!

Thanks,
S.O.P.M.

9
Hallo,

ein für mich bisher nicht überschaubares Problem bereitet mir Kopfzerbrechen. Ich suche nach einem möglichst einfachen Weg, wie eine Anwendung mit jeder Auflösung auf allen mobilen Geräten zuverlässig funktioniert. Bisher war ich es nur gewohnt, für eine feste Auflösung zu programmieren. Die Variante, sämtliche Positionsangaben und Spritegrößen zur Laufzeit umzurechnen halte ich für sehr ungeschickt und das wäre mir der allerunliebsamste Weg. Als eleganteste Lösung stelle ich mir vor, die komplette Grafik auf einen Grafikbildschirm zu zeichnen und diesen dann zu skalieren auf die aktuelle Auflösung. Dann könnte ich praktisch Programmieren wie immer und müsste mich um den Rest nicht kümmern.
Wie ist das am besten zu bewerkstelligen? Wäre um Rat sehr dankbar, es ist dringend.

S.O.P.M.

10
GLBasic - en / 2D Lightning & Kerning
« on: 2013-Apr-29 »
Hello guys,

I wonder how to make good light effects in a 2D game. Then I thought I can make a kind of mask for each light that has a gradient from completely transparent to non transparent pixels. The result you can see in the attached file (you can move the lights by mouse). It looks quite good for the first try but it seems that GLBasic doesn't use the entire transparency range. The gradient suddenly stops before the last very transparent pixels and so I have these annoying edges. It still doesn't look like a natural light. I could use several masks that can be combined to make various light shapes but I always have these edges. So anybody an idea for a workaround?

The second thing is the font kerning option. I know this was thematised before but I think this is still important to change. As you can see in this demo the lettering "Lightning Demo" doesn't look nice. That is because the font kerning option always uses a single pixel space between the letters. 1 pixel space looks good for small fonts which 1 or maybe 2 pixel thickness. But in this case it would be really helpful to just have the option to make the space bigger. I am sure this would be really easy and fast to implement. And yes, I know there's a workaround for this but it cannot use in every situation. So please Gernot, think about it!

Thanks,
S.O.P.M.

11
GLBasic - de / Nicht-kachelbasierte Map Engine
« on: 2013-Apr-13 »
Hallo,

eine vielleicht nicht ganz so triviale Angelegenheit aber sicher auch gut lösbar, nur ich komme noch auf keine richtig befriedigende Lösung bisher: mich würde interessieren, wie man am sinnvollsten eine Map Engine schreibt, die nicht auf Kacheln basiert - heißt konkret, die Map ist nicht aus gleichgroßen Kacheln zusammengesetzt, sondern besteht aus unterschiedlich großen Sprites, die völlig nach Belieben angeordnet sein können. Nun stelle ich mir vor, dass alle diese Sprites für die Map in einem Array eines Types abgelegt sein müssten, in welchem X-Y-Position, Sprite ID und vielleicht die Ebene erfasst sind. So weit so gut. Nun müsste ja jedesmal das komplette Array durchgegangen werden, um herauszufinden, ob ein bestimmtes Sprite sich gerade im Bildausschnitt befindet und gezeichnet werden muss. Bei einer großen Map mit sagen wir ein paar tausend Objekten bestimmt zu langsam oder? Aber dann kommt auf jeden Fall noch die Kollisionserkennung dazu, für die ja schon wieder das gesamte Array durchforstet werden müsste, ob ein Sprite gerade mit z.B. dem Spieler kollidiert. Da es kein klares Raster gibt, lassen sich die für die Prüfung infrage kommenden Objekte nicht eingrenzen, das ist mein Problem. Dann hatte ich mir überlegt, dass es doch ein Raster geben müsste, also wie mit Kacheln, nur dass jede Kachel in einem sehr eingegrenzten Bereich durch Offset-Angaben verschoben dargestellt werden kann, für eben die künstlerische Freiheit der Map. Dann hätte man alles wieder in einer geordneten Struktur, nur was wenn in einem kleinen Bereich mehrere Objekte dargestellt werden sollen? Ich hoffe, mein Problem nachvollziehbar geschildert zu haben. Es geht im Grunde darum, eine geeignete Datenstruktur zu finden, um schnelle und gezielte Abfragen zu ermöglichen.

Gruß
S.O.P.M.

12
GLBasic - en / GLBasic IDE graphical failures
« on: 2012-Mar-15 »
Hello,

I really want to know if anyone else has these problems with the GLBasic IDE. For me often I cannot continue my work because of graphical failures which make the IDE not longer usable. There are different situations, one of them you can see in the screenshot. Mostly the menu stops working, means, that all the entries are gone. But sometimes the whole editor window is messed up.

Please don't tell me it's my computer - it should be fine because all other software is running properly!

[attachment deleted by admin]

13
Hey all,

it's a shame but I just realised what the multisampling option is for. I always thought that GLBasic cannot do anti aliasing which is common for every modern game of course. But this option does not work for me, I can't believe it. Have a GeForce 310M graphics card where you cannot tell me that it doesn't support that. So if I have the multisampling option activated all sprites are white rectangles :O and for DRAWLINE there's no effect. Also the application crashes often.

The second thing I struggle with is how to write a game that works with different screen resolutions? Almost every modern game isn't bounded to a fixed resolution, right? How to manage this in GLBasic, that's my question. One possible solution would be to draw everything in the game and then take the whole screen into memory and draw a resized image with the final resolution but as I fear this will not work properly because: to get fine looking graphics you would have to draw your game in the highest resolution and downsize it. Now if the resolution is set not to the highest one the game supports you would have to draw also outside of the screen and that content cannot be read by GRABSPRITE, right?

Another solution which cannot be the real one is to draw all the elements in the game already resized with percental values for the position on the screen - very inconvenient and hard to do for my understanding.
So which way you would do that task?

14
Hello,

there are 2 things I worry about. First I wanted to compile for an Android phone and another is somewhat special.

1. The Android compiling problem: As I've understand GLB does not only compile for it, it also installs the App on the Android device after that. Step 2 was not working for me so I copied the apk file to the device manually and installed it. I was able to get it to run but there were no sprite and font files loaded. What's the reason, aren't they included in the apk file?

2. I want to create an executable with graphic files for sprites and fonts included. I remember there was a demo that showed the trick but I can't find it anymore. Can someone please tell me how to do that?

Thanks in advance!

15
Der Titel sagt eigentlich schon alles. Zum ersten Mal fällt mir auf, wenn ich ein Beispiel mit INLINE compilieren möchte, dass das nur im Demomodus läuft. Ich habe noch die alte Lizenz, "2D und Net", die also keine 3D-Befehle beinhaltet. Hat das seine Richtigkeit oder ist das ein Bug? Getestet mit Version 10.001.

Pages: [1] 2 3