Weekly Qbasic and Qb64 Lesson Topics
April 19, 2024, 01:44:55 pm
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Want to see a specific Tutorial? ASK!
 
  Home Help Search Arcade Links Staff List Login Register  

[DISCUSSION] Very Simple Game engine

Pages: [1] 2
  Print  
Author Topic: [DISCUSSION] Very Simple Game engine  (Read 1781 times)
GarrisonRicketson
Admin
Administrator
Hero Member
*****
Posts: 583



WWW
« on: July 07, 2011, 09:17:49 pm »

Just copy and paste to your qb64 editor, adjust the dir path as needed,.
Useing the GDK, version Unseen posted, pretty cool ,...
Code:
  'CHDIR "d:\qb64\Other Peoples Demos\RogueCraft" '// CHANGE TO WHERE YOU PUT THE FILES
'My Face, useing Unseens GDK version
GDK_Start
GDK_Screen_SetRes GameScreen, 640, 480, 32, 0

DIM KB AS KeyBoardState

DIM TileSheet AS Tileset, TileSheetXY(1 TO 8) AS XY, Level(40, 30) AS Tile
GDK_Tileset_New TileSheet, "RogueCraftExp1.bmp", TileSheetXY(), 8, 1, _RGB(0, 0, 0), 0, 0
GDK_TileMap_Load Level(), 40, 30

DO
    _LIMIT 24
    CLS
    GDK_Keyboard_GetState KB
    IF KB.ESC THEN SYSTEM

    GDK_Tiles_Draw TileSheet, TileSheetXY(), Level(), 0, 0, 0, 0, 40, 30

    _DISPLAY
LOOP


REM $INCLUDE:'UnseenGDK.bm'

DATA 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5
DATA 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5
DATA 5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5
DATA 5,0,0,0,5,5,5,5,5,5,5,0,0,0,0,0,0,0,5,5,5,5,5,5,0,0,0,0,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5
DATA 5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5

 
Now what ?
from Garry
Report Spam   Logged


Pages: [1] 2
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum


Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy