Author Topic: 'The Shark'  (Read 5991 times)

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
'The Shark'
« on: 2006-11-27, 10:48:54 PM »
I am creating a game called 'The Shark'. In the game you play as a legendary cop nicknamed 'The Shark'. You single handedly take down groups of terrorists and criminals. The only problem is you use unnessasary force. When I say that, I mean you shoot and kill innocent, unarmed and surrendered people. It is a top-down shooter but their will also be car-chases. So far I have the Graphics done. But I didn't draw them the people and backgrounds were taken from Counter Strike 2D and the cars taken from Need For Extreme 2. I did draw some things though, such as the health bar, the aimer and the bullets. I have also finished about 75% of the first level. So far it looks like this is going to be a good game.  ;D

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: 'The Shark'
« Reply #1 on: 2006-11-30, 04:38:35 AM »
Now I have a menu and the first level done and it is really good. But there is one problem. My player sprite is a 360* sprite. The player turns way too fast, it is quite difficult to aim. Is there a way to make it spin slower. I realize if I can slow the spinning down it would make driving a car more realistic as well.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: 'The Shark'
« Reply #2 on: 2006-11-30, 05:56:17 AM »
If the whole game runs slower, then the turning will be slower... that's the easiest thing I can think of :)  Just set the frame rate limit in the player settings dialog to 30.

Other than that, changing the rate that the sprite turns doesn't seem like an easy thing.  You could try to make the sprite inert instead of controlled by the input device, and then handle all the turning in script, and only allow it to turn left or right when some counter value is a multiple of 3 or something.  I think it's not too difficult to pass all the inputs to a sprite from script instead of directly from the keyboard.  Think that would be worthwhile to work out?

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: 'The Shark'
« Reply #3 on: 2006-11-30, 05:20:56 PM »
If the whole game runs slower, then the turning will be slower... that's the easiest thing I can think of :)  Just set the frame rate limit in the player settings dialog to 30.

If I lower the framerate, bullets will go really slow so it's not really worth it. Unless, I could somehow make a bullet go faster than the maximum 10 pixels a frame. Then it would be a great solution.


Other than that, changing the rate that the sprite turns doesn't seem like an easy thing.  You could try to make the sprite inert instead of controlled by the input device, and then handle all the turning in script, and only allow it to turn left or right when some counter value is a multiple of 3 or something.  I think it's not too difficult to pass all the inputs to a sprite from script instead of directly from the keyboard.  Think that would be worthwhile to work out?


Yeh, that should work. But I can't write script so someone else would have to write it. Also, I have a script to enable the player to shoot, generated by the scripting wizard. So they would have to be joined.
 


bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: 'The Shark'
« Reply #4 on: 2006-12-01, 06:55:40 AM »
I don't have time to write the code myself right now, but you could download the 2-player sample from http://gamedevprj.sourceforge.net/files/GD2Player.zip.  I think that project has some code to transfer keys to the second player object's inputs that might help you figure out how to set the player's inputs in script.  Otherwise you might have to hope someone else has some time to demonstrate.

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: 'The Shark'
« Reply #5 on: 2006-12-13, 06:48:15 PM »
The Shark is finished!  ;D Well the first level anyway.  :-\ To tell you the truth I don't think I will ever finish this game.  :( For some reason, making this game got boring pretty quickly.  >:( So I've announced it as finished and unless someone wants to pick up where I left off, it will never be truly finished.  :( Can I submit it to the projects page even though it's only got one level?  ??? If so you can get it from here http://www.box.net/public/5renpnv2k7. There is an installer and a zip take your pick.   ;)

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: 'The Shark'
« Reply #6 on: 2006-12-14, 06:33:58 AM »
Where's the ZIP?

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: 'The Shark'
« Reply #7 on: 2006-12-14, 03:42:08 PM »
I seems I linked to the wrong location. http://www.box.net/public/y6pdoinq0g If you click on it, it gives you an option of the installer or zip.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: 'The Shark'
« Reply #8 on: 2006-12-14, 05:58:02 PM »
I think I will limit new additions to the listing of GameDev 1.x games to completed, 2+-rated projects from here forward (or maybe from a while back forward -- I think I might have decided something similar a while ago).  Doing reviews and posting the games is getting tedious to go back to while working on SGDK2.  I hope the forums are an adequate way to publicize your project.  I did take a quick look at it, but I couldn't do much because the player turns so fast I can't aim accurately.  Looks like you had some nice work in there.  Thanks for sharing!

BTW, a couple days ago I tested the new sprite rotation wizard I just added to SGDK2, which allows you to make more than a thousand rotating states.  I tried with 360 states and it was turning slowly enough to get a realistically behaving car.  Hope you stick around for SGDK2 when it's released!

Jam0864

  • Contributor
  • Fanatic
  • **
  • Posts: 744
    • MSN Messenger - marmalade0864@hotmail.com
    • View Profile
    • Jam0864's Content Dump
    • Email
Re: 'The Shark'
« Reply #9 on: 2006-12-14, 10:18:48 PM »
BTW, a couple days ago I tested the new sprite rotation wizard I just added to SGDK2, which allows you to make more than a thousand rotating states.  I tried with 360 states and it was turning slowly enough to get a realistically behaving car.  Hope you stick around for SGDK2 when it's released!
More than 10000 states! How much memory do you reckon that would take up?!?! Yeh SGDK2 is sounding really good from what I've seen and heard. I've got one of the Pre-Alpha releases (can't remember which one) and it looks really good, I'm definantly sticking around. Is it possible to choose how fast a sprite accelerates in SGDK2? I mean without mass amounts of special functions. If you could then you could make really good racing games.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: 'The Shark'
« Reply #10 on: 2006-12-15, 06:34:36 AM »
That's 1000, not 10000 (The limit in the wizard is actually 1080), but I can't imagine anyone really needing more than 360; I just picked some arbitrary high limit that I thought nobody would need to go beyond.  It does take some memory to have a lot of states, but not as much memory as it would take to have an actual pre-rendered graphic for each state.  Just the memory for the rotation matrix that knows how to transform the graphic to each rotation, and the memory for including each of those frames in a sprite state.  I haven't calculated, but surely it's less than an entire graphic would be.

Yes, acceleration and gravity and such will be much more in your control in SGDK2.  And the first sprite template I made is a car that accelerates at .1 pixels per frame per frame instead of the 1 ppfpf that version 1.x uses.  Changing acceleration wil lbe as simple as selecting the "accelerate" rule in the sprite definition and changing the parameter.  By default the parameter is specified in tenths of a pixel per frame per frame, but you could also alter the code to make it hundredths or whatever you like without much difficulty.  (Editing code and having it linked to the project will be nicer and easier in SGDK2 as well).