Making a shooting game
Making a shooting game
Making a shooting game
Making a shooting game
Making a shooting game
Making a shooting game Making a shooting game Making a shooting game Making a shooting game Making a shooting game Making a shooting game Making a shooting game Making a shooting game
Making a shooting game Making a shooting game
Making a shooting game
Go Back  Xtreme Visual Basic Talk > > > Making a shooting game


Reply
 
Thread Tools Display Modes
  #1  
Old 03-25-2011, 08:53 PM
elemein elemein is offline
Newcomer
 
Join Date: Oct 2010
Posts: 14
Default Making a shooting game


Okay, I got most of my game threshed out, and I got all my programming together, Im just missing TWO main points of code for it.

The first main point of code is this; the game is an "over the top view" shooter, so your character is in the center of the screen while you move, and the map scrolls up and down when you use WASD. I know how to make my character move, the problem is the plotting; I dont know how to make the map scroll everytime you move. Also, i cant just cycle images through animations as if I do it that way, when I add a multiplayer server, it simply wont work.

The second part of the code is this; where your character looks is controlled by the mouse. So if your mouse is to the left of your character, your character is looking left, and so on. The thing is, I have NO idea how to make your character look at the cursor, also, I dont know how to make him shoot when you click, and to have the rounds go where your mouse is pointed (where he is looking).

I am also missing one "animation" bit. Basicly, when you shoot, your bullet is in the form of a fast-moving tracer. I already have a .BMP of the tracer, the problem is, I KNOW how to make the tracer move at x speed, the problem is, if my character shoots down, the tracer is going to travel down the screen, except the tracer will be horizontal,becuase thats how it was drawn. Is it possible to change the angle of the .BMP so that it fits to the angle of firing?

Big thanks!
Reply With Quote
  #2  
Old 03-30-2011, 07:38 PM
ZaCkOX's Avatar
ZaCkOX ZaCkOX is offline
Contributor
 
Join Date: May 2006
Location: CA
Posts: 645
Default

I'm surprised no one has responded. Well if it where me, I would load the map into a picture box. Then just move around it with the character. Or load pictures into the map when in the appropriate distance.

Character (supposedly) moves up 60 pixels, map moves down 60 pixels. Other pictures load if necessary. That sounds better.

The character turning and shooting in a direction according to your mouse would be a little bit more difficult, at least for the way I think I would do it.

I would divide the screen up into seperate sections like a pie or pizza. And if the mouse coordinates are in one piece, move the character facing that direction. If mouse left pressed then shot at that direction.

To change the angle of a picture, you will probably need more advanced programming with alpha image. Or the alternate decision is making pictures of several different angles.
__________________
ZaCkO ... Who is your attitude?
Reply With Quote
  #3  
Old 04-11-2011, 08:56 AM
Leade's Avatar
Leade Leade is offline
Junior Contributor
 
Join Date: Jul 2005
Location: Wherever i fall over
Posts: 222
Default

To solve the looking at the mouse issue, needs a bit of trig, i hate trig but use it all the time i think its Tan(Length/Height) and you get the angle in which to rotate.

2) once you have that angle then you apply that to the bullet and it will travel in that direction.

3) have the image of the bullet facing up and just rotate acording to the angle of the charecter, then with a bit of sin and cos you can do the movement bit

4).... now for the difficult part the map bit, to things, have a big image and say for every 10 units you go forward shift the texture co-ords by 10 pixels.
__________________
Fact: The best ideas come when your smashed of your face. So drink beer and be merry!!!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Making a shooting game
Making a shooting game
Making a shooting game Making a shooting game
Making a shooting game
Making a shooting game
Making a shooting game Making a shooting game Making a shooting game Making a shooting game Making a shooting game Making a shooting game Making a shooting game
Making a shooting game
Making a shooting game
 
Making a shooting game
Making a shooting game
 
-->