Skip to main content
GameDev.net gamedev.net
🔒 Locked

HELP me on my thesis! please.. Counter-Strike

Started by macmoy Dec 7, 2007 at 12:04 AM 14 replies 3.4k views
Original Post
macmoy
macmoy
please help me.. i want to make a Counter-strike for my thesis.. my experience: i made tetris3d using C++(opengl) no sounds yet..(i still dont know openal.. so how can i make a CS? uhmm,,my major problem is to model the opponents. its very difficult for me to put textures in 3dmax.. im not asking for a 3dmax tutorial.. i need some alternatives.. for example: making the game 2d,,but its ugly i know.. i need a game for my thesis... i dont know what game should i make.. btw,,im self-studying.. i think ill go for making CS but how.. is there any suggestion:(game that i could make other than CS) tetris is too simple.. thanks for any reply..
NickGravelyn
NickGravelyn
Saying that Tetris is too simple so you want to make Counter-Strike is like saying that you think walking is too slow so you are going to buy a Ferrari. There are lots of middle grounds. Off my head here are a few games you should be able to reproduce before I would try for something as complex as something like Counter-Strike:

- Pac-Man
You get to work with some AI for the ghosts which is something you don't have to make in Tetris.

- Super Mario
Get to work in a more action based game. More advanced collision detection and some more simple AI.

- Marble Blast
Simple 3D graphics (good for learning that). No AI needed. Some simple 3D collision detection used.

I would definitely start smaller than Counter-Strike and work your way up. If you are a fast learner, it shouldn't be too hard to make it through these and learn what you need to make a first person shooter. But it's always best to set your sights on a simpler game first, rather than jumping into a project you are sure to be overwhelmed by.
macmoy
macmoy
oh yes!
im planning to make a mario clone,,hehe

how to make it??
i mean..how to put every level..

im planning to make a txt file..

inside each txt file is similar to this:

000000000000000000000
000000001110000001110
000000000000000011110
111111111111111111111

something like that.. is it the right approach for making that king of game???

for my tetris.. i made it like that inside the program..

but in making mario..is it right??

how??

thanks for the info..

ps. i want my mario,,to walk smooth..not grid by grid..

sorry for my bad english..
shadowisadog
shadowisadog
Doing things that way would be rather inflexible and it might be best to use some sort of binary format. Personally I am partial to the Mappy level editor, as it saves you from having to make your own (let's face it, editing text files is boring and would drive you nuts).

I also recommend using an OOP based design strategy where you have a player class, perhaps a vector to manage your enemy objects, ect.

As for scrolling and stuff I will just post a link to a thread where I already bothered to type all that out: Side Scroller Tutorial

Hope this helps somewhat.
macmoy
macmoy
i want to make my own game ALL from me..

graphics,maps,codes..

how to make the map??

is it grid-based??

how about the movement of Mr. Mario?? is it grid per grid?? of course not..
i want mario to move by small pixels(i mean SMOOTH WALK)...

mario.x=mario.x+1.0f;

but how to check the collision if the map is in grid base(int gridMap[5][20];)

thanks guys!
Splinter of Chaos
Splinter of Chaos
Well, I have a theory about that. Different surfaces in a Mario game have different properties occasionally. Ice is slippery and dirt is not. But Mario can only be on one at a time, because you don't want a Mario that is both slipping AND stopping at the same time do you? Well, I've been told that they use these things called hot spots (write that down, it's a vocab term). A hot spot is a coordinate on the sprite (or a translation from its X and Y coordinates).

So, maybe there's a hot spot at Mario's feet. It's at the bottom of the sprite and at half the length. If that spot is over ice, then Mario's in slide mode (BTW: a state system would be good to govern whether Mario's in the air, on the ground, or even what type of ground). If that spot's on dirt, Mario's in friction mode.

But you have to convert to a grid don't you? Well, that's not really that hard. The grid is X long and Y high. If the hot spot on Mario divided by X on the x axis and Y on the y axis coincides with a block, he's standing on it! You'd also need to repeat this a few times with several hot spots so he can't walk into/through or jump into/through blocks. But because it's integer division, hotspot.x / X returns the x coordinate Mario is at!

The place my method really falls short, though, is I don't know how you'd make sure that Mario within one frame doesn't end up in the middle of a block. My method only theoretically stops him from doing so IF IT'S DETECTED THAT HE'S HITTING A BLOCK!

Oh, and as I mentioned, this is theoretical. I did attend a workshop where I learned to use state machines for things like ON GROUND and IN AIR, and I've done SOME collision detection, but I never had to do much with graphics on my own. In fact, just today I was jumping for joy because I was able to put a dot on the screen and even move it around and even erase it when I was done! How cool is that?!?!

PS: You might want to google "Look ahead collision." That's supposedly the type of collision that they used at the workshop I attended. In fact, just by remembering the name, I think I thought of a new level to add to my collision checking math, but that's the basics and I'm too lazy to go back and update.

EDIT:
I think I remembered what look ahead collision is! Still too lazy to update what I've written, but here's a new paragraph.


Look ahead collision is (I think) where you check:
if Mario went to the place you plan to draw him next, would he be colliding any object?
---Yes? What would you do about it?
------Nothing? Never mind.
------Stop him? Then draw him between where he is and where I am.
---No? Never mind.
shadowisadog
shadowisadog
Using a map editor would still allow everything to be made by you, it just saves you a great deal of development time. If you are making a thesis (and thus are in UNI) I would recommend cutting the work required down to the actual development of the game and not worry about things like making a level editor... You will be supprised how much work you have ahead of yourself without doing a level editor in addition to this.

To move Mario by pixels you want to move him via a 2d vector, and as I don't feel like explaining this concept you should google it.

To test for collisions on the map you would convert mario's position to array coordinates and compare the position in the array to test if it is a platform or not.

As someone who has made Tetris you should be adequately familar with doing collision detection and response in this manner, it is basically the same deal if you think about it.

One more note is that I would NOT use a C style array for this problem. I sort of recommend using an STL vector of STL vectors. Top 20 C++ Tips of All Time and review Tip 19. This is because you could have any size level....

Another hint is that you don't want to represent each cell as an integer, I would recommend using a structure (or even a class if that is what you want to do, although a structure is adequate) because that way you can have multiple layers of information and such. Consider the fact that each cell can have a background, level items, and enemies on it.
Good luck.
macmoy
macmoy
how to convert the place of mario to the 2d array?? like this?

////tiles 64x64 pxgrid [mario.point1 % 64 + 1][mario.point1 % 64 + 1] = GRIDOCCUPIED;grid [mario.point2 % 64 + 1][mario.point2 % 64 + 1] = GRIDOCCUPIED;grid [mario.point3 % 64 + 1][mario.point3 % 64 + 1] = GRIDOCCUPIED;grid [mario.point4 % 64 + 1][mario.point4 % 64 + 1] = GRIDOCCUPIED;
shadowisadog
shadowisadog
Mario should only occupy one tile so:

MarioArrayX=MarioX/TileWidth;
MarioArrayY=MarioY/TileHeight;

As far as your whole occupied question, I am not sure I would put dynamic objects in the array (I would reserve array collision detection as PART of the collision detection algorithm). It could be more trouble then it is worth as you would have to record the old position and make the cell not occupied anymore when the player moves.
ahayweh
ahayweh
Quote:
Saying that Tetris is too simple so you want to make Counter-Strike is like saying that you think walking is too slow so you are going to buy a Ferrari.


Good times.
macmoy
macmoy
how about if MARIO is at the middle of two cells or 4 cells of the grid??
enjoycrf
enjoycrf
i would use fmod
ive heard about problems w openal
enjoycrf
enjoycrf
ok why the hell is counter strike and mario in teh same topic
isometrixk
isometrixk
The original posts were in 2007...
Tom Sloper
Tom Sloper

The original posts were in 2007...
Hadn't noticed that. Closing.
-- Tom Sloper    --      sloperama.com

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.