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.
EDIT: This is the latest version with the resolution now selectable.
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
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.
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
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
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.
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).
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
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.
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
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.
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
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
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.
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.
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
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
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
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.
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