Results 1 to 23 of 23

Thread: VB: Gems 'N Rocks [Source]

  1. #1

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051

    VB: Gems 'N Rocks [Source]

    Hi all, for a while now i've been working on a tile-based game, using DX7, i'd appreciate your thoughts and comments.

    The basic premise, is that you have to collect gems that are placed about the level, whilst avoiding various hazards. The simplist of these are rocks, which you can push around, and can crush you. The others i class as 'Mines' (for want of a better name). These mines all have different ways of moving (according to their colour). Some simple follow a wall, while others move in more complicated ways (such as an intelligent player-chasing mine).

    If anyone is really interested in how i've done anything, i could post the source, but i'd need to comment it a bit more first i think.

    Here's the game, hopefully it'll extract ok, just make sure you extract the zip with file paths enabled.

    Thanks for any comments.

    EDIT: Now you can get the source here


    EDIT: This is the latest version with the resolution now selectable.
    Attached Files Attached Files
    Last edited by Electroman; Jun 3rd, 2004 at 01:59 PM.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  2. #2
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    If you select the movement as the center or whatever it's listed as, the entire screen says in the center and jumps annoyingly as you move

    The player won't die in the center mode, the things will fall on him and just stop before crushing him, however in the other movement if needed mode, it does kill him.

    You waste way to much screen space, I could probably tile about 10 of your games within the screen space it leaves blank (white)

    Just not liking it but not a bad try at a game
    Last edited by Kasracer; Jul 17th, 2003 at 04:39 PM.

  3. #3

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051
    Thanks for the reply.


    Originally posted by kasracer
    I could probably tile about 109 of your games within the screen space it leaves blank (white)
    What do you mean?

    As for the player death/movement mode bug, i'll look into it. I don't really like the centrescreen movemode anyway, so i could just remove it.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  4. #4
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Originally posted by SLH
    What do you mean?
    I ment how there is a ton of white space aorund the little aprt of the game, I probably could tile 10 of those games using the empty white space. It was supposed to be 10 not 109

  5. #5
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349
    Yea, the map movement doesn't seem to be what it says for me either . Wicked game tho. The player movement is a bit jurky aswel, are you using anything to control the movement in relation to the time for each loop??
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

  6. #6

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051
    Cheers for the comments.

    Originally posted by Electroman
    Are you using anything to control the movement in relation to the time for each loop??
    Yes, i'm using gettickcount, with the player moving at a certain interval.

    With a simple calculation i determine when the player can move, once he can (and the user presses a key), then it's set in motion towards the appropriate adjacent grid position.

    The player's offset from his previous position is controled by how long ago he wanted to move (so that the player will move 1 unit just in time for him to move again).

    using this formula:

    Player.Offset = ((PlayerThinkTime - GetTickCount) / PlayerThinkInterval) * PicSize

    playerthinktime is the time the player last moved, playerthinkinterval is how often the player can move and picsize is the size of 1 unit of the grid.


    Depending on which movement mode you use, the player movement can be a little jerky sometimes. I suggest using the movement mode 'Move If Needed'.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  7. #7
    Addicted Member Lee_S's Avatar
    Join Date
    Dec 2000
    Location
    New Zealand
    Posts
    250
    I get

    Run-time error '445':
    Object doesn't support this action


    when clicking the START button. Is this an XP problem or graphics problem or something else?
    Lee Saunders
    Win XP Professional : VB6 Enterprise / VB 2005 Express

    History admires the wise, but it elevates the brave.

  8. #8
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349
    Thats the method i'd of used aswell for controling the movement but the thing was I was moving down and the player sudenly jumped two rows really quick then went back to normal , oh well no worries, good work.
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

  9. #9

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051
    Lee_s: I'm using XP myself, so it can't be that. Do you have DirectX 7 or higher installed, because that's what it uses. Other than that i can't think of anything else.

    Electroman: Strange. Ah well, if i want it to look like a windows game it's got to have microsoft-esk bugs
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  10. #10
    Addicted Member Lee_S's Avatar
    Join Date
    Dec 2000
    Location
    New Zealand
    Posts
    250
    Originally posted by SLH
    Lee_s: I'm using XP myself, so it can't be that. Do you have DirectX 7 or higher installed, because that's what it uses. Other than that i can't think of anything else.
    Yup, Im using DirectX 9.0a. What resolution/colour depth is it meant to run in? I have a crappy gfx card in at the moment, maybe it cant set it right?
    Lee Saunders
    Win XP Professional : VB6 Enterprise / VB 2005 Express

    History admires the wise, but it elevates the brave.

  11. #11
    Frenzied Member cyborg's Avatar
    Join Date
    May 2000
    Location
    Sweden
    Posts
    1,755
    really nice!
    Check out the FAQ and do a search before you post.
    My tutorials: Anti-Alias Pixels, Accurate Game Loop, Resource File

  12. #12

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051
    Originally posted by Lee_S
    Yup, Im using DirectX 9.0a. What resolution/colour depth is it meant to run in? I have a crappy gfx card in at the moment, maybe it cant set it right?

    That's another thing i need to add - an options screen!


    The resolution is 1280x1024 - i should DEFINATLY make that a configureable option..... Should be easy to change - at the moment it's just a public const.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  13. #13

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051
    Originally posted by cyborg
    really nice!
    Thanks!


    Does anyone have any suggestions for extra items/graphics/monsters etc. that i could include in my game?
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  14. #14
    KrisSiegel.com Kasracer's Avatar
    Join Date
    Jul 2003
    Location
    USA, Maryland
    Posts
    4,985
    Lees: Do you have the .NET framework installed? Also, can your computer handle 1280 X 1024?

  15. #15
    Ex-Super Mod'rater Electroman's Avatar
    Join Date
    Sep 2000
    Location
    Newcastle, England
    Posts
    4,349
    That'll be the problem, my graphics card can cope with that res but the monitor will only go up to 1024*768. How come you didn't pick a popular res like 1024*768??
    When your thread has been resolved please edit the original post in the thread ()
    and amend "-[RESOLVED]-" to the end of the title and change the icon to , Thank you.

    When posting Code use the [VBCode]Code Here[/VBCode] tags to be able to use the code highlighting.

  16. #16
    Addicted Member Lee_S's Avatar
    Join Date
    Dec 2000
    Location
    New Zealand
    Posts
    250
    Originally posted by Electroman
    That'll be the problem, my graphics card can cope with that res but the monitor will only go up to 1024*768. How come you didn't pick a popular res like 1024*768??
    Same here.

    LS - "I'll play it later, lol"
    Lee Saunders
    Win XP Professional : VB6 Enterprise / VB 2005 Express

    History admires the wise, but it elevates the brave.

  17. #17

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051
    Originally posted by Electroman
    That'll be the problem, my graphics card can cope with that res but the monitor will only go up to 1024*768. How come you didn't pick a popular res like 1024*768??
    I didn't really think about incompatability, i just choose the resolution my desktop was in at the time (so that the ide didn't shrink when playing the program).

    I've uploaded a version that has the option to change the resolution (it doesn't enumerate them yet though). You can get it at the top of this thread.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  18. #18

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051
    I've added some simplistic lighting (more to come), and uploaded the latest version (source) here
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  19. #19
    Frenzied Member
    Join Date
    Jul 1999
    Posts
    1,800
    the player just shows up as a white box for me...

    only textures i get are the floor, and the rock is the background texture with a white box around it...

    errr?

  20. #20

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051
    That's very wierd, no-one else has had that problem....

    I take it you have DX7 or higher.

    Otherwise i have no idea what the problem is.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  21. #21
    Fanatic Member
    Join Date
    Jan 2003
    Posts
    1,004
    A little buggy (in Default 5, you blow up when you cross into the white square for some odd reason) and controls are a little odd (input sampling is not constant so sometimes you get runover) but all in all a good game.
    "Can't" and "shouldn't" are two totally separate things.

    All questions should be answered. All answers should be true. That is why I post.

  22. #22
    Frenzied Member wiz126's Avatar
    Join Date
    Jul 2005
    Location
    Mars,Milky Way... Chit Chat Posts: 5,733
    Posts
    1,080

    Re: VB: Gems 'N Rocks [Source]

    Quote from SteveCRM
    the player just shows up as a white box for me...

    only textures i get are the floor, and the rock is the background texture with a white box around it...

    errr?
    i am having this same problem too

    bug?

  23. #23

    Thread Starter
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051

    Re: VB: Gems 'N Rocks [Source]

    It probably is a bug, but i can't replicate it so i can't really find out what causes it.
    Even if i did i no longer use VB6 anyway, so i couldn't update the game anyway. Been a while since i've looked at the code for this!
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


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