View Full Version : What are you up to?
Hi Guys, I know it is August and we are all sort of on a vacation... but missed hearing from everyone. So thought this would be a good way to get everyone to chime in on what they are doing.
Hope everyone is enjoying themselves and can drop in a line or two to fill us in on what you are doing.
I will start by saying that I am studying powerBasic in order to be able to write stuff, like tools for thinBasic game development. I am also working on a "test track", actually a 3D model level that I want to put out for the thinBasic community that can be a fun level to test out your gaming ideas and media.
Michael Hartlef
03-08-2007, 06:51
I don't work with thinbasic at the moment. I'm waiting for some improvements like nested UDTs in the language.
My major time is now on none-thinBasic projects. Roberto got me hooked on the .NET languages ;D Juuuuust kiddin... ;D
Michael Clease
03-08-2007, 08:33
still playing with my platform game and some more fractal stuff to come.
Roberto got me hooked on the .NET languages Grin
My jaw was dropping when I started to read that, then I saw the just kidding part and had a nice chuckle. You had me on that one Mike!!
Abraxas what is your platform game? Any links or info? And oh yeagh more fractals... sounds nice.
Michael Hartlef
03-08-2007, 11:23
I was kiddin only about the .NET part. :)
Michael Clease
03-08-2007, 12:00
kryton heres where i first posted about it. http://community.thinbasic.com/index.php?topic=947.0
I will post a new pic when i go home for lunch but it does look and different.
I work on it when i can really be bothered or have the time (not very much then).
added picture
ErosOlmi
03-08-2007, 14:11
Is that a thinBasic project? :o
Petr Schreiber
03-08-2007, 14:18
I want a demo ;D
It looks good, magician ( or what he is ) is well masked so no rectangle around him ...
You use some kind of per-tile collision system ?
I am sure it will be fun !
Bye,
Petr
Michael Clease
03-08-2007, 14:22
yes.
Petr helped me speed it up using a model for the background but I am thinking of grabbing the whole screen as a texture should be quicker to draw 1 large quad (maybe).
collison is pants at the moment its per tile and per pixel(cheat) when i get round to it but I am lazy so things take quite a while.
no where near good enough to release anything.
ErosOlmi
03-08-2007, 14:29
wow, I'm always too much concentrated on the language and forget what is possible to do with it. ;D
But that is my duty 8)
Michael Clease
03-08-2007, 14:40
if i have the time i will post my new factal script tonight.
I just need to speed it up and do something with the Colours.
ErosOlmi
03-08-2007, 14:47
Did you see my posts on using a little DLL to speed up fractal calculations?
Here using FreeBasic: http://community.thinbasic.com/index.php?topic=1076.msg7189#msg7189
Maybe it can help. The idea is to isolate some of the repetitive math expression putting them into an external compiled DLL.
I know, it is not native thinBasic. Bealive me, there is no day I'm not on coding trying to find ways to improve thinBasic speed
Ciao
Eros
Michael Clease
03-08-2007, 15:56
yes it worked really well.
I look at the script and was wondering how i would pass data back to an array for the x,y positions and the colour maths.
FUNCTION Mandel_Loop2 Cdecl ALIAS "Mandel_Loop2" (BYREF x As Double, BYREF y AS DOUBLE, BYREF Col as BYTE)
is that correct?
ErosOlmi
03-08-2007, 16:07
Passing a variable BYREF means passing a pointer to the data.
In this way if you change that parameter value inside you external function you will also change original data.
BE SURE to pass a variable with the same type of the parameter passed BYREF otherwise you will get GPF.
I mean if you pass BYREF MyVar AS DOUBLE be sure that the passed variable is DOUBLE type.
The same as BYREF ... AS BYTE be sure to pass a BYTE variable.
Eros
Michael Clease
03-08-2007, 16:09
thanks will try and remember to stick to that.
ErosOlmi
03-08-2007, 16:43
When dealing with numeric parameters passed to external functions (inside DLLs) that is the only important point not to forget.
If function declares a parameter BYREF ... AS TYPE, be sure to use a variable of exact that TYPE.
If function declares a parameter BYVAL ... AS TYPE, you can use whatever because in reality compiler (or interpreter in this case) will first evaluate a numeric expression result and than result will be assigned to a temporary variable of the requested TYPE to be passed to the function.
So, BYVAL will usually never create problems but you cannot return a value.
BYREF has a lot of power but must be checked carefuly.
Of course, external function declaration must adhere with the specific indication of the DLL creator.
You cannot decide to declare BYVAL or BYREF by yourself. You must have indication from the DLL author. In this case author should be you so ... ;D
Ciao
Eros
ErosOlmi
03-08-2007, 16:49
Also remember you can pass arrays of any numeric type.
Arrays are usually nothing more than consecutive multiples of a specific type. So for example an array of 10 LONG (LONG = 4 bytes) is nothing more than 40 consecutive bytes of memory. And a pointer to the first array element is in reality also a pointer to the full array. To get all the values you just have to move by 4 bytes each time.
Having:
a pointer to the first byte of an array
the array data type
and the number of elements
you have all the information to read and/or write into the array.
Ciao
Eros
@Abraxas, looking at the original post and the new one it is easy to see the improvements. Looks like it will be fun to play with a wizard
as a main character!
@Eros, thanks for the explanations, I need to read those kind of posts often to keep it straight as I don't use it, I lose it :)