Click to See Complete Forum and Search --> : VB: Gems 'N Rocks [Source]
SLH
Jul 17th, 2003, 01:25 PM
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 (http://www.vbforums.com/attachment.php?s=&postid=1484802)
EDIT: This is the latest version with the resolution now selectable.
Kasracer
Jul 17th, 2003, 04:03 PM
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
SLH
Jul 17th, 2003, 04:51 PM
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.
Kasracer
Jul 17th, 2003, 05:40 PM
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
Electroman
Jul 17th, 2003, 05:42 PM
Yea, the map movement doesn't seem to be what it says for me either :confused:. 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??
SLH
Jul 17th, 2003, 06:23 PM
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'.
Lee_S
Jul 17th, 2003, 06:38 PM
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?
Electroman
Jul 17th, 2003, 06:44 PM
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 :confused:, oh well no worries, good work.
SLH
Jul 17th, 2003, 06:51 PM
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 :D
Lee_S
Jul 17th, 2003, 09:52 PM
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?
cyborg
Jul 17th, 2003, 10:10 PM
really nice! :)
SLH
Jul 18th, 2003, 03:59 AM
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.
SLH
Jul 18th, 2003, 03:59 AM
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?
Kasracer
Jul 18th, 2003, 05:33 PM
Lees: Do you have the .NET framework installed? Also, can your computer handle 1280 X 1024?
Electroman
Jul 18th, 2003, 06:03 PM
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??
Lee_S
Jul 18th, 2003, 06:40 PM
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"
SLH
Jul 19th, 2003, 03:25 AM
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.
SLH
Jul 20th, 2003, 07:12 PM
I've added some simplistic lighting (more to come), and uploaded the latest version (source) here (http://www.vbforums.com/attachment.php?s=&postid=1486483)
SteveCRM
Jul 20th, 2003, 07:58 PM
the player just shows up as a white box for me... :confused:
only textures i get are the floor, and the rock is the background texture with a white box around it...
errr? :confused:
SLH
Jul 20th, 2003, 08:13 PM
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.
Darkwraith
Jul 22nd, 2003, 05:16 PM
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.
wiz126
Jul 29th, 2005, 01:31 AM
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?
SLH
Aug 1st, 2005, 04:18 PM
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!
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.