Announcement

Collapse
No announcement yet.

2d sprites replacing models help

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #16
    Originally posted by bfg666 View Post
    You've made Quake maps? Released any?
    All unreleased! Lot's of lost half-life maps for lan parties full of jokes and dirty pictures of my friends, it was a long time ago. Some quake 3 test maps I did for an abandonned instarocket psychedelic mod. A bunch of dirty jedi knight duel maps and some for "acid arena monster blast", a friend's project. I mostly did crazy work for our annual 5 days lan parties we've been doing the last 15 years in switzerland.

    Comment


    • #17
      Originally posted by Seven View Post
      I only had to adjust its origin coordinate a little bit forward that you can actually see it in-game (as you know view weapon have a specific offset that they appear wher they appear in-game).
      I think this is were i'm stuck. I tried to change the X/Y coordinates in FIMG but it don't seems to work. Should I add another property like "Origin Z" through frame properties advanced tab?

      Thanks!
      Last edited by ayyynn; 09-25-2016, 02:58 PM.

      Comment


      • #18
        Originally posted by ayyynn View Post
        First time I hear about this game. Acid sounds like a fitting adjective. Looks trippy!
        ♪ I'm skiiiiiiinnin' in the pain, just skiiiiiiinnin' in the pain ♪
        ♪ What a glorious feelin' I'm haaaaaaappy again ♪

        Comment


        • #19
          Some news. I still couldn't make it work with just replacing the .mdl file with a sprite. But I have stolen the quake wolf 3d port v_weapon .mdl file and attached a png file to it. It's working pretty good and as i'm using a 3d file of a square plane, i get some lighting effect on the weapon.


          (shotgun from doom2016)

          Now i'll need to study how to animate all of this!

          In the wolf3d port code source, I understand that there is 1 v_weapon.mdl (+v_weapon.mdl_x.tga) file per animation frame. (like v_auto_0.mdl ; v_auto_1.mdl ; v_auto_2.mdl ; etc.. ). I don't know if it's the good way to go, it seems strange to me to load a new 3d model each frame!

          maybe this is a bit of the code related to animation :
          Code:
          /*
          ============
          W_Attack
          
          An attack impulse can be triggered now
          ============
          */
          void()	player_knife1;
          void()	player_pistol1;
          void()	player_auto1;
          void()	player_chain1;
          
          void() W_Attack =
          {
          	local	float	r;
          
          	if (!W_CheckNoAmmo ())
          		return;
          
          	makevectors	(self.v_angle);			// calculate forward angle for velocity
          	self.oframe = -1;
          
          	if (self.weapon == IT_KNIFE)
          	{
          		if (self.button0held)
          			return;
          
          		self.button0held = 1;
          
          		sound (self, CHAN_WEAPON, "lsfx/023.wav", 1, ATTN_NORM);
          		player_knife1 ();
          		self.attack_finished = time + 0.3428;
          	}
          	else if (self.weapon == IT_PISTOL)
          	{
          		if (self.button0held)
          			return;
          
          		self.button0held = 1;
          
          		self.show_hostile = time + 1;	// wake monsters up
          		player_pistol1 ();
          		self.attack_finished = time + 0.3428;
          	}
          	else if (self.weapon == IT_MACHINEGUN)
          	{
          		self.show_hostile = time + 1;	// wake monsters up
          		self.attack_finished = time + 0.1714;
          		player_auto1 ();
          	}
          	else if (self.weapon == IT_CHAINGUN)
          	{
          		self.show_hostile = time + 1;	// wake monsters up
          		self.attack_finished = time + 0.1714;
          		player_chain1 ();
          	}
          };
          
          /*
          ============
          W_WeaponFrame
          
          Called every frame so impulse events can be handled as well as possible
          ============
          */
          void() W_WeaponFrame =
          {
          	if (time < self.attack_finished)
          		return;
          
          	ImpulseCommands ();
          	
          // check for attack
          	if (self.button0)
          		W_Attack ();
          	else
          		self.button0held = 0;
          };
          Last edited by ayyynn; 09-26-2016, 08:05 AM.

          Comment


          • #20
            Originally posted by ayyynn View Post
            I think this is were i'm stuck. I tried to change the X/Y coordinates in FIMG but it don't seems to work. Should I add another property like "Origin Z" through frame properties advanced tab?

            Thanks!
            Hello ayyynn,

            a sprite is flat. It is just a 2D picture. If you want to move a sprite in a world you have to change its origin. So, moving it forward for view weapons can only be done via qc.

            I have good news for you:
            I have the source code for the RetroBlazer TC and you can now study how its author did the weapon sprites.



            Originally posted by ayyynn View Post
            Some news. I still couldn't make it work with just replacing the .mdl file with a sprite. But I have stolen the quake wolf 3d port v_weapon .mdl file and attached a png file to it. It's working pretty good and as i'm using a 3d file of a square plane, i get some lighting effect on the weapon.
            So did you scrap your idea of using sprites as weapons already ? And want to use standard .mdl now ?
            That would be a pity, now that you are so close....




            Originally posted by ayyynn View Post
            Now i'll need to study how to animate all of this!

            In the wolf3d port code source, I understand that there is 1 v_weapon.mdl (+v_weapon.mdl_x.tga) file per animation frame. (like v_auto_0.mdl ; v_auto_1.mdl ; v_auto_2.mdl ; etc.. ). I don't know if it's the good way to go, it seems strange to me to load a new 3d model each frame!
            Well, if you want to stay with regular .mdl weapons, the original source code of Quake tells you everything you need to know. As well as every mod that uses custom weapons if you need more examples.
            You will want to use model frames instead of multiple models for its animation, yes.


            Originally posted by ayyynn View Post
            maybe this is a bit of the code related to animation :
            No, the code you pasted only decides what to do when you push the "shoot" button.
            It checks which weapon you are equipped with and start the corresponding actions.
            Follow the code further and you will find the animation part.
            But as mentioned, the original 1.06 Quake source is almost identical and is good for learning, as you know weapon behaviour in-game and can therefore quickly learn what each function does.



            You inspired me with your sprite weapons idea and I converted the RetroBlazer shotgun and Blood�s pitchfork into regular Quake

            It works quite good. Here is a short clip in action
            (do not complain about Blood�s pitchfork texture, it is only 8-bit)
            [ame]http://www.youtube.com/watch?v=QSTGg9_xI3M[/ame]

            Happy coding,
            Seven

            Comment


            • #21
              Originally posted by Seven View Post
              Hello ayyynn,
              a sprite is flat. It is just a 2D picture. If you want to move a sprite in a world you have to change its origin. So, moving it forward for view weapons can only be done via qc.
              OK! I Misread and was thinking it must be in the sprite properties!
              I found your "Adjustable view_weapon positions and idle animations for Quake" mod when i was lost through your amazing list of work at quaketastic!

              It's working now, but needs some adjustments!



              Originally posted by Seven View Post
              I have good news for you:
              I have the source code for the RetroBlazer TC and you can now study how its author did the weapon sprites.


              Can't wait to dig in that code! Are you in relation with the Retroblazer team? Any news about their project?


              Originally posted by Seven View Post
              So did you scrap your idea of using sprites as weapons already ? And want to use standard .mdl now ?
              That would be a pity, now that you are so close....

              Well, if you want to stay with regular .mdl weapons, the original source code of Quake tells you everything you need to know. As well as every mod that uses custom weapons if you need more examples.
              You will want to use model frames instead of multiple models for its animation, yes.
              Your reply was like giving me a boost to stay with thoses lovely sprites!



              Originally posted by Seven View Post
              You inspired me with your sprite weapons idea and I converted the RetroBlazer shotgun and Blood�s pitchfork into regular Quake

              It works quite good. Here is a short clip in action
              (do not complain about Blood�s pitchfork texture, it is only 8-bit)
              http://www.youtube.com/watch?v=QSTGg9_xI3M
              Amazing, i'm �ber-excited
              Last edited by ayyynn; 09-27-2016, 08:59 AM.

              Comment


              • #22
                Mmh it's working good with the digitized sprite style, and a local friend video artist got some tools to make it right! I'll maybe go this way!

                Sprite done with phone camera - 5 frames - quick chopping.

                [ame]http://www.youtube.com/watch?v=_6rYmPamNJM[/ame]

                Comment


                • #23
                  [ Slightly off topic question ]

                  As I was thinking about drawing sprites for monsters and ennemies, I discovered "Spine" a while ago. It's a 2D skeletal animation tool. With it you can "easely" animate a character out of a well organised 2d drawing.

                  One of it's features is the integration in game engines so you do not necessarily have to render each frame and then build a sprite animation.

                  showreel
                  [ame]http://www.youtube.com/watch?v=VreetwYUqog[/ame]

                  about libraries and integration in game engines : Spine: Runtimes
                  I don't know if it's really necessery but for curiosity purposes, could it be possible to include such runtime into darkplaces?

                  Comment


                  • #24
                    Im surprised QDoom hasn't been mentioned. Although it isn't in the Quake engine, but it is Quake on the Doom engine (well EDGE, that is).

                    I'm interested to see how this goes. I have never heard of 2D ingame sprites for a 3D engine like the Quake engine, until now.

                    Comment


                    • #25
                      Originally posted by Voros View Post
                      Im surprised QDoom hasn't been mentioned. Although it isn't in the Quake engine, but it is Quake on the Doom engine (well EDGE, that is).
                      Hehe in the exact opposite, have you heard of "total chaos" TC for doom [email protected]? It looks amazing...

                      https://www.youtube.com/watch?v=4fRDytfM9yY

                      Comment


                      • #26
                        Originally posted by ayyynn View Post
                        Hehe in the exact opposite, have you heard of "total chaos" TC for doom [email protected]? It looks amazing...

                        https://www.youtube.com/watch?v=4fRDytfM9yY
                        really impressive use of the engine!!
                        awesome work , aniway i wanna see guns beating these monsters seems inspired in dying light combats and camera
                        the invasion has begun! hide your children, grab the guns, and pack sandwiches.

                        syluxman2803

                        Comment


                        • #27
                          Originally posted by ayyynn View Post
                          I found your "Adjustable view_weapon positions and idle animations for Quake" mod when i was lost through your amazing list of work at quaketastic!
                          Aye, that is one of the most important mods I ever did.
                          A lot of people complain about misaligned/positioned Quake view weapon models when changing FOV and/or screen resolution. With this mod you can position & tilt them wherever you want. You can also have any weapon right handed like in Quake 3 if you prefer.

                          I never thought that it might come in handy for bringing sprite weapons into Quake. LOL



                          Originally posted by ayyynn View Post

                          Can't wait to dig in that code! Are you in relation with the Retroblazer team? Any news about their project?
                          No, I am not in relation with Retroblazer team. My skills are much too worse for any serious project. You can use FrikaC�s decompiler for example to get the source code from Retroblazer�s progs.dat. That is evil reverse engineering but the only way to get the source of closed-sourced mods...



                          Originally posted by ayyynn View Post
                          Your reply was like giving me a boost to stay with thoses lovely sprites!
                          That is why we are here for (at least)



                          ===================================



                          I think my work here is done. You are experienced enough to continue from here.
                          Maybe one more thing:
                          You surely have noticed that sprites are always FULLBRIGHT in the game Quake. You say you are using Darkplaces, so you can make (and should !) make use of its extension: DP_LITSPRITES
                          So that lighting on sprites is enabled !
                          The only thing you need to do is to add: ! in front of the sprites name. So:
                          !v_shot.mdl instead of v_shot.mdl
                          But you need to add the ! inside of the qc as well.

                          The result will be correct weapon lighting behaviour like with regular models.
                          Here is a quick comparism of this feature disabled (beginning of clip) and enabled (end of clip):
                          [ame]http://www.youtube.com/watch?v=eY6sWkNrrbE[/ame]


                          One last word:
                          What I like the most about sprites compared to models is that they are much much more detailed and animations are by far superior looking. You can simply add so much more effects via the texture itself compared to models & particles, that sprites are much nicer in this regards.
                          The downside is of course when you want to use world sprites (not HUD sprites) that you have to use a more complex code for their fake "angles" and you will always only see 4 "sides" of a world sprite... So I prefer models for the world.
                          But you now have the Retroblazer code and it tells you exactly how to handle world sprites like monsters !


                          Here is an amazing fantasy-weapon sprite I just found (a little bit like the mage in Hexen):


                          ... Seven goes back to sprite animation now ...

                          Best of luck with your ambitious project !

                          Kind regards,
                          Seven
                          Last edited by Seven; 09-27-2016, 11:26 AM.

                          Comment


                          • #28
                            Originally posted by ayyynn View Post
                            Hehe in the exact opposite, have you heard of "total chaos" TC for doom [email protected]? It looks amazing...

                            https://www.youtube.com/watch?v=4fRDytfM9yY
                            Wow.
                            Starter Pack's Hell on Earth
                            Halodoom
                            WolfenDoom: Blade of Agony
                            Now this. It's amazing what modders can make.

                            Comment


                            • #29
                              I have the source code for the RetroBlazer TC
                              May I get that from you? I'm having difficulty finding it elsewhere.
                              www.youtube.com/user/KillPixel

                              Comment


                              • #30
                                Originally posted by KillPixel View Post
                                May I get that from you? I'm having difficulty finding it elsewhere.
                                Hello Killpixel,

                                You will not find it elsewhere, because it was not released to public.
                                That is why I do not post it here.

                                I know you are working on a new sprite game/mod. If you are interested you can look into your pm. But please be nice and do not release it.

                                Best wishes,
                                Seven

                                Comment

                                Working...
                                X