Results 1 to 6 of 6

Thread: VB maze game

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2000
    Location
    Scotland
    Posts
    1

    Angry

    Please can you help?? For my MSc project I chose to design a game in the form of moving an image through a maze - for patients with head injuries.
    I thought Visual Basic would be good to learn and use for this.
    I have spent the last few weeks getting to grips with the basics of VB. Got on well, but now am lost.
    It will be a fairly simple maze with increasing levels of difficulty.

    Ideally they want to control it with a joystick. (Is this a major hurdle to achieve?)

    Anyone got any hints on how to do this as easily and quickly as possible?

    Do I need to get into GDI and API's, and co-ordinates?
    Or could I get off with manipulating the image's edges within limits dictated by the maze?

    Any help is hugely appreciated
    Pam

    As you see - I haven't got a clue!

  2. #2
    Guest
    Do you want to make it 3D or 2D? Also, for the Joystick bit, you might wany to try using DirectX. I believe the correct topic is called DirectInput which explains about different kinds of input including joystick.

  3. #3
    transcendental analytic kedaman's Avatar
    Join Date
    Mar 2000
    Location
    0x002F2EA8
    Posts
    7,221
    Use
    writing software in C++ is like driving rivets into steel beam with a toothpick.
    writing haskell makes your life easier:
    reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
    To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.

  4. #4
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134

    Cool

    I have a module for VB6 Enterprise Edition that lets you use the joystick without any problem. It works best with gamepads. Add the module to your project, and use this code:

    (for sake of argument, let's say your guy was named "Joe")
    (eg. Joe.X=Joe.X+2)
    Sub Timer1_Timer()
    Dim GamePad as UserJoyInfo

    GamePad = GetJoyInfo
    If GamePad.GUp then Joe.X = Joe.X + 1

    End Sub

    Email me at [email protected] and I'll reply
    with the module

  5. #5
    Junior Member
    Join Date
    Aug 1999
    Location
    scotland
    Posts
    25
    Pam,

    I have been using a good 3d engine to develop some software to simulate various visual impairments. You can download the code for the 3d engine from
    http://www.goodnet.com/~andrewa/vbas...prometheus.htm
    Its fairly straightforward and I've found the author to be very helpful.

    Get in touch if you need further details.

    Ron

  6. #6
    Good Ol' Platypus Sastraxi's Avatar
    Join Date
    Jan 2000
    Location
    Ontario, Canada
    Posts
    5,134

    Talking Programming Core

    Try this:
    Put this code in a module:

    Option Explicit

    Type Square
    X as integer
    Y as integer
    canLeft as boolean
    canRight as boolean
    canUp as boolean
    canDown as boolean
    End Type

    public Spaces(30,30) as square

    ----------------

    Then you can add the values in a random level generator, etc.

    Function Collide(x,y,dirx,diry) as boolean
    if diry=1 and spaces(x,y).candown=false then
    collide=true
    end if
    ...do the same for remaining.
    end function

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width