Author Topic: Star Backgound  (Read 1812 times)

Offline johnno56

  • Live long and prosper.
Star Backgound
« on: June 04, 2018, 10:15:23 PM »
I'm an not sure where to post this...

I have attached a space background (800 x 600). I made this using Gimp. Please feel free to use as you see fit. Credit is not required.

ps: I do planets as well... But they take a LOT longer to make...

Enjoy.

J
Logic is the beginning of wisdom.

Offline odin

  • Administrator
  • I am.
Re: Star Backgound
« Reply #1 on: June 04, 2018, 10:22:29 PM »
This is probably the best spot.

Offline FellippeHeitor

  • QB64 Developer
  • LET IT = BE
    • QB64.org
Re: Star Backgound
« Reply #2 on: June 04, 2018, 10:23:11 PM »
That looks gorgeous, johnno56! I wonder if it could be generated with code.

Offline johnno56

  • Live long and prosper.
Re: Star Backgound
« Reply #3 on: June 05, 2018, 01:22:10 AM »
You are quite welcome to try. I have absolutely no idea how to do that... It took me many attempts to create the image using the principles of a tutorial as a guide

J
Logic is the beginning of wisdom.

Offline Ashish

  • The joy of coding is endless.
Re: Star Backgound
« Reply #4 on: June 05, 2018, 08:06:58 AM »
Wow johnno56! Seems like you are very good at graphics designing! Good work!
if (Me.success) {Me.improve()} else {Me.tryAgain()}


aKFrameWork - http://bit.ly/aKFrameWork
Menu System - http://bit.ly/guiMenuBar
p5.js in QB64 - http://bit.ly/p5jsbas

@KingOfCoders

Re: Star Backgound
« Reply #5 on: June 05, 2018, 10:39:34 AM »
Hey Johnno,

That looks great for Lander project. Do you take requests? say for buttons, say for forward thruster, turning clockwise and counter-clockwise, for restarters?  ;-))
B = B + ...
QB64 x 64 v1.2 2018 0228/86 git b30af92
QB64 v1.2 20180228/86 git 6fde149
QB64 v1.2 [dev build]_d84bb00

Offline Petr

  • I am instructed.
Re: Star Backgound
« Reply #6 on: June 05, 2018, 11:09:45 AM »
Johnno56 thank you for sharing this nice image!

Offline johnno56

  • Live long and prosper.
Re: Star Backgound
« Reply #7 on: June 05, 2018, 12:40:44 PM »
Hey Johnno,

That looks great for Lander project. Do you take requests? say for buttons, say for forward thruster, turning clockwise and counter-clockwise, for restarters?  ;-))

N.B. I've already made a Lander using that background (sdlbasic) ;)

Flat; Glossy; Metallic; Rectangular; Circular; "Surprise Me"
Info: Dimensions; Colour; Text or symbol; Format: png etc

or perhaps a "hand drawing"

Just let me know what you need?

J

ps: Gold or Platinum plated will take longer and cost more... Nah. Kidding! Cost WAY more... lol
Logic is the beginning of wisdom.

Re: Star Backgound
« Reply #8 on: June 05, 2018, 01:07:21 PM »
Hey Johnno,

You can use your best judgment with Lander Project, the button sizes are around 200 x 50 but InForm can stretch them to fit.

Another collaboration? Feel free to add images to Lander Project thread.

Do you even have an idea for the Restart button?
B = B + ...
QB64 x 64 v1.2 2018 0228/86 git b30af92
QB64 v1.2 20180228/86 git 6fde149
QB64 v1.2 [dev build]_d84bb00

Offline johnno56

  • Live long and prosper.
Re: Star Backgound
« Reply #9 on: June 05, 2018, 06:27:28 PM »
I'll start with perhaps a brushed metal finish... I do not think this project needs to have 'glossy' or 3D-type buttons... These beasties scream 'Hey look at me' and will 'distract'. After all, you do not want the player to crash, because their attention was 'drawn' to the fancy buttons... lol

Quick question: Regardless of the 'style', will you be wanting a duplicate 'clicked' button? (ie: slight colour change to indicate clicked)

J
Logic is the beginning of wisdom.

Re: Star Backgound
« Reply #10 on: June 05, 2018, 06:37:24 PM »
Hi Johnno,

You know what would be fancy cool, crystal buttons.

I'd say crystal buttons would glow a bit with mouse over and light up when pressed.

Don't know if we could do all that, don't know if we could do any of that. ;-))

Your Star Background is looking good with a black silhouette terrain.
B = B + ...
QB64 x 64 v1.2 2018 0228/86 git b30af92
QB64 v1.2 20180228/86 git 6fde149
QB64 v1.2 [dev build]_d84bb00

Offline johnno56

  • Live long and prosper.
Re: Star Backgound
« Reply #11 on: June 05, 2018, 11:26:47 PM »
"Crystal" buttons. Hmm.. Not sure if I've seen any of those. Slight glow with mouse-over. Brighter glow when clicked. How will that work if the player only uses the arrow keys? Perhaps just a change of state from no glow to full glow? So, in essence, you need a set of 12 buttons, right? Crystal you say? I suppose you needed them yesterday? lol  I'm going to need a bottomless cup of coffee for 'this' project... lol

J
Logic is the beginning of wisdom.

Offline Petr

  • I am instructed.
Re: Star Backgound
« Reply #12 on: June 06, 2018, 11:15:44 AM »
Hi. Crystal buttons can be very easy realised using _SETAPLHA if button is image&. I muss going out now, but i can writing demo when am back.
« Last Edit: June 06, 2018, 11:19:25 AM by Petr »

Offline Petr

  • I am instructed.
Re: Star Backgound
« Reply #13 on: June 06, 2018, 04:50:08 PM »
So here it is, it use one Johnno56 picture:

Code: [Select]
SCREEN _NEWIMAGE(800, 600, 32)
DIM SHARED hide AS LONG

Image& = _LOADIMAGE("restart.png", 32)
hide& = _NEWIMAGE(_WIDTH(Image&), _HEIGHT(Image&), 32)
DO

    SELECT CASE Quad_Button(400, 300, Image&, 200, 0, 120) ' set alpha channel (transparency), 0 is full transparent, 255 is NOT transparent
        CASE 0: LOCATE 1, 1: PRINT "Button not pressed"
        CASE 1: LOCATE 1, 1: PRINT "Button pressed    "
        CASE 2: LOCATE 1, 1: PRINT "Mouse on position "
    END SELECT
    _DISPLAY
LOOP UNTIL _KEYHIT = 27



FUNCTION Quad_Button (X AS INTEGER, Y AS INTEGER, ButtonImage AS LONG, OFF_Color, ON_Color, On_PosColor AS LONG)
    WHILE _MOUSEINPUT: WEND
    _DEST hide&: LINE (0, 0)-(_WIDTH, _HEIGHT), _RGB32(0, 0, 0), BF: _DEST 0
    IF _MOUSEX >= X AND _MOUSEX <= X + _WIDTH(ButtonImage&) AND _MOUSEY >= Y AND _MOUSEY <= Y + _HEIGHT(ButtonImage&) THEN
        IF _MOUSEBUTTON(1) THEN GOSUB Button_Active
        GOSUB OnPosition
    END IF

    _SETALPHA OFF_Color, _RGB32(0, 0, 0), hide&
    _PUTIMAGE (X, Y), ButtonImage&
    _PUTIMAGE (X, Y), hide&
    _LIMIT 30
    Quad_Button = 0: EXIT FUNCTION

    OnPosition:
    _SETALPHA On_PosColor, _RGB32(0, 0, 0), hide&
    _PUTIMAGE (X, Y), ButtonImage&
    _PUTIMAGE (X, Y), hide&
    Quad_Button = 2: EXIT FUNCTION
    RETURN

    Button_Active:
    _SETALPHA ON_Color, _RGB32(0, 0, 0), hide&
    _PUTIMAGE (X, Y), ButtonImage&
    _PUTIMAGE (X, Y), hide&
    Quad_Button = 1
    EXIT FUNCTION
END FUNCTION

Please use picture RESTART.PNG from https://www.qb64.org/forum/index.php?topic=249.30 because attachments now works not.
« Last Edit: June 06, 2018, 04:52:44 PM by Petr »

Re: Star Backgound
« Reply #14 on: June 07, 2018, 11:11:33 AM »
Hi Petr,

Works fine and as expected for me; I had never noticed _SETALPHA before this. A rather complex function that one!

Thanks for your demo.

B = B + ...
QB64 x 64 v1.2 2018 0228/86 git b30af92
QB64 v1.2 20180228/86 git 6fde149
QB64 v1.2 [dev build]_d84bb00