First attempt in progress

Started by Tracy, March 18, 2006, 03:41:35 PM

Previous topic - Next topic

Tracy

Hi all.

After much tinkering, I'm finally able to get this posted on the forums (Kevin, I think you were right and it was timing out- after I deleted the exe file and cut the size down a bit it loaded fine.)

As this is my first attempt at a game and mostly for fun (as opposed to trying to accomplish something meaningful,) any constructive feedback is welcome. Most notably, if you see me doing something grossly inneficient in the coding I'd appreciate the pointer.

The graphics are mostly oldschool SNES sprites with a tileset by Calypson, and then a few that I did myself. The sound effects were half generated by heavily modifying random wave files with Audacity, and half scrounged off of the net. (The evil laughter, for instance.) Minus the sprites, I don't think any of the stuff is copyrighted, though I'm not sure and will be checking if I ever finish this thing. Currently it's still a glorified version of the 2D side scroller example included with PB.

The enemies are randomly generated every time, and until I get a function written to make things more permanent that's just the way it's going to be. (You can hit Shift+p in the game to see the embryonic stage of the alien editor.)

Controls:

Move/Jump/fire = arrows/space/ctrl. (you can aim with up and down)

the "d" key (sometimes) cycles through weapons. It's a little buggy, and I haven't bothered to fix it or even try. (Suggestions?) There are six weapons total for now, though they're more for just trying things out than anything final. (I *am* proud of the fireball, though. Sound and graphics all done myself. :))

You can edit the map with the mouse, but it won't affect collisions until you save it with the 'enter' key.

Known bugs:

Sometimes a bullet will do double damage to an alien. If anyone can reproduce and pinpoint the cause of this bug I'd be most grateful. I've tried multipletimes to no avail, and then just gave up.

Also, sometimes bullets get stuck on corners or walls. I'm working on that. Again, any help/feedback is appreciated.

There's also a great deal of unfinished stuff. I'll get to it later when I have time, but I wanted to post what I have before I leave for spring break. (i.e. if I don't respond for a week or so it's because I'm out of town. Nothing personal to anyone who comments.)

Frankly, I enjoy playing it even though it's currently rather pointless. (That probably has a great deal to do with the fact that I made it, though. :))

Enjoy!

Tracy

#1
QuoteSeems to be missing the "gargoyle_Crouch.png" image

Doh.

You actually don't need that image, but I forgot to adjust the code.

Here's the updated version.

To fix the version you've got delete the "Load_Anim" command line that calls that image. (line 159 under the 'globals' tab.)

Let me know if that works.

Edit: ...or you could just throw that image in. Like I said, I don't actually use it.

kevin

This is REALLY GOOD fun..


And here's a Screenie for the lazy people

Tracy

QuoteThis is REALLY GOOD fun..
And here's a Screenie for the lazy people

:D  Thanks, Kevin. Nothing like some positive feedback to make my day.

kevin

#4
Just picking through some of code a little, one thing you prolly should look into is the array commands.  In particular the CopyArrayCells command.  This command will allow you to code selection of types, or a single type in one hit.

For example in the AimedAlienBullet function you could remove all that item by item feild copy stuff with something like this.  (note:) I've guessing that those arrays are of  tBullet structure here btw.  

ie.  THis should copy a typed element within a array.  

CopyArrayCells Bullet().tbullet,BulletType,0,Bullet().tbullet,Bullet_Qty,0,1


also stuff like this,

PlayBASIC Code: [Select]
Psub AlienPlayerDistance(a,p)

aSpr=Aliens(a).spr
pSpr=player(p).Spr

px#=GetSpriteX(pSpr)
py#=GetSpriteY(pSpr)
ax#=GetSpriteX(aSpr)
ay#=GetSpriteY(aSpr)

x#=ax#-px#
y#=ay#-py#

D=Sqrt(x#^2+y#^2)
Text ax#,ay#,D
EndPsub D




could just be

PlayBASIC Code: [Select]
Psub AlienPlayerDistance(a,p)
aSpr=Aliens(a).spr
pSpr=player(p).Spr
d=GetDistance2D(GetSpriteX(pSpr),GetSpriteY(pSpr),GetSpriteX(aSpr),GetSpriteY(aSpr))
Text ax#,ay#,D
EndPsub D



Tracy

Sweet. That was why I posted this thing: I KNEW I was doing some stuff the hard way. When I get back from break I'll update the code with the new commands.

Thanks again, Kevin.

Calypson

hey! Great game!  i feel special - uses some of my art as well as some of my coding (for the in-game level editing).  its really addicting.

medwayman

Movement doesn't work properly for me although I can fly and shoot. Looks good though, and I love the weapons :D  

Nice work :)

Tracy

QuoteMovement doesn't work properly for me although I can fly and shoot. Looks good though, and I love the weapons :D 

Nice work :)

The movement doesn't work? That's wierd. It's nothing fancy- can you move in the 2D platform example game that comes with the IDE? (I suppose the first question is "Do you have arrow keys on your computer?", but I'm taking that as a given.)

medwayman

If I press one of the arrow keys everything freezes until I release it. Also I've just noticed the editor switches between foreground and background.

On the ground I can only change direction the character is facing, but in the air I can get some movement. It seems if I get the timing right with the arrow and spacebar the character shoots off quite a distance, but mostly it's only a few pixels.

Just tested the PB platform example and that works fine. Strange...

Tracy

#10
QuoteIf I press one of the arrow keys everything freezes until I release it. Also I've just noticed the editor switches between foreground and background.

On the ground I can only change direction the character is facing, but in the air I can get some movement. It seems if I get the timing right with the arrow and spacebar the character shoots off quite a distance, but mostly it's only a few pixels.

Just tested the PB platform example and that works fine. Strange...

Hmmm... it sounds like somehow the 'Shift' key is being triggered when you use your arrows. If so, I'd wager that:

1) If you change the 'allowededit' value to 1 in the 2D example, it'll freeze and

2) If you change the same value to 0 in my game, it'll work perfectly fine.

Let me know if that works. I'm most curious at this point.

medwayman

QuoteHmmm... it sounds like somehow the 'Shift' key is being triggered when you use your arrows. If so, I'd wager that:

1) If you change the 'allowededit' value to 1 in the 2D example, it'll freeze and

2) If you change the same value to 0 in my game, it'll work perfectly fine.

Let me know if that works. I'm most curious at this point.


Yep, just as you predicted. The PB example freezes and your game works fine.

Great game btw.  :)

Tracy

Glad that worked, and thanks again for the positive feedback even though this really isn't much beyond a test-run for the engine. I should have another, more functional version up in the next few weeks, though it's tricky to find programming time while being a full-time medical student.  :blink:

I justify my programming indulgence by the logic that everyone needs a hobby to keep them mentally healthy.  ;)

Tracy

#13
Update:

Hi folks. Here's an updated version of the game. Mostly, it's the same basic premise: run around pointlessly and shoot baddies. I wanted to post it because 1) I think some of the bullet effects look pretty cool 2) It's going to be a bit before anything else significant happens with it, so I might as well post it and 3) I've got a few non-programmer friends who wanted to see it.

Updates: I've incorporated alpha-additive drawing for the weapons, and updated the graphics on the weapons, and added new ones. It's amusing. It's also a bit slower. It might get choppy on some systems, so let me know. (And Kevin or whoever else, if you see me doing things the hard way on the drawing end of things I'm always up for suggestions as to how to improve.)

Please pay no attention to the graphical schizophrenia of the main character at this juncture. It's a temporary state that I don't have time to fix right now. Pretend you've had some psychoactives before you play, if that helps.

Note: In order to make this more upload/downlod friendly, I've split it into three files. You only need two of them if you are running the code out of PB: GFX, and sounds. The 'Prototype.zip' is a compiled executable for my buddy who's not a programmer but wanted to see it anyway.

Enjoy! :D

VERY IMPORTANT: All of the files must be in the SAME FOLDER for it to run properly. Not subfolders, but the EXACT SAME FOLDER. That means you're going to have do do some copying and pasting. Sorry for that, but it's the upload tradeoff.

P.S. On the offhand that anyone wants to use any of the graphics/sounds feel free. The enemy sprites are mostly old nintendo, so be careful with that, but the spells and SFX are original. (Well, the sounds are actually heavily modified versions of other sounds - mostly from Morrowind. They are, however, tweaked beyond all possible recognition. They don't sound at all like the source files did, I just used the source files as a creative medium.)

Ian Price

There's some great special effects in there now - proof positive that PB is just as capable as BlitzMax and a hell of a lot easier to develop with (and something that BlitzBasic can't do).

Excellent stuff.  :D
I came. I saw. I played some Nintendo.