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

Topics - Stevester

#1
Hi,

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.
#2
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,



#3
Hi,

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
LIMITFPS 60

SETTRANSPARENCY RGB(0,0,0)

LOADSPRITE "l:\player.bmp",0

GLOBAL px=300
GLOBAL py=220

WHILE KEY(01)=FALSE
DrawTheScreen()
WEND

END

FUNCTION DrawTheScreen:
DRAWSPRITE 0,px,py
SHOWSCREEN
ENDFUNCTION


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.

Thanks,

Steve.
#4
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:

REPEAT
      DRAWRECT RND(800), RND(600), RND(100), RND(100), RGB(RND(255), RND(255), RND(255))
      SHOWSCREEN
UNTIL KEY(28)
MOUSEWAIT
END

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. :)

Steve.