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

#16
Thanks MrTAToad,

I guess since it is a known issue, I shall just sit back and wait patiently for the update  :)

Regards,
Dave
#17
Bug Reports / GBAL Problem
2011-Oct-02
Hi Gernot,

I just started back into a GLBasic Project, after some time away (family stuff).
Anyway, I have updated to the latest GLBasic version 10.118.

I have a very simple gbal file I created, which contains a TYPE with some parameters and functions (a class basically)

Everything works fine when it is used as a gbas file.
when I compress to library, and try to use the gbal in my project instead of the gbas, I get the following error.

Code (glbasic) Select
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.10.074 SN:380c888f - 3D, NET
"DM_GUI_Test.gbas"(17) error : user type is not defined : TYPE FPS_Counter is not declared


FPS_Counter is the TYPE contained within the gbal of course.

However, if I rename the gbal extension to gbas, and add that to my project instead, it works as expected.

Is this a known issue with gbal files containing a TYPE (class)?

Thanks,
Dave
#18
FAQ / Re: GLBasic license
2011-Sep-30
I also would not worry about it at all, because Gernot is very good to GLBasic Users.
He has always been very quick to reply to any problem I have contacted him about, and entirely helpful in his response.
GLBasic has the best support of any software I use.

regards,
Dave
#19
Hi WPShadow,

Thank you for the second example.

About the 40 soldier limit, I will check into that and see if I can figure out a cause.
I will probably test it in C++ and see if I have the same problem there, to determine if it is xors or my wrapper at fault.

About the xEntityParent, that is not a command I have personally used yet, but it sounds as though that is most likely something in my wrapper.
Thank you for the heads up, and I will have a look at it soon.

BTW, I also will provide an update soon, probably at the same time.
It will bring the wrapper to date with the current release of xors, and also, adds a new helper function, thanks to MrTAToad's book.
I learned from the book how to get the hwnd pointer for the GLBasic window, and draw xors in the main window, rather than how it now draws in a second window.
I am already using it and it works well, so it will be added in the coming update.

Regards,
Dave
#20
Hi WPShadow

That would be great if you did.
I don't mind doing it, but I have to do it when I have time, which is often scarce due to my work.

Thanks,
Dave
#21
Thank you WPShadow,

regards,
Dave
#22
Math / Re: Easing Functions
2011-Mar-13
Hi all,

You are quite welcome.
I am glad that this will be useful to other users.   :)

regards,
Dave
#23
Math / Easing Functions
2011-Mar-12
Hi All,

Here is a collection of useful easing functions. I wanted these for a personal project, and decided to post them here as well, in hopes that they can be useful to others as well.
I translated these to GLBasic from the open source actionscript easing functions by Robert Penner. (www.robertpenner.com).

Also included are two mixing functions I added, which can be useful with this library, particularly the inverse mixing function.

Finally I included a sample of usage which includes the inverse mixing function, so you can see how they can be used together.
And of course a screenshot of the output of the sample.

regards,
Dave

Code (glbasic) Select

// ---------------------------------------------------------
// Mixing and Inverse Mixing Functions
// ---------------------------------------------------------
// by David Marconi
// ---------------------------------------------------------

// a = start value
// b = end value
// v = percent between values to return

// return value at percentage(v) between (a) and (b)
FUNCTION mix: a#, b#, v#
RETURN ((b*v) / 100.0) + (a * (100.0-v) / 100.0)
ENDFUNCTION

// return value at inverse percentage(v) between (a) and (b)
FUNCTION mixInverse: a#, b#, v#
RETURN ((a*v) / 100.0) + (b * (100.0 -v) / 100.0)
ENDFUNCTION

// ---------------------------------------------------------
// Easing Functions
// ---------------------------------------------------------
// Based on Actionscript by Robert Penner
// www.robertpenner.com
// ---------------------------------------------------------
//TERMS OF USE - EASING EQUATIONS
//
//Open source under the BSD License.
//
//Copyright © 2001 Robert Penner
//All rights reserved.
//
//Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
//
//Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
//Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
//Neither the name of the author nor the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission.
//THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// ---------------------------------------------------------
// Translated to GLBasic by David Marconi
// ---------------------------------------------------------

// t = current time
// b = start value
// c = change in value
// d = duration

// simple linear tweening - no easing, no acceleration
FUNCTION linearTween: t#, b#, c#, d#
RETURN c*t/d + b
ENDFUNCTION

// quadratic easing in - accelerating from zero velocity
FUNCTION easeInQuad: t#, b#, c#, d#
t = t/d
RETURN c*t*t + b
ENDFUNCTION

// quadratic easing out - decelerating to zero velocity
FUNCTION easeOutQuad: t#, b#, c#, d#
t = t / d
RETURN -c * t*(t-2) + b
ENDFUNCTION

// quadratic easing in/out - acceleration until halfway, then deceleration
FUNCTION easeInOutQuad: t#, b#, c#, d#
t = t / (d/2)
IF t < 1
RETURN c/2*t*t + b
ENDIF
DEC t
RETURN -c/2 * (t*(t-2) - 1) + b
ENDFUNCTION

// cubic easing in - accelerating from zero velocity
FUNCTION easeInCubic: t#, b#, c#, d#
t = t/d
RETURN c*t*t*t + b
ENDFUNCTION

// cubic easing out - decelerating to zero velocity
FUNCTION easeOutCubic: t#, b#, c#, d#
t = t/d
DEC t
RETURN c*(t*t*t + 1) + b
ENDFUNCTION

// cubic easing in/out - acceleration until halfway, then deceleration
FUNCTION easeInOutCubic: t#, b#, c#, d#
t = t / (d/2)
IF t < 1
RETURN c/2*t*t*t + b
ENDIF
DEC t, 2
RETURN c/2*(t*t*t + 2) + b
ENDFUNCTION

// quartic easing in - accelerating from zero velocity
FUNCTION easeInQuart: t#, b#, c#, d#
t = t/d
RETURN c*t*t*t*t + b
ENDFUNCTION

// quartic easing out - decelerating to zero velocity
FUNCTION easeOutQuart: t#, b#, c#, d#
t = t/d
DEC t
RETURN -c * (t*t*t*t - 1) + b
ENDFUNCTION

// quartic easing in/out - acceleration until halfway, then deceleration
FUNCTION easeInOutQuart: t#, b#, c#, d#
t = t / (d/2)
IF t < 1
RETURN c/2*t*t*t*t + b
ENDIF
DEC t, 2
RETURN -c/2 * (t*t*t*t - 2) + b
ENDFUNCTION

// quintic easing in - accelerating from zero velocity
FUNCTION easeInQuint: t#, b#, c#, d#
t = t/d
RETURN c*t*t*t*t*t + b
ENDFUNCTION

// quintic easing out - decelerating to zero velocity
FUNCTION easeOutQuint: t#, b#, c#, d#
t = t/d
DEC t
RETURN c*(t*t*t*t*t + 1) + b
ENDFUNCTION

// quintic easing in/out - acceleration until halfway, then deceleration
FUNCTION easeInOutQuint: t#, b#, c#, d#
t = t / (d/2)
IF t < 1
RETURN c/2*t*t*t*t*t + b
ENDIF
DEC t, 2
RETURN c/2*(t*t*t*t*t + 2) + b
ENDFUNCTION

// sinusoidal easing in - accelerating from zero velocity
FUNCTION easeInSine: t#, b#, c#, d#
LOCAL pi# = 3.1415926535
RETURN -c * COS(t/d * (pi/2)) + c + b
ENDFUNCTION

// sinusoidal easing out - decelerating to zero velocity
FUNCTION easeOutSine: t#, b#, c#, d#
LOCAL pi# = 3.1415926535
RETURN c * SIN(t/d * (pi/2)) + b
ENDFUNCTION

// sinusoidal easing in/out - accelerating until halfway, then decelerating
FUNCTION easeInOutSine: t#, b#, c#, d#
LOCAL pi# = 3.1415926535
RETURN -c/2 * (COS(pi*t/d) - 1) + b
ENDFUNCTION

// exponential easing in - accelerating from zero velocity
FUNCTION easeInExpo: t#, b#, c#, d#
RETURN c * POW(2, 10 * (t/d - 1)) + b
ENDFUNCTION

// exponential easing out - decelerating to zero velocity
FUNCTION easeOutExpo: t#, b#, c#, d#
RETURN c * (-POW(2, -10 * t/d) + 1) + b
ENDFUNCTION

// exponential easing in/out - accelerating until halfway, then decelerating
FUNCTION easeInOutExpo: t#, b#, c#, d#
t = t / (d/2)
IF t < 1
RETURN c/2 * POW(2, 10 * (t - 1)) + b
ENDIF
DEC t
RETURN c/2 * (-POW(2, -10 * t) + 2) + b
ENDFUNCTION

// circular easing in - accelerating from zero velocity
FUNCTION easeInCirc: t#, b#, c#, d#
t = t/d
RETURN -c * (SQR(1 - t*t) - 1) + b
ENDFUNCTION

// circular easing out - decelerating to zero velocity
FUNCTION easeOutCirc: t#, b#, c#, d#
t = t/d
DEC t
RETURN c * SQR(1 - t*t) + b
ENDFUNCTION

// circular easing in/out - acceleration until halfway, then deceleration
FUNCTION easeInOutCirc: t#, b#, c#, d#
t = t / (d/2)
IF t < 1
RETURN -c/2 * (SQR(1 - t*t) - 1) + b
ENDIF
DEC t, 2
RETURN c/2 * (SQR(1 - t*t) + 1) + b
ENDFUNCTION


Code (glbasic) Select

// Sample using easing functions to create a curve
// Also uses mixInverse function to assist easing of a > to < value range
FOR x=0 TO 99
DRAWRECT linearTween(x, 0, 640, 99), mixInverse(0, 480, easeInQuad(x, 0, 99, 99)), 2, 2, RGB(255, 255, 255)
NEXT
SHOWSCREEN
MOUSEWAIT
END


[attachment deleted by admin]
#24
Thank you Ian and Gernot, for the explanation that shoebox is not encrypted, so I guess I am safe to use it.

And my reason is the same as Crivens, just to protect my content to some degree.
I am sure if someone wants it badly enough, they could figure out how to get it, as any lock mechanism.
But if I can at least make them work a bit harder for it, I will.

regards,
Dave
#25
Hi WPShadow,

I already answered you in your PM as you know, but I noticed you asked here also.
So in case anyone else is waiting for this, yes I will add some examples, but I am currently busy with work, as well as finishing some personal projects, but as soon as I have some time, hopefully soon, I will add examples.  :)

Regards,
Dave
#26
I have used shoebox on the iPhone, but only for unreleased projects for the sake of trying it, I am wary about using it for an app I release on the appstore.

Reason is, I am unsure, but I think being a US citizen, it is illegal to release anything encrypted for export, which is not pre approved by NSA, and I think shoebox may fall in this category.
If anybody is clear on how this works, I would appreciate an explanation.
In the meantime, I am just avoiding shoeboxing my content, although I would prefer to use it if I knew I could legally.

Thanks,
Dave
#27
Hi Qube,

Thank you very much for explaining how you set it up.
I followed your instructions, and GLBasic is working  :)

I did notice the same quirks you mentioned.
On the first run when GLBasic asks where to store files, I did not even have time to see the window.
I missed it the first time and had to rerun the program, and just hit the return key as soon as it flashed up on the screen.
Also, as you mentioned, the default font was terrible, not even usable.
I changed the font in GLB's settings, and it looks great now.
I wrote a quick hello world test, and compiled and it ran as expected.

Now I need to try compiling for iphone, that is my main motivation for having GLB on the Mac, so I hope I can get that to work.

Thanks for your help.  :booze:

regards,
Dave
#28
Thanks Gernot,

Ver 9.015 seems to indeed fix both editor bugs I reported.  :nw:

regards,
Dave
#29
Hi trucidare,

Yes, I am looking forward to your IDE, and I am sure it will be better than wine, I just want wine for now until yours is ready.

BTW, I apologize I have not had time working on buttons for you, but if you PM me a list of exactly which buttons you need, I can now finally continue.

I bought a new home about the last time you heard from me, and relocated almost 400 miles away from where I used to live. So I am sure you can understand I have been very busy.

regards,
Dave
#30
GLBasic - en / Mac Crossover
2011-Feb-19
Hi All,

I am curious if anyone here has tried to get GLBasic to run on a Mac using Crossover.
If so, were you successful and how did you get it to work.

I tried this evening, and it installs, but it crashes when trying to run at the splash screen.
I am hoping to get this working.

BTW - in case someone does not know Crossover, but uses Wine - Crossover is just a commercially supported build of wine for Mac. So wine advice may also apply.

Thanks in advance,
Dave