Juutis' game thread!!! (Nirhis)
- darksmaster923
- Posts: 1857
- Joined: Wed Jan 03, 2007 10:32 pm
- Location: Huntington Beach, California, USA
Well, first of all, all the weapon scripts are very basic stuff. There's nothing fancy, exept for the fire mode selector for the SMG ( you guys noticed it, right? ). They just move around with the camera, keep track of ammo and shoot and reload when certain buttons are pressed.
Secondly, I don't think it's that simple. I just can't give you a 'basic working script', because I don't have one. You see, all the scripts in the demo are built on top of each other. They wouldn't probably work alone so you would need the whole system to make one script work.
***EDIT***
By saying "all the weapon scripts are very basic stuff" I don't mean they are basic scripts, I mean there's nothing special or so. Like iron sights or something...
Secondly, I don't think it's that simple. I just can't give you a 'basic working script', because I don't have one. You see, all the scripts in the demo are built on top of each other. They wouldn't probably work alone so you would need the whole system to make one script work.
***EDIT***
By saying "all the weapon scripts are very basic stuff" I don't mean they are basic scripts, I mean there's nothing special or so. Like iron sights or something...
Pain is only psychological.
The purpose of that function is to return the direction to the nearest wall.
For example, sometimes when the enemies lose sight of the player, they don't try to go after him but instead, stay where they are and start to 'camp'. They just stay there and watch the surroundings. The function is mainly used in the camping part to prevent the enemies from looking at a wall that's just in front of them. I tried to make them even a bit aware of their surroundings.
It is also used when the enemy hasn't spotted the player yet. He walks around randomly, and the function prevents the him from walking straight into walls or getting stuck. If he collides with a wall, he just checks where the nearest wall is and rotates accordingly.
There are no random numbers in the GetCollideDistance commands.
With the For-statement the pawn checks 18 different angles, and compares the distance to the walls in those directions:
First it checks the angle 0*0.3490658504 = 0 (in radians) and sets it to be the 'nearest wall', because it hasn't checked the other angles yet.
Then it checks angle 1*0.3490658504 = 0.3490658504 and checks if the wall that is in this direction is closer than the previous one. If so, it sets this direction to have the 'nearest wall'.
Then it checks the angle 2*0.3490658504... 3*0.3490658504 and so on. Every time checking if the wall is nearer in the new direction than it was before.
I hope it makes sense... I can't really explain this. It's all clear in my head, but I simply can't get it out of there.
For example, sometimes when the enemies lose sight of the player, they don't try to go after him but instead, stay where they are and start to 'camp'. They just stay there and watch the surroundings. The function is mainly used in the camping part to prevent the enemies from looking at a wall that's just in front of them. I tried to make them even a bit aware of their surroundings.
It is also used when the enemy hasn't spotted the player yet. He walks around randomly, and the function prevents the him from walking straight into walls or getting stuck. If he collides with a wall, he just checks where the nearest wall is and rotates accordingly.
There are no random numbers in the GetCollideDistance commands.
With the For-statement the pawn checks 18 different angles, and compares the distance to the walls in those directions:
First it checks the angle 0*0.3490658504 = 0 (in radians) and sets it to be the 'nearest wall', because it hasn't checked the other angles yet.
Then it checks angle 1*0.3490658504 = 0.3490658504 and checks if the wall that is in this direction is closer than the previous one. If so, it sets this direction to have the 'nearest wall'.
Then it checks the angle 2*0.3490658504... 3*0.3490658504 and so on. Every time checking if the wall is nearer in the new direction than it was before.
I hope it makes sense... I can't really explain this. It's all clear in my head, but I simply can't get it out of there.
Pain is only psychological.
ah thanks
I was looking at your "Idle" code and the "getfurthestwall()" within the if (rotatetimer < self.time) statement.
I saw tmp used here and noted it was used in getfurthestwall() function, but my bad... I missed your for statment in getfurthestwall().
Thanks for clearing that up.
When I use angles and radians I just multiply the angle by 0.0174532925199433 to get radians I need or radians / 0.0174532925199433 = degrees.
I'll check your script again tonight for a closer look.
I was looking at your "Idle" code and the "getfurthestwall()" within the if (rotatetimer < self.time) statement.
I saw tmp used here and noted it was used in getfurthestwall() function, but my bad... I missed your for statment in getfurthestwall().
Thanks for clearing that up.
When I use angles and radians I just multiply the angle by 0.0174532925199433 to get radians I need or radians / 0.0174532925199433 = degrees.
I'll check your script again tonight for a closer look.
I created a project in the GameFlood Workshop.
http://www.gameflood.com/Workshop/Index ... jectID/387
I'll probably announce all the minor updates and my progress there, and save this thread for questions and major updates. That way this thread doesn't become a 50-page monologue. There isn't much content in GameFlood yet, mainly the 'thumbnail' and 'header' pictures, but I'll add more as I go.
Modeled a new gun, BTW. It's an AK-like assault rifle that is used by the finnish army. It's called RK-62. I'll post some pics when it is fully finished.
http://www.gameflood.com/Workshop/Index ... jectID/387
I'll probably announce all the minor updates and my progress there, and save this thread for questions and major updates. That way this thread doesn't become a 50-page monologue. There isn't much content in GameFlood yet, mainly the 'thumbnail' and 'header' pictures, but I'll add more as I go.
Modeled a new gun, BTW. It's an AK-like assault rifle that is used by the finnish army. It's called RK-62. I'll post some pics when it is fully finished.
Pain is only psychological.
- darksmaster923
- Posts: 1857
- Joined: Wed Jan 03, 2007 10:32 pm
- Location: Huntington Beach, California, USA
- QuestOfDreams
- Site Admin
- Posts: 1520
- Joined: Sun Jul 03, 2005 11:12 pm
- Location: Austria
- Contact:
Added demo at http://www.realityfactory.filefront.com/
Great, thanks!QuestOfDreams wrote:Added demo at http://www.realityfactory.filefront.com/
Finally! My school is over!! Now the only thing I gotta do is wait for the results of my graduation exams! So, it's time to focus on the full version of Nirhis!! I'm planning to have it finished by the end of this year, but as we all know, deadlines tend not to hold. So don't get your hopes up.
Pain is only psychological.
Good to hear m8. I'm sure youll do wel in you exams,
Oh and I cant wait for NIRHIS to be done! I was playing it again today (I play it more than most of my bought games LOL) and I found an aWsome glitch! When you shoot (works best with the twin 9mm's) and you just jumped you dont go down! So you kinda hover and still move, like in devil may cry! I think its summink todo with your frame rate problem, but its aWsome! I managed to jump off of the top box in the courtyard where you first meet the red dudes and fly guns blazing all the way to the balcony thing! I was sooo amazed! I loved it! This game would be sooo sick in multiplayer
well I just thought id post it here so ppl can try it if they want, also I dont think you should fix the jump bug, unless its a problem with the level desighning, cause i mean look at rocket jumping, that was a mistake! Now look how its become a FPS staple!
Oh and I cant wait for NIRHIS to be done! I was playing it again today (I play it more than most of my bought games LOL) and I found an aWsome glitch! When you shoot (works best with the twin 9mm's) and you just jumped you dont go down! So you kinda hover and still move, like in devil may cry! I think its summink todo with your frame rate problem, but its aWsome! I managed to jump off of the top box in the courtyard where you first meet the red dudes and fly guns blazing all the way to the balcony thing! I was sooo amazed! I loved it! This game would be sooo sick in multiplayer
well I just thought id post it here so ppl can try it if they want, also I dont think you should fix the jump bug, unless its a problem with the level desighning, cause i mean look at rocket jumping, that was a mistake! Now look how its become a FPS staple!
My Deviant Art - http://black-crusader.deviantart.com