Announcement

Collapse
No announcement yet.

Ongoing C++ Gameplay Example Series: Making a Survival Game

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

    Originally posted by Horus View Post
    Hi there Tom!

    As usual thanks for your contribution mate!

    Just my 50 cents, I've quickly read through parts of the code, and since you like good practices, here's my contribution:
    - You're sending Client messages using FStrings, it makes more sense - in terms of bandwidth, performance - to instead send a uint32, having most of the messages hardcoded on the client. All the client has to do, is open the map of those messages (stored in an XML or w/e), and they get their message. uint32 vs FString... And use that solution for special unpredicted messages, or well, just a combination of both sendClientMessage(uint32 messageID, FString replaceString);
    You are totally right mate. I spotted these bumps in networking when I started profiling recently, but wasn't sending enough yet to warrant priority. IDs are for sure a better way of handling this. If I get this updated in my primary project I'll see if I can update the survival game too with that.

    Thanks!
    Game Developer @ LODZERO - My Twitter | tomlooman.com UE4 samples & tutorials | C++ Survival Game (Open-Source)

    Comment


      I am stuck with something... I do want to make a simple rpg launcher. So the weapon fire a proyectil that, on impact, explode like the bomb. Tried to change the damage_type, but I am unable to do it, any help please? Thanks!

      Comment


        Hello and congratulations for the project. I am a newbie but I'm slowly trying to understand all the tutorial.

        Right now I'm trying to change the respawn time parameters of the players but I can not understand how it works. Could anyone help? Thank you.

        Comment


          Comment


            Tom would you be willing to update the project to the latest release?

            Comment


              Originally posted by GuilhermeB View Post
              Tom would you be willing to update the project to the latest release?
              I've been keeping it up to date with the latest stable releases, currently 4.9. 4.10 is still in preview, I'll likely update it after the first stable release.
              Game Developer @ LODZERO - My Twitter | tomlooman.com UE4 samples & tutorials | C++ Survival Game (Open-Source)

              Comment


                Originally posted by Naitguolf View Post
                I am stuck with something... I do want to make a simple rpg launcher. So the weapon fire a proyectil that, on impact, explode like the bomb. Tried to change the damage_type, but I am unable to do it, any help please? Thanks!
                Changing the damage type is not enough, that's purely to identify the kind of damage was applied, and has nothing to do with actually applying damage to hitpoints or FX.

                ShooterGame has an implementation for projectile based weapons, and the project uses a nearly identical weapon framework. the class is named ShooterWeapon_Projectile I believe. That should be a good starting point.
                Game Developer @ LODZERO - My Twitter | tomlooman.com UE4 samples & tutorials | C++ Survival Game (Open-Source)

                Comment


                  Hya Tom!

                  Just noticed you adapter your project to 4.10, tried compiling it to check the differences:

                  Code:
                  Severity	Code	Description	Project	File	Line
                  Error	C2248	'FActiveSound::AudioComponent': cannot access private member declared in class 'FActiveSound'	SurvivalGame	D:\Unreal Projects\SurvivalGame\Source\SurvivalGame\Private\Editor\SoundNodeLocalPlayer.cpp	13
                  Severity	Code	Description	Project	File	Line
                  Error (active)		member "FActiveSound::AudioComponent" (declared at line 74 of "d:\UnrealEngine-release\UnrealEngine-release\Engine\Source\Runtime\Engine\Public\ActiveSound.h") is inaccessible	SurvivalGame	d:\Unreal Projects\SurvivalGame\Source\SurvivalGame\Private\Editor\SoundNodeLocalPlayer.cpp	13
                  Severity	Code	Description	Project	File	Line
                  Warning	C4996	'USkinnedMeshComponent::bChartDistanceFactor': bChartDistanceFactor is no longer useful, please remove references to it Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.	SurvivalGame	D:\Unreal Projects\SurvivalGame\Source\SurvivalGame\Private\Items\SWeapon.cpp	16
                  Just thought you should know

                  PS- I see you've changed the messages to IDs, nice!
                  [On Hold]WIP: Vertex-Based Ledge Detection/Parkour Engine

                  Looking for fellow programmers to develop a project.

                  Comment


                    Originally posted by Horus View Post
                    Hya Tom!

                    Just noticed you adapter your project to 4.10, tried compiling it to check the differences:

                    Code:
                    Severity	Code	Description	Project	File	Line
                    Error	C2248	'FActiveSound::AudioComponent': cannot access private member declared in class 'FActiveSound'	SurvivalGame	D:\Unreal Projects\SurvivalGame\Source\SurvivalGame\Private\Editor\SoundNodeLocalPlayer.cpp	13
                    Severity	Code	Description	Project	File	Line
                    Error (active)		member "FActiveSound::AudioComponent" (declared at line 74 of "d:\UnrealEngine-release\UnrealEngine-release\Engine\Source\Runtime\Engine\Public\ActiveSound.h") is inaccessible	SurvivalGame	d:\Unreal Projects\SurvivalGame\Source\SurvivalGame\Private\Editor\SoundNodeLocalPlayer.cpp	13
                    Severity	Code	Description	Project	File	Line
                    Warning	C4996	'USkinnedMeshComponent::bChartDistanceFactor': bChartDistanceFactor is no longer useful, please remove references to it Please update your code to the new API before upgrading to the next release, otherwise your project will no longer compile.	SurvivalGame	D:\Unreal Projects\SurvivalGame\Source\SurvivalGame\Private\Items\SWeapon.cpp	16
                    Just thought you should know

                    PS- I see you've changed the messages to IDs, nice!
                    You can fix the error in this way

                    In SoundNodeLocalPlayer.cpp change this

                    Code:
                    AActor* SoundOwner = ActiveSound.AudioComponent.IsValid() ? ActiveSound.AudioComponent->GetOwner() : NULL;
                    with this

                    Code:
                    AActor* SoundOwner = ActiveSound.GetAudioComponent()->IsValidLowLevel() ? ActiveSound.GetAudioComponent()->GetOwner() : NULL;
                    Join the Unreal Engine community on Reddit! | Twitter: @ZioYuri78

                    Comment


                      Originally posted by ZioYuri78 View Post
                      You can fix the error in this way

                      In SoundNodeLocalPlayer.cpp change this

                      Code:
                      AActor* SoundOwner = ActiveSound.AudioComponent.IsValid() ? ActiveSound.AudioComponent->GetOwner() : NULL;
                      with this

                      Code:
                      AActor* SoundOwner = ActiveSound.GetAudioComponent()->IsValidLowLevel() ? ActiveSound.GetAudioComponent()->GetOwner() : NULL;
                      I know lol but thanks anyway

                      The goal is for him to push the fixes onto the repo so other people wont have problems.

                      Btw you M.O.S looks great!
                      [On Hold]WIP: Vertex-Based Ledge Detection/Parkour Engine

                      Looking for fellow programmers to develop a project.

                      Comment


                        To what extent can we use this as a base for our projects?

                        And is there a way to rename the project/files from SurvivalGame to our name?

                        Comment


                          Originally posted by GuilhermeB View Post
                          To what extent can we use this as a base for our projects?

                          And is there a way to rename the project/files from SurvivalGame to our name?
                          It's quite simple, you can use it like ShooterGame and all the other Epic sample content. Meaning you can use it as a starterkit to build your own project on top of.

                          As for renaming, I've seen some tools floating around that will help with renaming, but none were a guarantee that you didn't need to add manual edits for it to compile again.
                          Game Developer @ LODZERO - My Twitter | tomlooman.com UE4 samples & tutorials | C++ Survival Game (Open-Source)

                          Comment


                            Originally posted by Tom Looman View Post
                            It's quite simple, you can use it like ShooterGame and all the other Epic sample content. Meaning you can use it as a starterkit to build your own project on top of.

                            As for renaming, I've seen some tools floating around that will help with renaming, but none were a guarantee that you didn't need to add manual edits for it to compile again.
                            Oh so nice! Do you know the name of the tools - searched for them yet can't seem to find them.

                            Additionally, can you explain two things:
                            - What is the LocalPlayer class about? Doesn't seem to do anything at all.
                            - When the clients on a multiplayer game load another clients, (e.g., I'm player A, and I see player B), which class exactly is loaded on local client A for player B? Is it a normal instance of the default character class?

                            Lastly, I know this is pretty specific, but if the loaded client is just an instance of the default player class, how are we supposed to distinguish between them? Should we check IsLocalPlayer() ?

                            Comment


                              Originally posted by GuilhermeB View Post
                              - What is the LocalPlayer class about? Doesn't seem to do anything at all.
                              LocalPlayer is useful when dealing with multiple users on a single machine (so mostly for game consoles) when using splitscreen or local multiplayer, each player has one LocalPlayer instance that holds some info on name, HUD etc. Generally you don't do a whole lot with this class, but it will exist even for your single player game.

                              Originally posted by GuilhermeB View Post
                              - When the clients on a multiplayer game load another clients, (e.g., I'm player A, and I see player B), which class exactly is loaded on local client A for player B? Is it a normal instance of the default character class?
                              When you see another player, you see his Character (eg. Pawn)

                              Originally posted by GuilhermeB View Post
                              Lastly, I know this is pretty specific, but if the loaded client is just an instance of the default player class, how are we supposed to distinguish between them? Should we check IsLocalPlayer() ?
                              that is indeed how you usually check, IsLocallyControlled() etc.
                              Game Developer @ LODZERO - My Twitter | tomlooman.com UE4 samples & tutorials | C++ Survival Game (Open-Source)

                              Comment


                                Originally posted by Horus View Post

                                I know lol but thanks anyway

                                The goal is for him to push the fixes onto the repo so other people wont have problems.


                                Originally posted by Horus View Post

                                Btw you M.O.S looks great!
                                Thank but is not so great, has a lot of limitations but i'm happy people is liking it
                                Join the Unreal Engine community on Reddit! | Twitter: @ZioYuri78

                                Comment

                                Working...
                                X