1 Attachment(s)
[vb] 1st Directx Game [Source + Exe]
hi,
I just though i should post my first game using:
gameloop, directx, and decent modular layout (i hope!!)
it's a real simple game, you move your character using leftarrow + rightarrow and collect the falling objects.
the green cubes are "normal", the smaller cubes are worth a little more, the white cubes slow you down for 5 secs, and the pink ones speed you up for 5 secs.
it's not really much fun, but the real reason im proud of it (apart from first time in directx) is the "moddability" aspect to it. if you open up the module LoadData, you can redim the LoadedItem() array and make your own cubes using the functions provided (theres examples), and create your own effects, duration and "reverse-effect" for each cube with access to the User and Game class (would be to the Item class as well, but i have not figured out how to addobject arrays!)
so you can experiment with new cubes, that can play with all (public - so everything atm!) members. it's a neat idea i think, and i try to incorperate it into all the games i make.
now the bad news: it's not really finished, as you can see from the sparse classes, with hardly any multipliers (the ones that are there, don't work) and the comments could do with some work, but after 5 days of learning directx8 etc, i was kinda burnt out with it, and got bored.
try it out! im pretty proud of the chance function really, it randomly selects a cube based on the chance value of each LoadedObjecT() (ie cube). the logic i think is good, and im pleased with it, although I'm sure it's nothing new!
anyways - comments are welcome, as well as any coding tips, such as how i have tried to seperate everything (maybe to much?) into functions and modules, it should be pretty easy to read :D
edit:
just to explain something:
every cube that is made has its variables defined from LoadedObjects(), and redim preserves Item() and so Item() size increases, while LoadedObjects() stays the ammount of unique cubes available. Oh, and LIO is LoadedItemOrigin, which basicly means what "type" of cube it is, and which LoadedObject() the cube came from
ps. wherever i said LoadedObject, i think i meant LoadedItem :blush:
Re: [vb] 1st Directx Game [Source + Exe]
You may wanna lower your text in the game. I can only see half of it. Other than that, it's pretty good for a 1st DX8 game. Keep up the good work.
Re: [vb] 1st Directx Game [Source + Exe]
You might want to try textures.
Re: [vb] 1st Directx Game [Source + Exe]
Ever thought about a 3D port to it? Imaging things falling down in 3D and with you trying to catch it. It's easy to implement it in a 3D environment. You're just working with another coordinate in space, which is Z.
Re: [vb] 1st Directx Game [Source + Exe]
thanks for the comments!
i was going to do textures, but I kinda wanted to finish it, and will try textures for my next project (RTS in 2d again, with directplay hopefully).
i'm only just learning matrices and projection and all that jazz, so i'm not going to try 3d til maybe project after next, maybe later, and thank you both for your help in creating this project!
Re: [vb] 1st Directx Game [Source + Exe]
It keeps saying failed to "intilize = False" when I lanch the game
Re: [vb] 1st Directx Game [Source + Exe]
I like it ;)
And the Setup Screen rocks! (Makes it look profesinal ;))
Re: [vb] 1st Directx Game [Source + Exe]
I get an automatization error when initializing, in this line of code:
D3D.GetDeviceCaps cmbAdapters.ListIndex, Renderer, Caps (frmEnumerate)
What's the problem??? (I've got DX9)
Re: [vb] 1st Directx Game [Source + Exe]
Quote:
Originally Posted by -vb-newb-
It keeps saying failed to "intilize = False" when I lanch the game
Do you have DX 8.1 or newer installed? What GPU do you have?
- ØØ -