Juutis' game thread!!! (Nirhis)

Game Design, Story, Game Play.
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

Ummm... template? What do you mean exactly?

If you mean the script, they all can be found in the 'scripts' folder. Enemy scripts are right there and player scripts are in 'scripts/player'.
Pain is only psychological.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

basic working weapon script
Herp derp.
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

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...
Pain is only psychological.
shadow
Posts: 81
Joined: Mon Jul 25, 2005 5:37 am

Post by shadow »

Hi Juutis

I was taking a look at your script "enemy_pistol.s" and I'm looking at your getnearestwall() function.
What is the purpose of this, or more specifically why do you have random variables x and z in your GetCollideDistance?

Thanks
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

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. :D
Pain is only psychological.
shadow
Posts: 81
Joined: Mon Jul 25, 2005 5:37 am

Post by shadow »

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.
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

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.
Pain is only psychological.
User avatar
darksmaster923
Posts: 1857
Joined: Wed Jan 03, 2007 10:32 pm
Location: Huntington Beach, California, USA

Post by darksmaster923 »

can i use nirhis's textures?
Herp derp.
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

Sure, go ahead. You can take anything: textures, models, sounds, even the HUD :)... as long as you keep me informed. Just PM, email or post here which ones you are going to use.
Pain is only psychological.
User avatar
zany_001
Posts: 1047
Joined: Fri Mar 02, 2007 8:36 am
Location: Aotearoa

Post by zany_001 »

How do you open the doors? :oops:
Once I was sad, and I stopped being sad and was awesome instead.
True story.
User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

You can't open them. If a door is closed then you can't go there. :)
Pain is only psychological.
User avatar
zany_001
Posts: 1047
Joined: Fri Mar 02, 2007 8:36 am
Location: Aotearoa

Post by zany_001 »

Ok cheers
Once I was sad, and I stopped being sad and was awesome instead.
True story.
User avatar
QuestOfDreams
Site Admin
Posts: 1520
Joined: Sun Jul 03, 2005 11:12 pm
Location: Austria
Contact:

Post by QuestOfDreams »

User avatar
Juutis
Posts: 1511
Joined: Thu Jan 12, 2006 12:46 pm
Location: Finland

Post by Juutis »

QuestOfDreams wrote:Added demo at http://www.realityfactory.filefront.com/
Great, thanks!


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.
User avatar
psYco
Posts: 782
Joined: Wed Mar 15, 2006 10:55 am
Location: England

Post by psYco »

Good to hear m8. I'm sure youll do wel in you exams, :D

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! :D
Post Reply