# Guma

Member Since 13 Jan 2012
Offline Last Active Yesterday, 05:27 PM

### 3D Hitscanning

24 April 2013 - 04:33 PM

Here we discuss hitscanning in 3D and FPS games, and methods of doing it.

For those who don't know, hitscanning is basically a hitbox collision detection, which determines the speed and height of the body to deal a right amount of damage also depending on distance. It is also used in old games, such as Wolfstein 3D and Doom.

In simple term, if player is jumping the enemy bullets will deal -2 damage. If player is running, the bullets will deal -1 damage. If the player is standing the bullets will deal -8 amount of damage, and if the player is jumping and running the bullets will hit with a rare chance, and so on. This method may not appear useful in 2D games, and the modern games use different methods of calculations.

Why hitscanning?

It improves combat in FPS games, i personally don't use bullet objects in my FPS games but rather deal the damage depending on calculations. If you'd take example as Minecraft, jumping and hitting the pig at the same time will do a critical damage to it.

Since i'm a simple guy and i'm not very much into 3D hitbox detection i've mashed up a very simple (very very simple) code, it can be improved for sure;

```   if obj_player.speed>0
{
//Insert any shooting variables here, make sure to set the damage amount for each action
speed = 0; obj_player.health -= 2 }
else
if obj_player.speed<1
{
speed = 0; obj_player.health -= 5
}
else
if obj_player.zspeed > 1
{
speed = 0; obj_player.health -= 1
}
}
```

Again, this is VERY basic, since it's quite a noob thing let's take it as an example.

The purpose of this thread is to share the methods you guy's may use, it may be an advanced script, or just as simple method as i did.

(These images are off the Wolfstein Wikia, i thought this may come useful!)

Hit detection

Damage calculation

Graph

Damage Formula (Player shooting)

What are better methods of doing this?

### Limit Yaw Movement

13 April 2013 - 11:39 AM

So i'm working on a FPS, i use an orthographic projection to draw weapons on screen.

I have set it so the weapon Y follows camera yaw, so when you look around with camera the weapon moves as well instead of being locked.

Unfortunately if i turn around 360 or more, the weapon goes out of screen.

Is there a better way to make the weapon follow the camera slowly instead of being locked,

or make it so it limits its movement so it doesn't go out of screen?

### Insanecoke - Fps (Wip)

24 March 2013 - 06:30 PM

I've saw tons upon of tons of poor Doom remakes, and watched with a hope there may come up some fun game. Not purposely with a ton of .DLL's and Models, but certainly a great art work implementation to a First Person Shooter that would be fun to play, and enjoyable for a hour, or a few minutes or so.

I did a few tests over my ability on Game Maker 3D, and i turned out to be a fast learner and wrote my FPS engine.

Of course, it has billboards and doesn't have a lot of "Real" 3D content as you might call it, but before we head over what kind of game is InsaneCoke and where you can download it i would like to present features.

InsaneGear Features (Engine)

InsaneGear is as I've told, my own written FPS engine that i will be using on my upcoming games.

How it's different? I was basing it on some popular old school games, such as Quake. It's not polished 100% yet, but in future it will be open source.

• Z-Plane detection - In short, headshots. When you kill an enemy it detects whether it was killed by shooting at the head or body.

• Rocket/Grenade jumping - It took a while, but i did it. For those who don't know what that is, it's basically a trick known on Team Fortress 2 or Quake, and some other games.

When you shoot beneath or near yourself you can speed and propel into the air, allowing you to reach great heights and speeds.

• Pure D3D, no Extensions/Dll. I haven't used a single DLL, and all the world you see is made using basic Game Maker 3D functions.

• 3D collisions - Without them, Rocket jumping is useless. That's why they are here.

• Fake particle system - It was the first time i made a fake particle system myself, in a 3D game. You can see shells ejecting out of the gun when shooting, and blood splattering out of enemies once you kill them.

• Fake physics - You can kick balls and props around the map! Yay! I was actually inspired by Duke Nukem 3D.

• And more! There's a lot of stuff i forgot, so i will update this thread as often as possible.

InsaneCoke Features (Game)

InsaneCoke is a game, made on the InsaneGear engine i was developing, which is why this thread is here. I thought to snatch some fans, so there we go.

• RPG Content, leveling up. Once you level up you get gun akimbos, and the time switches (Night/Day)

• Maps - You can choose which map to play on, so you don't get bored.

• Tons of weaponry - There's a lot of weapons.

• Based on old school games - There's a lot of references, i was quite inspired by Quake and Duke Nukem as told.

• Fun - Not fun at all? Not fun yet? Throw some suggestions in comments and i will take my time to do it!

So since it's a pretty young game and the engine itself, i'm not overestimating this too much. I know there are bugs, and it would be great if you would tell me if you found any.

Screenshots can be found on the InsaneCoke development blog, which is here;

www.insanecoke.wordpress.com

If you are interested you can follow the blog, and help the community grow.

Looking for a demo?

Here; there's a lot of default stuff left untouched, such as loading screen and icon. They will be replaced in future, once i finish working on the game, because as I've told, it's very early.

If you've got some suggestions, you can comment below. The reason i haven't put the screenshots directly in forums, because of lack of time.

Enjoy the little alpha!

### What Sounds Do You Fear The Most?

14 March 2013 - 10:57 AM

Hello. This may be a wrong forum section, but you can also put a link to the sound download so it's kind of a resource ask.

Guy's, what sounds do you fear the most? I mean sounds, that would definitely make you feel scared, alone, left in darkness, those doesn't need to be jumpscares,
Here's a few examples: High Pitched Sounds (16kHz or above), Very silent whispering.
Something that isn't very popping out of atmosphere the most, but most of time making you feel being stalked. Strange sounds that can be.

I know I'm asking for something very strange, but I'm working on a horror game that doesn't involve jumpscares and is meant to be psychologically affecting.

Also, putting a link to the sound is unnecessary I'm just in a need to know what people fear the most

### Cheat creation?

16 February 2013 - 04:18 PM

Greetings! I have a little question.
Some Game Maker games have License Key fields, which i saw a tutorial how to crack those in .exe file using Hexagonal Decimal editor.
Basically it works as the same thing as Cheat Engine but affects Game Maker files as well.
I have a question - Is it possible that someone could write down HEX codes and that sort of stuff to create a hack and use it again'st our/my games?

In short, is it possible that someone can hack my game without use of decompiler?
I'm not really experienced in such sort of stuff, so a simple answer would be nice.

Thanks