• Print

Author Topic: A QB64 game project  (Read 31681 times)

Cyperium

  • Hero Member
  • *****
  • Posts: 3660
  • Knowledge is good, but understanding is better
    • Cyperium
A QB64 game project
« on: March 16, 2010, 07:08:33 pm »
We have discussed this game project at the Bugs/Incompatibilities forum, which isn't exactly the right place to discuss it, so I urge that we continue it here instead.

First of all, I'm not sure what Galleon thinks of this, if he would like to release this game with QB64 as a demonstration of its capabilities, we'll see what he has to say. I think it would be a good idea, as the samples contained with the current release are mostly made with QB 4.5, there are no games that I know of that is made specifically for QB64.

So why not work together to create something nice to demonstrate QB64s capabilities?


This far coma8coma1 is willing to contribute to the project, we haven't made any final decisions on the concept so it's alright for anyone to come up with ideas on this, the ideas so far involve a mix between RPG and platformer (think Super Mario RPG) and involves Robots. You can view this thread to know how far we have come with this idea, but if you have other ideas you are welcome to share them.
Venture - New Prototype, QB64 Editor v1.97, SDL dll files

coma8coma1

  • Sr. Member
  • ****
  • Posts: 494
Re: A QB64 game project
« Reply #1 on: March 16, 2010, 10:59:37 pm »
Outside of general game design, my real skills are in sound design and map/level design. I wish I could help more with programming or something, but that isn't my strength. I could certainly help with sfx and music. Once some gets a map and/or gfx editor going I could certainly help out there too. And naturally I can help with debugging and testing.

When I think sci-fi platform adventure I immediately think Metroid. The original had such staying power because the player was left alone in a massive (for it's time) world with virtually unlimited freedom to explore. The linearity of the game came only from what items you could find and use to open up new areas. I put forward that a futuristic RPG platformer should offer that kind of mystery and open-endedness. Perhaps throw the player into a massive world with solid game play and mechanics, and let them figure out what to do.

I suggest any back stories, side stories, etc be put on hold until there's a solid idea for an overall gameplay theme. I think cyperium already put it out there that turn-based is out of the question. My experience making games is all with turn based RPGs so I can't help much there. I recommend getting a solid engine thought out or even running and then go from there. This might lend towards a more finely-tuned end product.

Just some thoughts. -,8

edit: I just read your last post in the other thread. It sounds like you already have something worked out in your head. I *think* I understand what you're saying. I'm reminded of a puzzle/action game for the NES in the early 90s called Snake Rattle and Roll. It was an isometric view action game when you jump around platforms kind of like QBert in perspective http://www.google.com/search?hl=en&source=hp&q=snake+rattle+and+roll&aq=1&aqi=g10&aql=&oq=snake+ratt&gs_rfai=

Note the shadow beneath the player (the pink thing in the center of the screen) here http://en.wikipedia.org/wiki/File:Snakerattlenroll.png The shadows follows the player and always remains directly below you no matter where you go. it helps when making jumps because you can just move the shadow over onto the platform you are aiming for.
« Last Edit: March 17, 2010, 12:06:57 am by coma8coma1 »

Galleon

  • Administrator
  • Hero Member
  • *****
  • Posts: 5486
  • QB Forever
Re: A QB64 game project
« Reply #2 on: March 17, 2010, 01:37:06 am »
This is an exciting prospect, not least because we can improve QB64 and its profile but make a fun game but also because it gives us a chance to work together. You can count on my support, ideas, specific QB64 knowledge and targeted QB64 development to bring any concept across the line.

If you aren't aware, in a previous endeavor I wrote a MMORPG in C++ which stayed online for 5 years. Patronage fell away after that due to a number of factors and when 'Geocities' ceased hosting our frontpage (with no offer of even a redirect... never trust Yahoo hosting) we decided to finally pull the plug on the server. It was a very large and exciting project, but ultimately it was just a game and I decided to move on. I also learned a lot through developing it.

I'd suggest:
-That the game should support (but not require) multiple players via TCP/IP
-That it be a 2D game (or isometric 3D)

I wonder:
-Would it have original graphics or ripped graphics? (or start with ripped but convert to original later?)

Personally, I'd enjoy seeing some kind of MMORPG or MMORTS. Also, I think there's a lot of room for 2D action games which recreate the excitement of 3D FPS matches like capture the flag. I cannot agree more that any idea should be backed up by a good story.

One idea I've toyed with is recreating the world/feel from the old super nintendo version of Shadowrun. It's unique in so many ways but most importantly the world feels sinister and dark unlike so many cutsie RPGs out there. http://www.youtube.com/watch?v=I5mg5EFK00k
Something old... Something new... Something borrowed... Something blue...

coma8coma1

  • Sr. Member
  • ****
  • Posts: 494
Re: A QB64 game project
« Reply #3 on: March 17, 2010, 04:15:14 am »
wow, Shadowrun looks great. I've heard so much about it, but never played it. I just spent that last 90 minutes or so watching thru to part 9. I like the skill system where you spead karma to upgrade yoru skills and each level costs 1 more point than that last. Reminds me of the skill points in Might & Magic VI. I always hought it would be cool to have an experience pts based system like that, where instead of just earning xp and leveling up at break points, you just spend your xp like gold and power up skills that way.

Must have original graphics. It wouldn't be too hard, especially if we can muster several people to split it up among. One to do sprites and animations, one to do menus, icons, backgrounds and misc stuff, and at least two more to do the gfx tiles. That would be ideal so the workload isn't too heavy. Plus by having a dedicated sprite artist for instance, the look and feel of all sprites will remain relatively uniform throughout and nothing will appear out of place.

I love the cyberpunk feel of Shadowrun. Makes me think of Borderlands or the Fallout series in a way. I'm also into steampunk and military sci-fi.

I know nothing about MMOs so I wouldn't have an opinion on the matter.

Cyperium

  • Hero Member
  • *****
  • Posts: 3660
  • Knowledge is good, but understanding is better
    • Cyperium
Re: A QB64 game project
« Reply #4 on: March 17, 2010, 07:24:43 am »
Yes, why not, we could have a limited number of unique characters in the game, controlled either by other players or by the computer (if there are no other players), characters crucial to the story would have to be controlled by the computer though, but we could have just everyday characters which the players can do whatever they want with. The host is the main character but the others can choose to be friendly or to be enemies totally up to their own discretion as everybody can kill everybody else, or give items or simply talk.

We should have enemies that are always enemies though, perhaps the robot is the only friendly robot out there while the other characters are humans? All other robots are enemies but humans can choose to be either friendly or enemy...

I will start with the game engine (using crap graphics only to get started on the motions and shadow, etc.), one thing that have always struck me in this modern age, is the crappy controls, all games should focus more on the controls cause that gives a sense of quality that nothing else can achieve. So this is what I'm going to start with, to make it feel like you can control him without much effort. This also makes it inspiring to keep working on the other aspects.

I think the next step would be to create a map-editor (perhaps also a graphics design editor?)


Shadowrun reminds me of Deja VĂș for NES, it also has this dark feel and waking up without knowing who you are or why you are there. I was thinking isometric 3D, just didn't know the name for it, it's a good way to go cause you can create really realistic environments.

Making the general outlines of movement, shadow etc. shouldn't take long, so count on getting a preview sooner than you expect :D, lol.


Also; thanks for your support Galleon, I have no doubts we are going to need it!
Venture - New Prototype, QB64 Editor v1.97, SDL dll files

Cyperium

  • Hero Member
  • *****
  • Posts: 3660
  • Knowledge is good, but understanding is better
    • Cyperium
Re: A QB64 game project
« Reply #5 on: March 17, 2010, 09:03:34 am »
Here's a little code I made just now of possible movement:

Press 'X' to jump!
Code: [Select]
DIM SHARED keyflags%(0 TO 127) 'the keyboard states




backdrop = _NEWIMAGE(640, 480, 32)
background = _NEWIMAGE(640, 480, 32)
objects = _NEWIMAGE(640, 480, 32)
characterx = 320
charactery = 300
characterz = 0

SCREEN _NEWIMAGE(640, 480, 32)
_DEST background
LINE (0, 0)-(640, 480), _RGB32(255, 255, 255), BF

DO

    _LIMIT 120
    IF a = 0 THEN a = 1 ELSE a = 0
    _DISPLAY

    _DEST objects
    CLS

    CIRCLE (characterx, charactery + 10), 10, _RGB32(30, 0, 0), , , .5
    PAINT (characterx, charactery + 10), _RGB32(30, 0, 0)
    CIRCLE (characterx, charactery - characterz), 10, _RGB32(255, 0, 0)
    PAINT (characterx, charactery - characterz), _RGB32(255, 0, 0)

    _CLEARCOLOR 0
    'the order determines overlap.
    _PUTIMAGE , background, backdrop
    _PUTIMAGE , objects, backdrop
    _PUTIMAGE , backdrop, 0
    movefellow = 0
    IF scankey(72) THEN characterspy = characterspy - .1: movefellow = 1
    IF scankey(80) THEN characterspy = characterspy + .1: movefellow = 1
    IF scankey(75) THEN characterspx = characterspx - .1: movefellow = 1
    IF scankey(77) THEN characterspx = characterspx + .1: movefellow = 1
    IF scankey(45) AND readytojump = 1 AND jump = 0 AND fall = 0 THEN jump = 1: jumpvel = 4: readytojump = 0
    IF scankey(45) = 0 AND jump = 1 THEN jump = 0: fall = 1: fallvel = jumpvel / 2: readytojump = 0
    IF scankey(45) = 0 AND jump = 0 AND fall = 0 THEN readytojump = 1
    IF characterspy > 2 THEN characterspy = 2
    IF characterspy < -2 THEN characterspy = -2
    IF characterspx > 2 THEN characterspx = 2
    IF characterspx < -2 THEN characterspx = -2
    characterx = characterx + characterspx
    charactery = charactery + characterspy
    IF jump = 0 AND fall = 0 AND movefellow = 0 THEN
        IF characterspx > 0 THEN characterspx = characterspx - .1
        IF characterspx < 0 THEN characterspx = characterspx + .1
        IF characterspy > 0 THEN characterspy = characterspy - .1
        IF characterspy < 0 THEN characterspy = characterspy + .1
        IF characterspx > -.1 AND characterspx < .1 THEN characterspx = 0
        IF characterspy > -.1 AND characterspy < .1 THEN characterspy = 0
    END IF

    IF jump = 1 THEN
        characterz = characterz + jumpvel
        jumpvel = jumpvel - .1
        IF jumpvel < 0 THEN fall = 1: jump = 0: fallvel = jumpvel
    END IF
    IF fall = 1 THEN
        IF characterz > groundz THEN characterz = characterz + fallvel: fallvel = fallvel - .1
        IF characterz <= groundz THEN characterz = 0: fall = 0
    END IF


LOOP



FUNCTION scankey% (scancode%)
i% = INP(&H60)
IF i% = 170 OR i% = 54 OR i% = 42 THEN FOR a = 0 TO 127: keyflags%(a) = 0: NEXT a
IF (i% AND 128) THEN keyflags%(i% XOR 128) = 0
IF (i% AND 128) = 0 THEN keyflags%(i%) = -1
WHILE INKEY$ <> "": WEND
scankey% = keyflags%(scancode%)
END FUNCTION

I was thinking though, perhaps it could be controlled with W,A,S,D, and SPACE to jump like in a real 3D game? That would be nice, then you can aim with the mouse! Wouldn't be too hard to achieve either I think.
« Last Edit: March 17, 2010, 09:10:57 am by Cyperium »
Venture - New Prototype, QB64 Editor v1.97, SDL dll files

coma8coma1

  • Sr. Member
  • ****
  • Posts: 494
Re: A QB64 game project
« Reply #6 on: March 17, 2010, 09:55:21 am »
omg! that's awesome! i'm playing with it right now!  :D

coma8coma1

  • Sr. Member
  • ****
  • Posts: 494
Re: A QB64 game project
« Reply #7 on: March 17, 2010, 11:04:29 am »
I'm blown away at how fast you made that, Cyperium. And the code looks great! It's legible unlike my garbage that I make.

I always wondered how to get keypresses that way. I've used INKEY$ for so long I don't know any other way. Of course INKEY$ is useless in action games.

I'm anxious to see what else you come up with.  8)

Galleon

  • Administrator
  • Hero Member
  • *****
  • Posts: 5486
  • QB Forever
Re: A QB64 game project
« Reply #8 on: March 17, 2010, 12:34:26 pm »
I'm impressed! That's a very smooth control system, I like the variable height jumping when I press X too.
Something old... Something new... Something borrowed... Something blue...

Cyperium

  • Hero Member
  • *****
  • Posts: 3660
  • Knowledge is good, but understanding is better
    • Cyperium
Re: A QB64 game project
« Reply #9 on: March 17, 2010, 03:03:43 pm »
Thank you for your encouragement, I will experiment with a few things involving movement, cause I have some ideas I need to explore.
Venture - New Prototype, QB64 Editor v1.97, SDL dll files

Galleon

  • Administrator
  • Hero Member
  • *****
  • Posts: 5486
  • QB Forever
Re: A QB64 game project
« Reply #10 on: March 19, 2010, 02:05:52 am »
Yesterday I spent some time browsing the net and pondering about isometric design.

This shows the way isometric has been used in other games:
http://trac.bookofhook.com/bookofhook/trac.cgi/wiki/OverviewOfIsometricEngineDevelopment

This shows how, pixel to pixel, they fit together:
www.grinninglizard.com/kyra/isogen.htm

Something interesting I noticed about vertical walls in isometric view is that if you divide the isometric tile in half (so you have a left and right side) with only 4 triangular sprites (2 for the left and 2 for the right) you can connect them in various ways to produce all sorts of buildings. I know you were going to try and avoid complex things like walls and multi-levels (eg. walkable bridges over existing places) but it may actually be relatively easy. I worry that the terrain system of 'snake rattle n roll' may be restrictive and hamper development/creativity. I also considered things like z-buffering and true 3D but it wouldn't be able to take advantage of QB64's very efficient _PUTIMAGE routine. The 'Transport Tycoon' system is neat and all possible gradients could be rendered in advance, I like the fact that you can go downwards in height as you go towards the top of the screen but in other respects like adding vertical walls it is quite limiting.
Something old... Something new... Something borrowed... Something blue...

Galleon

  • Administrator
  • Hero Member
  • *****
  • Posts: 5486
  • QB Forever
Re: A QB64 game project
« Reply #11 on: March 19, 2010, 04:22:34 am »
Some mucking around to convert a regular tile into an isometric tile. Work in progress...
Code: [Select]
DEFLNG A-Z

SCREEN _NEWIMAGE(800, 600, 32)

i = _LOADIMAGE("f:\iso1.bmp") 'an unisometric 128x128 tile
_PUTIMAGE (0, 0), i

px = 200
py = 300

FOR y = 0 TO 127
    xx = px + (y \ 2) * 2
    yy = py + (y + 1) \ 2
    px2 = xx
    py2 = yy
    FOR x = 0 TO 127

        z = (y MOD 2)
        IF x = 0 THEN z = 0

        xx = px2 + x
        yy = py2 - x \ 2

        c = POINT(x - z, y)

        'draw it in 3 places at once to get the idea
        PSET (xx, yy), c
        PSET (xx + 256, yy), c
        PSET (xx + 128, yy - 64), c



    NEXT
NEXT
Something old... Something new... Something borrowed... Something blue...

Cyperium

  • Hero Member
  • *****
  • Posts: 3660
  • Knowledge is good, but understanding is better
    • Cyperium
Re: A QB64 game project
« Reply #12 on: March 19, 2010, 07:01:42 am »
Well, I have no particular limits in mind on the complexity of the levels, I was thinking of a startheight and endheight of the objects, which would allow it to be "up in the air". It would be as easy as y - startheight to y - (startheight + endheight). I was also thinking that on the map-editor being able to drag the "lowest" point to change the startheight, and the highest point of the object to change the endheight.

Testing the x,y,z of the character would be fairly easy, if z is between the startheight and endheight then x,y is stopped, if it is over endheight then set groundz to endheight to make it land on it, etc., it would involve testing all objects on the x,y position (where the shadow is).

I've never done isometric programming, but I'm curious as to what you can come up with.


The ability to convert regular tiles to isometric would be Really good to have :)
« Last Edit: March 19, 2010, 07:21:53 am by Cyperium »
Venture - New Prototype, QB64 Editor v1.97, SDL dll files

coma8coma1

  • Sr. Member
  • ****
  • Posts: 494
Re: A QB64 game project
« Reply #13 on: March 19, 2010, 07:29:09 am »
Conserning post #5 by cyperium. I've messed with program a bit jumping around and such and I've noticed a small problem with the "friction" for lack of a better word. When I stop pressing a movement key in any direction of course I grind to a halt, but I noticed that when moving diagonally with two movements keys at once, if I let only one go it does not recognize so and continues at full velocity in the direction I let go of.

Cyperium

  • Hero Member
  • *****
  • Posts: 3660
  • Knowledge is good, but understanding is better
    • Cyperium
Re: A QB64 game project
« Reply #14 on: March 19, 2010, 07:39:05 am »
Yes, this is because it only test the movement variable for friction, this could be easily modified to test only certain movements (like moveup, movedown, moveleft and moveright).


Fixed here:

Code: [Select]
DIM SHARED keyflags%(0 TO 127) 'the keyboard states




backdrop = _NEWIMAGE(640, 480, 32)
background = _NEWIMAGE(640, 480, 32)
objects = _NEWIMAGE(640, 480, 32)
characterx = 320
charactery = 300
characterz = 0

SCREEN _NEWIMAGE(640, 480, 32)
_DEST background
LINE (0, 0)-(640, 480), _RGB32(255, 255, 255), BF

DO

    _LIMIT 120
    IF a = 0 THEN a = 1 ELSE a = 0
    _DISPLAY

    _DEST objects
    CLS

    CIRCLE (characterx, charactery + 10), 10, _RGB32(30, 0, 0), , , .5
    PAINT (characterx, charactery + 10), _RGB32(30, 0, 0)
    CIRCLE (characterx, charactery - characterz), 10, _RGB32(255, 0, 0)
    PAINT (characterx, charactery - characterz), _RGB32(255, 0, 0)

    _CLEARCOLOR 0
    'the order determines overlap.
    _PUTIMAGE , background, backdrop
    _PUTIMAGE , objects, backdrop
    _PUTIMAGE , backdrop, 0
    moveup = 0: movedown = 0: moveleft = 0: moveright = 0
    IF scankey(72) THEN characterspy = characterspy - .1: moveup = 1
    IF scankey(80) THEN characterspy = characterspy + .1: movedown = 1
    IF scankey(75) THEN characterspx = characterspx - .1: moveleft = 1
    IF scankey(77) THEN characterspx = characterspx + .1: moveright = 1
    IF scankey(45) AND readytojump = 1 AND jump = 0 AND fall = 0 THEN jump = 1: jumpvel = 4: readytojump = 0
    IF scankey(45) = 0 AND jump = 1 THEN jump = 0: fall = 1: fallvel = jumpvel / 2: readytojump = 0
    IF scankey(45) = 0 AND jump = 0 AND fall = 0 THEN readytojump = 1
    IF characterspy > 2 THEN characterspy = 2
    IF characterspy < -2 THEN characterspy = -2
    IF characterspx > 2 THEN characterspx = 2
    IF characterspx < -2 THEN characterspx = -2
    characterx = characterx + characterspx
    charactery = charactery + characterspy
    IF jump = 0 AND fall = 0 THEN
        IF characterspx > 0 AND moveright = 0 THEN characterspx = characterspx - .1
        IF characterspx < 0 AND moveleft = 0 THEN characterspx = characterspx + .1
        IF characterspy > 0 AND movedown = 0 THEN characterspy = characterspy - .1
        IF characterspy < 0 AND moveup = 0 THEN characterspy = characterspy + .1
        IF characterspx > -.1 AND characterspx < .1 THEN characterspx = 0
        IF characterspy > -.1 AND characterspy < .1 THEN characterspy = 0
    END IF

    IF jump = 1 THEN
        characterz = characterz + jumpvel
        jumpvel = jumpvel - .1
        IF jumpvel < 0 THEN fall = 1: jump = 0: fallvel = jumpvel
    END IF
    IF fall = 1 THEN
        IF characterz > groundz THEN characterz = characterz + fallvel: fallvel = fallvel - .1
        IF characterz <= groundz THEN characterz = groundz: fall = 0
    END IF


LOOP



FUNCTION scankey% (scancode%)
i% = INP(&H60)
IF i% = 170 OR i% = 54 OR i% = 42 THEN FOR a = 0 TO 127: keyflags%(a) = 0: NEXT a
IF (i% AND 128) THEN keyflags%(i% XOR 128) = 0
IF (i% AND 128) = 0 THEN keyflags%(i%) = -1
WHILE INKEY$ <> "": WEND
scankey% = keyflags%(scancode%)
END FUNCTION

Just replace the entire code :), this code also allows for landing on any groundz (but there is only 0 right now).
Venture - New Prototype, QB64 Editor v1.97, SDL dll files

  • Print