Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
1 registered members (TipmyPip), 18,038 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: Ugly Bulletholes [Re: Der_Kekser] #279854
07/19/09 16:16
07/19/09 16:16
Joined: Jun 2008
Posts: 402
Germany
S
sebbi91 Offline
Senior Member
sebbi91  Offline
Senior Member
S

Joined: Jun 2008
Posts: 402
Germany
gibt es vieleicht einen anderen Weg wie er decal simullieren kann?
mir würde blos noch das "uralt prinzip" einfallen(was er ja schon teilweise benutzt)!
Trace strahl-->schauen was er trifft-->vec_to angle


3D-Gamestudio A8 - Commercial
Re: Ugly Bulletholes [Re: Der_Kekser] #279855
07/19/09 16:16
07/19/09 16:16
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline OP
Expert
Rei_Ayanami  Offline OP
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
@VeT: Thanks! But when I use smaller bullet hole bmaps it will do the same job wink
@kekser: Egal, kann passieren smile !

Re: Ugly Bulletholes [Re: Rei_Ayanami] #279856
07/19/09 16:17
07/19/09 16:17
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline OP
Expert
Rei_Ayanami  Offline OP
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Also wenn du mir das erklärst mit decal, denn ich mach das für sPIKe und der hat Com, würde das auch helfen smile

Re: Ugly Bulletholes [Re: Rei_Ayanami] #279970
07/20/09 09:23
07/20/09 09:23
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline
Serious User
Scorpion  Offline
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
@vet der erste trace liefert die zielkoordinaten zurück, damit man dorthin tracen kann.

@Rei_Ayanami ich pack den code mal kurz in einen testlevel und such den typo^^ - vom prinzip her sollte es aber klappen. wenn du willst kann ich es auch noch ein wenig genauer erläutern.

Dann aber noch eine Frage: woher hast du den Level, wenn du nur lite-c hast? soweit ich weiß gibts wed doch nur mit gamestudio? naja, ich versuch mal das mit der alten decal methode.

edit: okay, ich hab ein kleines projekt gemacht, das sowohl mit decals als auch mit normalen sprites funktioniert (über einfaches #define umstellbar) hier ist der download link

Last edited by Scorpion; 07/20/09 10:37.
Re: Ugly Bulletholes [Re: Scorpion] #279979
07/20/09 10:38
07/20/09 10:38
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline

Serious User
VeT  Offline

Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
//@VeT: Thanks! But when I use smaller bullet hole bmaps it will do the same job

Hmm... why do you think so? Crosshair would be placed on the position, where bullet will hit obstacle, i dont think that it depends on the size of bmaps.

//@vet der erste trace liefert die zielkoordinaten zurück, damit man dorthin tracen kann.

I dont understand smile


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: Ugly Bulletholes [Re: VeT] #279983
07/20/09 11:06
07/20/09 11:06
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline
Serious User
Scorpion  Offline
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
oh sorry..here are still not-german people around^^

The first trace is to get the coordinates you are targeting. The second trace is for the real shooting



Re: Ugly Bulletholes [Re: Scorpion] #280012
07/20/09 13:53
07/20/09 13:53
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline

Serious User
VeT  Offline

Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
Quote:

As a variant, you can try to trace from gun to your target coordinates in 3d, then find place, where your bullet will collide with obstacle and then place crosshair picture there.


I was told about another variant smile

[clickeable]


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: Ugly Bulletholes [Re: VeT] #280017
07/20/09 14:25
07/20/09 14:25
Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Rei_Ayanami Offline OP
Expert
Rei_Ayanami  Offline OP
Expert

Joined: Feb 2009
Posts: 3,207
Germany, Magdeburg
Thank you all soooo much smile!
@Scorpion Cool demo, but could you explain because I have never worked with this ifdef and things like that smile.

BTW: Cool pics you made :p!

Last edited by Rei_Ayanami; 07/20/09 14:27.
Re: Ugly Bulletholes [Re: Rei_Ayanami] #280024
07/20/09 14:50
07/20/09 14:50
Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
VeT Offline

Serious User
VeT  Offline

Serious User

Joined: Aug 2004
Posts: 1,345
Kyiv, Ukraine
I'm a progmammer, not 2d artist :P )))


1st prize: Lite-C and Newton 2.17 by Vasilenko Vitaliy

Newton2 videos: http://tinyurl.com/NewtonVideos
LiteC+Newton2 discussion: http://tinyurl.com/NewtonWrapperDiscussion
Latest LiteC+Newton2 version(v23, from 29.10.2009): http://depositfiles.com/files/ae1l0tpro
Re: Ugly Bulletholes [Re: VeT] #280092
07/20/09 23:02
07/20/09 23:02
Joined: Jan 2007
Posts: 1,619
Germany
Scorpion Offline
Serious User
Scorpion  Offline
Serious User

Joined: Jan 2007
Posts: 1,619
Germany
@vet as far as i understood it, the player should shoot to the position of the crosshair (which is the mousecursor). you do a trace to a position somewhere behind that cursor and if it hits a wall it's not the same (in screenspace) position as the bullet hole = you would target another position than the one you're aiming with the cursor. that was the way how he did it before af far as i understood it.


okayy..., maybe it was a bit confusing to put the define in there^^

the hole stuff with defines works like this:
before the compiler does any code checking or validation, it first looks for the statement which start with #. #include, #define, #ifdef, etc.

i guess you know what #include does. it just puts the content of the file you name to the position in the code.

then there is another group: the defines and some handy controls for them
the #define statement - guess it - defines the name that comes after it. pretty similar to defining a variable (you can also put something behind the name and it gets replaced everytime it appears in the sourcecode, just look it up in the manual if you want to know more about it)

the other ones are similar to a normal if-else instruction.

Code:
#ifdef NAME - did the name got defined with #define before?
   CODECODECODE
#else - guess it
   OTHERCODECODECODE
#endif - like a closing bracket



so you can choose which lines of code get compiled and which do not. in my example you can comment the define of USE_DECALS out to not use decals. then the other function, other variables and another function call get compiled. the running program has no idea about the other lines of code, which were not chosen.


okay, the explanation got a bit longer, but i hope you got the idea.. and remember: the manual is your friend. it's a pretty good manual imo and you can nearly always get the answer, even when it's a little bit hidden sometimes.
If you've got another question about it just ask it and i try to answer..maybe a little bit shorter^^°

Page 2 of 3 1 2 3

Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1