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

Pages: [1] 2
Cheers :-)

Its happened in V12 and V14, running Win 7 64 bit,Geforce GTX660, latest drivers.

As Ian said - drag and drop is fine, just doesnt save - either though "save all open files" or "File / Project / Save"

Only a minor niggle.

Looks like its not possible then, at least through the IDE.

For anyone who's interested though - if you edit the .gbap file in notepad, you can change the order or the tabs there.

Im guessing this isnt possible, if it is Im missing something...

When you have multiple windows / sources open in the editor, Its possible to change the order they appear in by click / dragging the tabs left / right.

However, when you save the project, they revert back to their original positions.

i.e. <tab1><tab2><tab3> can become <tab2><tab1><tab3>

The order they appear in seems to be the creation order of the sources

Is it possible to save the order of the tabs after dragging them around? Ive had a poke around the editor and on here, but couldnt find anything. I'm suspecting not, but worth asking.


GLBasic - en / Re: A question on nested types
« on: 2015-Jun-29 »
I'm nowhere good enough to even consider playing with C++ stuff :-)

Thanks for the advice & clarification folks - I was just wondering if Id missed a simpler way of doing things as I have a tendency towards doing thing the more complicated way!

GLBasic - en / Re: A question on nested types
« on: 2015-Jun-29 »
Thanks for the suggestion kanonet, but thats basically what Im already doing.

So I'm guessing that what I was asking isnt actually possible within GLB - ah well, worth a shot.

GLBasic - en / A question on nested types
« on: 2015-Jun-27 »
Hi folks

Heres one I'm hoping someone could point me in the right direction on. Im currently playing with nested types, and Ive hit a small snag.

Take the following scenario.

I have 4 different types - lets call them


The last one is a collision object as an axis aligned bounding box, which takes its initial values from the other types as its created.

As I understand it, If I create a TCol_Obj type nested as part of Talien, then that will be stored within the array for the Aliens. Same with blocks, bats etc.

If I Dimpush the TCol_Obj type to a separate array as well, it creates a copy of that type and doesnt actually affect the original.

In this case, how can I loop through only the TCol_Obj types to test for collisions etc in a single pass without going through each array for Aliens, Blocks, Bats etc?
Does the nested type literally become a part of the type its created within, or is it / can it be treated as a separate entity?

Hope that makes some sort of sense!

Thanks for the input - Im playing with beziers at the moment :-)

Thats quite good - I like the gfx and the scanline effects, very arcadey. The aliens seem to "stutter" about halfway down on an attack though.

Interested in how youre doing the curving attacks - sinewave style calcs, bezier curves or a different approach? Only asking as Im playing about with coding a version of this as well and havent come across a method Im entirely happy with yet. It would be interesting to get another perspective on it.


No, I meant that the rotation system would use floating-point values, which would add imprecision.  Are you using SMOOTHSHADING FALSE or TRUE?

Ah, that makes things clearer :-) Thanks MrT.

Done some additional testing, and it seems to affect any image with a single pixel in the dead centre (i.e. 47 x 47, 27 x 13, 51 x 51), and the same effect on an ATI card, Nvidia Geforce card, and a laptop integrated one which I cant recall the make of.

So either its an OpenGL issue (in which case, blurgh), or as HK said, the texturemapping is off slightly on the routines for the roto commands.

Hopefully this gives enough info for him to say one way or the other.

and a screenie demonstrating the above.

measuring both the right hand and lower images, it would appear that the image size is the same (47 pix each side for the pink bit), however its offset to the left and upwards, and the actual graphic image of the tank is bigger by 1 pix wide & high.

Code: (glbasic) [Select]


LOADSPRITE "tank47a.bmp",tank

SETSCREEN 800,600,1





FUNCTION drawscreen:

DRAWLINE 101,100,101,220,RGB(0xff, 0xff, 0x40)
DRAWLINE 145,100,145,220,RGB(0xff, 0xff, 0x40)
DRAWLINE 95,105,220,105,RGB(0xff, 0xff, 0x40)
DRAWLINE 95,141,220,141,RGB(0xff, 0xff, 0x40)

DRAWSPRITE tank,100,100
ROTOSPRITE tank,100,160,0
ROTOZOOMSPRITE tank,160,100,0,1


using the attached image (but as a .bmp)

Interestingly, if you load it as a png without the transparency you can see the image is offset a little.

finally managed to test on a couple of different PCs - with the same result - so it would appear to be an issue in GL.

Nope on both counts - attached is a screencap (doubled up for clarity). Ive made sure that all variables are integered, and Im not using any scaling (so value of 1).

The top left image is the original, right is drawn with rotozoomsprite, and bottom left with rotosprite.

Interestingly, if the image is drawn with zoomsprite (same values), theres no issue - so it would seem to be related to the rotation commands.

My original question wasnt re hotspots tho (although thats a useful topic in itself) by the fact that an odd sized sprite was drawn bigger when using the roto commands :-)

Pages: [1] 2