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

Pages: [1]
GLBasic - en / Re: Vector Glow Effect?
« on: 2011-Aug-10 »
Thanks for the replies guys!

Scramble looks very effective - I've played it quite a bit since I came across it. I'm guessing there's a speed advantage to having them pre-generated and used as straight sprites? Though as Skydog notes we're stuck with the colours they're generated in (not a problem for me as I'm only really looking at green, red and cyan!)

Love the Inzectoids demo - fast and colorful with simple but addictive gameplay (Note: If you want to add a 'what people are saying' comment, I'd offer "Holy Hell!! They're all trying to kill me! - Steve (Age 40)"). Totally reminds me of an inverse tempest. Very Nice Job! :)

Thats a nice tutorial reply Slydog - I'm trying to download now (download links hidden amongst a stack of adverts!). If I can generate the sprites with then that will probably be just what I'm after for the sample programs I'm pulling together at the mo. (Still working my way round GLB but thinking about a retro project to get my teeth into).

I'd had a quick look at polyvectors and was wondering whether there's much of a performance hit in using them if there's a lot of objects bouncing round the screen at once (I'm assuming it boils down to plotting lines on screen every cycle - which is typically a bottleneck in the higher level languages?).

Cheers. :)

Thanks for the reply Minion,

I haven't - will have a play with the debug commands tonight. The blown array location in the code is exactly what I'm after.

Even in relatively small programs its not always apparent what the issue is and takes some time to sift through the code.


GLBasic - en / Vector Glow Effect?
« on: 2011-Aug-10 »

running through the showcases and other programs there are lots of wonderful examples of vector-style 'glow' around the lines.

This looks great in 'Glowing Rocks From Outer Space', 'Quantum' and 'Scramble'.

I'm wondering what the best way of achieving this effect is. Is it simply part of the sprites or an after-effect applied to the lines?

Many thanks.

Hi, as a new user I'm finding myself caught out every now and again with my programs exiting without warning.

On investigation its generally been down to me exceeding the array limits such as trying to stick a number in px[10] when it is only defined to px(0-9).

I've managed to sort this out in each case but was wondering why I'm not getting an 'out of bound's or 'array overflow' error pointing at the offending line of code. It would save a lot of time tracing through the program if it pointed straight to the problem area. Am I missing something in settings or debug that does this?

Many thanks,

Fantastic tutorial series!  :good:

I'm aware of the processes and structure but its really handy to see the GLBasic commands in use. Allows me to shortcut a lot of searching through the help file!

I'm guessing this was originally put together for Blitz.

Well commented final version and the little touches used are very effective.

Love Peejay's remakes site as well (I also owned the Cascade 50 cassette!!!).

GLBasic - en / Re: Sprite display query
« on: 2011-Jun-17 »
Thanks Ragaril,

I downloaded the GLBasic SDK Version 9 (main download link) - thinking this must be the latest stable release version (as opposed to beta?).

I tried Slydogs original suggestion and added SETCURRENTDIR(L:\") and receive a syntax error which is corrected by swapping '\' for '/'. (As he noted in his following post.

GLBasic - en / Re: Sprite display query
« on: 2011-Jun-17 »
Aha! You've got it.

It's the '\' should be '/'. Been playing around with it for a while and couldn't understand why it still wasn't working.

It needs forwardslash, not backslash!!! Thanks you Slydog and MrTAToad. :good:

This now works.

As to version, I'm on 9.040. Are some versions more stable than others? (I'm aware this is actively updated and improved all the time) Which version is recommended?

Many thanks.

GLBasic - en / Sprite display query
« on: 2011-Jun-17 »

I've found PeeJay's tutorials (and his website) which are just what I'm after but I'm stuck on Lesson 1 (!!!) Not a good start, I know!!

Code: (glbasic) [Select]
// --------------------------------- //
// Project: Lesson One
// Start: Friday, February 01, 2008
// IDE Version: 5.154
// --------------------------------- //

SETSCREEN 640,480,1


LOADSPRITE "l:\player.bmp",0

GLOBAL px=300
GLOBAL py=220



FUNCTION DrawTheScreen:

This code should simply display the graphic of the man in the centre of the screen. Note I've moved the graphic (player.bmp) into the root of my L drive so it should be pointing at the correct place but I'm getting a blank full screen.

Any help would be appreciated.



GLBasic - en / Re: Hi there - Newb Question :)
« on: 2011-Jun-16 »
You may be interested in my Programmers Reference Guide, which details it all :

Had a look at this and will definitely be looking into a copy though there's quite a difference (price-wise) between the hardcopy and the download (about £70) - is this correct? The hardcopy seems really expensive but the download seems too cheap!

Posted by: spacefractal
« on: Today at 01:45:14 pm »
alternative you can use CREATESCREEN and draw each box into that, and then draw that screen to the backbuffer.
SCREENS other than backbuffer is never clean up, so its can been alternativt to avoid drawing 1000boxes in one frame.

Thats very handy to have a screen (or image) that isn't cleared every cycle. You then copy this to the backscreen and flip it to the visible screen using SHOWSCREEN command.

This is slightly different to what I'm used to but I think I'm starting to get the hang of it!! :)

I'd been thinking that having to pass everything through the SHOWSCREEN command at the end of every cycle was a bit of a limitation but thats not looking to be the case with the alternative options available. I think it promotes a bit more structure to the coding as well.

I was also a bit stumped with the explicit declarations (hadn't realised theres a tick box in options) but I can see the benefit of this facility - especially with my dodgy coding! :) Will be very useful in larger programs when I accidentally misspell one of my variables. (Mind, I've turned it off for now!).

GLBasic - en / Re: Hi there - Newb Question :)
« on: 2011-Jun-15 »
Thanks for the responses on this one guys.

Looks like there are a few options to achieving what I was looking for, and running through them has led me onto learning some of the other commands.

I like the fading / shrinking effect in particular - adds a bit of style to the program :)

Struggling to understand the 'self' command though. Can't find reference to it in the help doc:

Code: (glbasic) [Select]
FUNCTION Set: l%, t%, w%, h%, colour%
self.left = l = t
self.width = w
self.height = h
self.colour = colour



GLBasic - en / Re: Hi there - Newb Question :)
« on: 2011-Jun-14 »
Thanks for the responses (and the welcomes) :)

So i can draw to a virtual screen then show the results. The virtual screen isn't cleared and can be added to and flipped back to the realscreen (if I got that correct!). Will have a play when i get home tonight.

Am i right in thinking Ampos' solution is building an array on each loop and redrawing rects to the screen on each sync?

It's gonna take me a while to get my head round the ins and outs but I'm liking the simplicity/clarity so far.



GLBasic - en / Hi there - Newb Question :)
« on: 2011-Jun-14 »
Hi there,

I'm looking at GLBasic as a replacement to DBPro and have downloaded and been playing with it tonight.

Love some of the sample games out there, especially those with the vector style 'glowy' graphics (glowingrocksfromouterspace, scramble, etc)! I'm a ways off from anything like that tho. :)

Anyhoo, I'm made my first 'Hello World' program and am well on the way but have a question on my second (and most complex program to date) . . . .

I'm trying to display lots of random rectangles on the screen, adding one with each loop but I'm finding the SHOWSCREEN command appears to be getting in the way as its clearing the screen on every loop. What I'm wanting is to add a rectangle to screen on every loop rather than draw, show, clear, repeat.

This is what I have so far:

      DRAWRECT RND(800), RND(600), RND(100), RND(100), RGB(RND(255), RND(255), RND(255))

I don't want the showscreen command to clear the backscreen every time, I want the rectangles to randomly overlap and fill the screen. Is there an alternative command to use to draw to the main screen or prevent the backscreen from wiping?

Any help would be appreciated. :)


Pages: [1]