• Print

Author Topic: My first QB64 game: WRITTEN IN STONE  (Read 347 times)

codeguy

  • Hero Member
  • *****
  • Posts: 3555
  • what the h3ll did i name that code?
    • stuff at dkm
    • Email
Re: My first QB64 game: WRITTEN IN STONE
« Reply #15 on: February 18, 2013, 12:57:24 PM »
how about a ScreenSpin? i think i got one somewhere:
http://denteddisk.forums-free.com/make-an-appointment-with-the-resident-code-guru-f34.html

Clippy

  • Hero Member
  • *****
  • Posts: 16446
  • I LOVE π = 4 * ATN(1)    Use the QB64 WIKI >>>
    • Pete's Qbasic Site
    • Email
Re: My first QB64 game: WRITTEN IN STONE
« Reply #16 on: February 18, 2013, 01:01:56 PM »
Is that what killed your laptop?  ;D
QB64 WIKI: Main Page
Download Q-Basics Code Demo: Q-Basics.zip
Download QB64 BAT, IconAdder and VBS shortcuts: QB64BAT.zip
Download QB64 DLL files in a ZIP: Program64.zip

codeguy

  • Hero Member
  • *****
  • Posts: 3555
  • what the h3ll did i name that code?
    • stuff at dkm
    • Email
Re: My first QB64 game: WRITTEN IN STONE
« Reply #17 on: February 18, 2013, 01:06:05 PM »
i think made in china killed my laptop. and holy bejeezus, don't get "spun outa shape" about that -- i'm south korean, d@mmit! ok, i'm american but still "made in korea..." ;D
« Last Edit: February 18, 2013, 01:15:40 PM by codeguy »
http://denteddisk.forums-free.com/make-an-appointment-with-the-resident-code-guru-f34.html

Clippy

  • Hero Member
  • *****
  • Posts: 16446
  • I LOVE π = 4 * ATN(1)    Use the QB64 WIKI >>>
    • Pete's Qbasic Site
    • Email
Re: My first QB64 game: WRITTEN IN STONE
« Reply #18 on: February 18, 2013, 01:09:19 PM »
No you isn't! Yous is American fella. You just look Korean! China is our friend. Just ask Walmart...

Where else can you get circuit parts sent to you for less than a buck with free shipping?  ;)

I think the Post Office is taking another one on the chin there too! It costs me $2 to send then back... so I don't bother.
QB64 WIKI: Main Page
Download Q-Basics Code Demo: Q-Basics.zip
Download QB64 BAT, IconAdder and VBS shortcuts: QB64BAT.zip
Download QB64 DLL files in a ZIP: Program64.zip

Dav

  • Hero Member
  • *****
  • Posts: 512
Re: My first QB64 game: WRITTEN IN STONE
« Reply #19 on: February 19, 2013, 02:30:45 PM »
Quote from: codeguy on February 18, 2013, 12:57:24 PM
how about a ScreenSpin? i think i got one somewhere:

Sure would!  I thought I had saved most every code you've posted here codeguy, but I seemed to have missed that one.  If you could share it again I'd appreciate it.  Thanks!

Here's another screen transition (Swap) that didn't end up being used in the game, but I liked it and am saving it for another project.  It uses two images in the winstone-data folder (or you can supply your own different 1024x768 images).

- Dav

Code: [Select]
DEFINT A-Z

DECLARE SUB ScreenSwap (way$, image1&, image2&, speed!)

DIM SHARED source$

'===============================================================
source$ = "winstone-data\" '        <<< LOCATION OF DATA FILES!
'===============================================================

'=== Set screen

SCREEN _NEWIMAGE(1024, 768, 32)
_FULLSCREEN
_DELAY .5

'=== load image to use

pic& = _LOADIMAGE(source$ + "img\paper-title.jpg")
help& = _LOADIMAGE(source$ + "img\helpscreen.jpg")
_PUTIMAGE , pic&, 0

_DELAY 1

ScreenSwap "LEFT", pic&, help&, 50: _DELAY 1
ScreenSwap "RIGHT", help&, pic&, 50: _DELAY 1
ScreenSwap "DOWN", pic&, help&, 50: _DELAY 1
ScreenSwap "UP", help&, pic&, 50: _DELAY 1

_FREEIMAGE pic&: _FREEIMAGE help&

END




'========================================================================================
'
'========================================================================================




SUB ScreenSwap (way$, image1&, image2&, speed!)

SELECT CASE UCASE$(way$)
    CASE "LEFT"
        x2 = 0
        FOR x = 0 TO 1023 / 2 STEP 15
            _PUTIMAGE (x2, 0), image2&, 0
            _PUTIMAGE (x, 0), image1&, 0
            x2 = x2 - 15
            _DISPLAY
            _LIMIT speed!
        NEXT
        x2 = 0 - (1023 / 2)
        FOR x = 1023 / 2 TO 0 STEP -15
            'underneath one first (now image1)
            _PUTIMAGE (x, 0), image1&, 0
            _PUTIMAGE (x2, 0), image2&, 0
            x2 = x2 + 15
            _DISPLAY
            _LIMIT speed!
        NEXT
    CASE "RIGHT"
        x2 = 0
        FOR x = 0 TO -(1023 / 2) STEP -15
            _PUTIMAGE (x2, 0), image2&, 0
            _PUTIMAGE (x, 0), image1&, 0
            x2 = x2 + 15
            _DISPLAY
            _LIMIT speed!
        NEXT
        x2 = 1023 / 2
        FOR x = 0 - (1023 / 2) TO 0 STEP 15
            'underneath one first (now image1)
            _PUTIMAGE (x, 0), image1&, 0
            _PUTIMAGE (x2, 0), image2&, 0
            x2 = x2 - 15
            _DISPLAY
            _LIMIT speed!
        NEXT
    CASE "DOWN"
        y2 = 0
        FOR y = 0 TO (767 / 2) STEP 15
            _PUTIMAGE (0, y2), image2&, 0
            _PUTIMAGE (0, y), image1&, 0
            y2 = y2 - 15
            _DISPLAY
            _LIMIT speed!
        NEXT
        y2 = 0 - (767 / 2)
        FOR y = (767 / 2) TO 0 STEP -15
            'underneath one first (now image1)
            _PUTIMAGE (0, y), image1&, 0
            _PUTIMAGE (0, y2), image2&, 0
            y2 = y2 + 15
            _DISPLAY
            _LIMIT speed!
        NEXT
    CASE "UP"
        y2 = 0
        FOR y = 0 TO 0 - (767 / 2) STEP -15
            _PUTIMAGE (0, y2), image2&, 0
            _PUTIMAGE (0, y), image1&, 0
            y2 = y2 + 15
            _DISPLAY
            _LIMIT speed!
        NEXT
        y2 = (767 / 2)
        FOR y = 0 - (767 / 2) TO 0 STEP 15
            'underneath one first (now image1)
            _PUTIMAGE (0, y), image1&, 0
            _PUTIMAGE (0, y2), image2&, 0
            y2 = y2 - 15
            _DISPLAY
            _LIMIT speed!
        NEXT

END SELECT

_AUTODISPLAY

_PUTIMAGE , image2&, 0

END SUB





(Visit Dav's Qbasic Site) (Grab my IDE)

  • Print