|
Post by Trooper on Sept 19, 2004 1:57:41 GMT -5
I'm happy to announce the release of my latest game, Toadder. Many of you will recognize it's similarities to the old classic, FROGGER. To download and play: games.andrewhoyer.com/Enjoy! Trooper
|
|
zane
Posts a bit
His dudeness
Posts: 141
|
Post by zane on Sept 19, 2004 3:39:57 GMT -5
thats quite fun ;D
|
|
|
Post by Ranger1800 on Sept 19, 2004 13:13:30 GMT -5
Dude this game is awesome how the heck did you acomplish the frog rotating 90 degrees each time you press the left or right keys, how long did this take you to make? and how did you manage to get in custom sprites? i always have a hard time to get my own sprites in. great job
peace
-Branden
|
|
zane
Posts a bit
His dudeness
Posts: 141
|
Post by zane on Sept 19, 2004 14:21:49 GMT -5
custom sprites arnt that hard you simply load in a textuer (the sprte image) use that texture to create a new sprite then every time you want to manipulate the sprite you call the bindsprite() command you can then use various commends to move/rotate/scale the sprites and example would look like this:
'set the text mode (affects sprites as well) to buffered textmode(TEXT_BUFFERED)
'load the image for the sprite dim texture : texture=loadtexture("texturepath.bmp") 'create the sprite dim sprite : sprite=newsprite(texture) 'set the initail x position (a variable) dim xpos : xpos=200
'main loop while 1 'sef if the left key is pressed and adjust the x position accordingly if scankeydown(VK_LEFT) then xpos=xpos-1 endif
'same for the right key if scankeydown(VK_RIGHT) then xpos=xpos+1 endif
'bind the sprite so you can use it (in reality, you'd only call this if there was more than one sprite) bindsprite(sprite) 'set the sprite position to the xpos value(x coordinate), and 200(y coordinate) sprsetpos(xpos,200)
'draw the sprites to the screen drawtext() 'end the main loop wend
that should move a sprite from side to side as for the sprite facing different directions, i think you'd just use the sprsetangle() command
|
|
|
Post by Ranger1800 on Sept 19, 2004 16:04:12 GMT -5
I tried the code you had above, and all i got was a white box on my screen.
|
|
|
Post by Ilavos on Sept 19, 2004 21:54:26 GMT -5
Ranger: thats maybe because you dont have the texture that is beig liaded on your computer.Replace it with any texture you have in your data file.
Trooper: Nice game you have there .The commands are kind of sensitive though.It's hard to get used to and to control the toad very effectively.Nevertheless the game is fun.
Peace
|
|
|
Post by Trooper on Sept 19, 2004 23:58:13 GMT -5
Dude this game is awesome how the heck did you acomplish the frog rotating 90 degrees each time you press the left or right keys All this is, is displaying an image based on what direction you're moving in. When you display the image or whatever, simply check which direction you're moving in, and display theappropriate image. This game was completed 12 days after my last one. Didn't work on it every day either, and only a few hours here and there. Counting in good solid coding time, I'd say about 6 hours, I dunno really. I don't keep track. There is not a single sprite here. This is text based! Trooper
|
|
|
Post by Ranger1800 on Sept 20, 2004 1:37:02 GMT -5
It's all text-based? wow you did pretty good with it then shees again great job
|
|
zane
Posts a bit
His dudeness
Posts: 141
|
Post by zane on Sept 20, 2004 4:46:31 GMT -5
out of intrest ranger, did you get that code working (remember to change the image path to an image on your computer). it was type in the fly, and not checked, so there may be errors
|
|
|
Post by Ilavos on Sept 20, 2004 10:56:14 GMT -5
Trooper Reading this i noticed:you never show the code to your games.Why??Are you one of them code hogs???
|
|
|
Post by Trooper on Sept 20, 2004 11:31:11 GMT -5
Trooper Reading this i noticed:you never show the code to your games.Why??Are you one of them code hogs??? Never is a very definite word! If you take a peek at the TRON zip file, you will see I included the source code in there. I just decided not to include it in the TOADDER game as it has additional files... I could make a .zip of those, just haven't. If someone is willing to collaborate, and writes non spaghetti code (see my TRON code for an example of non spaghetti BASIC code), I am happy to share. Code sharing is a great thing, and I've learned a lot from it here. I've put back what I got out of it in my TRON code, and other posts here. So, never say never! Trooper
|
|
|
Post by Ilavos on Sept 20, 2004 12:42:25 GMT -5
Hey,hope you didnt take it badly.I'm not judging here.Just wanted to know. Hmm,the tone wasnt that friendly was it? Sorry bout that. Peace
|
|
|
Post by Ranger1800 on Sept 20, 2004 23:47:25 GMT -5
Yeah i got it to work but i'm still seeing a white box
|
|
|
Post by Ranger1800 on Sept 21, 2004 12:11:17 GMT -5
Heres the thing, the sprite image works once, and when i try to run it again i just get a white box, and on that example you showed me i was using the F117 image from the data file and i still got a white box, and i used the code you posted above.
|
|
zane
Posts a bit
His dudeness
Posts: 141
|
Post by zane on Sept 21, 2004 13:19:53 GMT -5
hmm..thats strange. have you got the most recent version of b4gl? the old version had some strange image loading faluts (the new one still dose, but not as much)
|
|