Star Wars: BattleCry

Development forum for Star Wars: BattleCry
 
HomeHome  CalendarCalendar  FAQFAQ  SearchSearch  MemberlistMemberlist  UsergroupsUsergroups  RegisterRegister  Log in  

Share | 
 

 Abilities/Powers/Items/Tools

Go down 
AuthorMessage
Schlechtwetterfront

avatar

Posts : 446
Join date : 2012-11-05

PostSubject: Abilities/Powers/Items/Tools   Fri Nov 23, 2012 12:57 am

AUSTIN POWERS

As I'm looking into coding the med/ammo pack etc I'd like to know how we want to have them.

Secondary Item: not selectable like a weapon but like a grenade -> you press a button and throw the pack/toggle between grenade and pack. More like SWBF.
Primary Item: Selectable like a weapon, fire will throw the pack. More like Battlefield.

The Primary Item option will require additional animations (I think).

Next question: ammo?
Should the trooper have an infinite amount of packs but have a long cooldown inbetween 'throws' or just a limited amount of packs?
Should the health pack ammo be replenished by the ammo pack? Or just by Mr Gonk?

EDIT: Stuff I have to remember for some of this:
Correct reflection of a vector:
Vec3 normal;
Vec3 hit_dir;
Vec3 cross_n_hit = cross(normal, hit_dir);
Vec3 reflection_vector = cross(hit_dir, cross_n_hit);


Last edited by Schlechtwetterfront on Thu Mar 21, 2013 6:17 am; edited 1 time in total
Back to top Go down
View user profile https://sites.google.com/site/andescp/
sceluk
void Work();


Posts : 364
Join date : 2012-11-07

PostSubject: Re: Abilities/Powers/Items/Tools   Sat Nov 24, 2012 10:16 am

Best way to this IMO would be a framework so you can easily switch between infinite ammo, selectable, etc.
Use some variable to indicate max ammo or somesuch, have an if =-1 then infinite, etc. you know thw works.
Since its gonna change a lot during gameplay testing.
Specific implementation details (ammo counts, exact dmg, refill modes, etc), are for last.
You're coding this in LUA?
My idea was to have a base class in C++ named powers. children of it would be ranged, grenade like powers (which spawn objects), etc.
Finally variations of those (such as two different but basically the same grenade powers), could be done in LUA.
btw, I think this should be in coding Wink
Back to top Go down
View user profile
Schlechtwetterfront

avatar

Posts : 446
Join date : 2012-11-05

PostSubject: Re: Abilities/Powers/Items/Tools   Sat Nov 24, 2012 10:52 am

Good idea. I thought of a cpp class as base inheriting from CItem or CWeapon, too. Then in the xml we can specify the lua script. I posted it here because I thought of how we wanted them game play wise. If you onlyhave a limited number of packs you are gonna think twice about throwing it > less teamwork maybe? Etc etc.
Back to top Go down
View user profile https://sites.google.com/site/andescp/
sceluk
void Work();


Posts : 364
Join date : 2012-11-07

PostSubject: Re: Abilities/Powers/Items/Tools   Sat Nov 24, 2012 8:38 pm

Yeah, as I said, leave the gameplay for last dude Wink
We had a game once where each week this bloody ability kept changing implementation.
Must have driven the programmers crazy (and us, we had to re test each time...).
Gameplay wise I was thinking either packs or a mini droid. Mini droid with active on map limit. packs with ammo.
But using this as an example:
Have a function that spawns an entity (droid\pickup\whatever). Then have vars for ammo, cooldowns, maxActiveOnMap, entityToSpawn.
That way we can easily change what to spawn, then the entity spawned takes care of the rest.
OOP FTW.
Rough idea of base class should at least contain: cooldown, ammo, name.
then ranged powers could have maxRange as well.
AOE's and area
and possibly stuff like cost, cost type (hp, shields, energy), target type, yadda, yadda.
stuff like cost type and stuff can all be changed frm LUA. same for entity spawned in fact.
All the function in C++ has to do is take care of the general logic.
Hope you understood me, when I talk about programming implementation I tend to ramble, ideas come up suddenly
I will make a doc about this. Actually we need to lay out a class overview or something for everything that needs to be coded.
I'm going to ask rocknroll to move this, k?
Back to top Go down
View user profile
Schlechtwetterfront

avatar

Posts : 446
Join date : 2012-11-05

PostSubject: Re: Abilities/Powers/Items/Tools   Sat Nov 24, 2012 9:04 pm

Yeah, okay.
Ill look at some cryengine stuff like the C4 ETC and try to come up with a basic 'layout' of a base deployer class. That would act as weapon > the player uses it and the in the xml or lua specified entity (like health pack) gets spawned.
Then we need a base for the deployed item, a projectile might be the best for that.
Ill post it up then we can discuss it. Smile
Back to top Go down
View user profile https://sites.google.com/site/andescp/
sceluk
void Work();


Posts : 364
Join date : 2012-11-07

PostSubject: Re: Abilities/Powers/Items/Tools   Sat Nov 24, 2012 11:05 pm

I think you can spawn entities directly.
AFAIK, entity is the top parent class of projectiles, vehicles, pickups, so then you can spawn whatver you want.
Back to top Go down
View user profile
Schlechtwetterfront

avatar

Posts : 446
Join date : 2012-11-05

PostSubject: Re: Abilities/Powers/Items/Tools   Tue Nov 27, 2012 9:00 am

Played around a bit with a new weapon to deploy packs like health:

Deployer.h
Spoiler:
 

Deployer.cpp
Spoiler:
 

I added two new parameters to the .xml for those 'deployers' (as you can see in the code it's really easy). One for the 'ammo switch' and one for the timer between throws.
If the ammo switch is set to 0 you have infinite ammo but you always have to wait for the amount of 'reptimer' (replenish timer) until you can throw a pack again. If the pack you threw before still exists it will be destroyed so only one pack per player is existing at the same time. If ammo switch is 1 I don't do anything special. I didn't test it yet but it should just work like any other weapon (except you can't reload, which might be a problem). If ammo switch is 0 then the pack behaves like in Battlefield (3).

This is just a prototype base so feel free to suggest all sorts of stuff.

And BTW, which type of repository should we use? I think that will work better for the (C++) code than dropbox. Then we can do branches/forks and all dat pro shit. Very Happy
Back to top Go down
View user profile https://sites.google.com/site/andescp/
Schlechtwetterfront

avatar

Posts : 446
Join date : 2012-11-05

PostSubject: Re: Abilities/Powers/Items/Tools   Tue Mar 12, 2013 7:35 am

Just wanted to dump some videos of stuff. Here seems to be the best place.
Deflective Bolts: https://www.youtube.com/watch?v=F1_w7Ti7W64
Weapon which can place entities: https://www.youtube.com/watch?v=JDJYSuGa4IQ
At the same time it's a prototype of how I imagine a Bacta thing could work.
While holding it in your hands (having the weapon equipped) you heal allies in a radius around you. When you shoot, you place a Bacta Station (in this case a GONK) which heals faster but can be destroyed and is static.
Back to top Go down
View user profile https://sites.google.com/site/andescp/
sceluk
void Work();


Posts : 364
Join date : 2012-11-07

PostSubject: Re: Abilities/Powers/Items/Tools   Tue Mar 12, 2013 7:43 am

Nice work.
I guess its possible to place a turret you can control then.
I was more thinking of the heal just dropping a pickable health pack.
I like the 'medi gun' though. Maybe only target?
Back to top Go down
View user profile
Schlechtwetterfront

avatar

Posts : 446
Join date : 2012-11-05

PostSubject: Re: Abilities/Powers/Items/Tools   Tue Mar 12, 2013 7:59 am

Thanks.
This is just a sort of 'programming concept' to see how stuff works so we can base the code for the actual tools/items on that later. It's not that clean and too much is still hard-coded to be really useful.
I'm trying to get the basics to many of the items/abilites/tools which were posted in the Class System thread coded to see how far we can go (if I stumble across any engine limitations) etc.
So when we have decided on all those things we have some sort of 'library' of functionality.
Back to top Go down
View user profile https://sites.google.com/site/andescp/
sceluk
void Work();


Posts : 364
Join date : 2012-11-07

PostSubject: Re: Abilities/Powers/Items/Tools   Fri Mar 15, 2013 10:23 am

Hmm, yes, excellent idea dude. Smile I wish I could help. (damn thesis).
It will be great for quickly prototyping abilities to test out class concepts.
Back to top Go down
View user profile
Schlechtwetterfront

avatar

Posts : 446
Join date : 2012-11-05

PostSubject: Re: Abilities/Powers/Items/Tools   Fri Mar 15, 2013 10:35 am

You're missing out on a lot of fun debugging. Razz
Back to top Go down
View user profile https://sites.google.com/site/andescp/
Schlechtwetterfront

avatar

Posts : 446
Join date : 2012-11-05

PostSubject: Re: Abilities/Powers/Items/Tools   Sat Mar 23, 2013 4:06 am

I'll post this here because it's a firemode and could theoretically be used by any type of weapon.
https://www.youtube.com/watch?v=biEPyf9joAk
Obviously looks crappy, the physics are wonky and I have no clue where that trailing part is coming from which is not connected to the vehicle but it's a start.
I wonder how this will perform in multiplayer... From what I read on CryDev ropes and multiplayer don't like each other a lot. Possibly we might have to fake the rope and have no true physics on it.
Back to top Go down
View user profile https://sites.google.com/site/andescp/
sceluk
void Work();


Posts : 364
Join date : 2012-11-07

PostSubject: Re: Abilities/Powers/Items/Tools   Sat Mar 23, 2013 6:29 am

Nice! maybe that trailing thing is from the debug values being shown?
Back to top Go down
View user profile
Schlechtwetterfront

avatar

Posts : 446
Join date : 2012-11-05

PostSubject: Re: Abilities/Powers/Items/Tools   Sat Mar 23, 2013 7:48 am

Nah, it's a second rope. But I may know a way to fix it, theoretically. We'll see.
Back to top Go down
View user profile https://sites.google.com/site/andescp/
sceluk
void Work();


Posts : 364
Join date : 2012-11-07

PostSubject: Re: Abilities/Powers/Items/Tools   Sun Mar 24, 2013 4:13 am

Hmm, yeah, seeing it again, it does look like a second rope. Good luck Smile
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: Abilities/Powers/Items/Tools   

Back to top Go down
 
Abilities/Powers/Items/Tools
Back to top 
Page 1 of 1
 Similar topics
-
» MOC's Custom lego items
» Pre loved scrap items for sale
» AMS ITEMS FOR SALE TO MEMBERS
» PokeTech Tools
» A to Z of Supermarket Items

Permissions in this forum:You cannot reply to topics in this forum
Star Wars: BattleCry :: Development :: Development discussion :: Coding-
Jump to: