Announcement

Collapse
No announcement yet.

Building an RPG with Unreal Book - Anyone Read?

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

    #16
    Welp, I'm stuck in Chapter 3 like others have said. Keep getting tons of errors with the code. I think they made some typos in the UnrealRPG header, but I'm not sure. I also keep getting a message I already have a class by the name RPGPlayerController but I do not.
    Matthew Slanchik Game Design and Development
    www.Slanchik.com

    Comment


      #17
      I apologize for just seeing this forum now. There are actually 2 editions of the book, the first one is Building an RPG with Unreal, and the second one is Building an RPG with Unreal 4.x.
      The first edition is in fact optimized under version 4.7.6 which is an old version of Unreal by now, and there are a lot of errors in it due to one of our co-authors and editors wrecking the code especially in Chapter 3. If you bought the book off PacktPub's site, they updated your version of the book via pdf for free, if you bought the book elsewhere those companies don't supply a free update.
      The second edition of the book was done in 4.12.5 (new at the time). Much of the content likely still works in later versions of UE4 since most of it is basic, but haven't had the chance to test most of the chapters in later versions of UE4. Upon testing the second edition of the book multiple times before and after its release, the book's contents with the code work, but again if you have the first edition of the book you will run into a lot of problems unfortunately. The challenge as a member of this forum stated, and as I stated to the publisher is Epic updates Unreal frequently and the book could quickly become obsolete, though we were forced by the publisher's hand to stick with this format.

      Either way, if you get stuck I recommend to compare your code to the code files by downloading the code files which are supplied online for free whether you bought a copy of the book or not
      https://www.packtpub.com/code_download/23385 (again, done in 4.12 and comparable to the second edition of the book).

      There was a question raised about what the final product is of the book. The book itself really covers supplying a framework for a turn-based RPG. With a book this small, it was only possible to cover basics (the publisher limited us in the amount of pages we could use so we had to cut out a lot of content), so there is general framework of a turn-based combat system, player/enemy stats, inventory/equipment system, and a shop. But the hope is that this basic framework will allow readers to expand upon it and add their own content to make a game out of it.

      Comment


        #18
        Thanks @Rrule

        Comment


          #19
          Apologies to thestevex, but I was ulitmately pretty disappointed with the book, which appears to be the later version.

          I got the book on the Humble Bundle sale. I was pleased at first, because Data Tables were new to me. I've now spent 3 or 4 days reading and coding, and have this to say: What code that hasn't been directly lifted from the Third Person C++ template looks like it was created for a text based rpg and mashed into UE4 without regard to how the engine actually works.

          I may be wrong about some of this because the way the book is organized, things that seem to be missing may be supplied later (this makes the book pretty hard to read, too.) Stuff that discourages me from spending more time reading the book:

          - There are no screenshots of the level, the UI or the avatar in the field. Nearly all of the images are of blueprint code. All you would see in combat is a stream of log messages (unless you're playing standalone - then you see nothing, as far as I can tell). No combat animations, no enemy creatures, no party members, no audio, and no onscreen text.

          - The character stats are not added to the "RPGCharacter" class (from the third person character template), but a new class, confusingly named GameCharacter, but inheriting from UObject. This decision makes it seem like it was written by someone unfamiliar with both the engine, and any notion of object oriented programming.

          - There was a lot of "write an incomplete or bad version, then fix it later" that requires repeating several pages of the same code with a few lines inserted in the middle.

          - Example 1: They spent 10-12 pages describing how to a a "gold" value to the the enemy, then give it to the player at the end of combat, something that could have been included in the original versions in maybe 10 lines of code, tops.

          - Example 2: I searched for any place they used the stats of enemies or party members in combat, or even where anyone was actually damaged, and eventually found a hardcoded -10 to HP in TestCombatAction. Later, I found a paragraph 92% into the book that changed that one line to this one:
          target-> HP -= (character-> ATK - target-> DEF) > = 0 ? (character-> ATK - target-> DEF): 0;
          They go on to include the full text of this method for the 4th or possibly 5th time. I would have hoped for the simple version we end up with to be introduced in its complete form at 35% of the way through, and at 92% we'd be getting a single, in depth version that has multiple combat actions using abilities, spells (that cost mana), different weapons, and variations based on strength, armor class, etc.

          - They ignore the UE4 AI classes (AIControllers, Behavior Trees) in favor of hard coding targets (the enemy chooses the first live party member on the list). They bypass navigation and navmeshes because enemies don't actually traverse the level or even have bodies.

          - While it was nice to know how to create your own console command, I haven't actually tested that it works yet. When I do, I'm prepared to google for recent tutorials if their version fails. But really, why not have a better way to trigger combat?

          - They describe Data Tables, which was interesting, and slightly useful. OTOH, I found I needed the Orfeas C++ tutorial to get them working properly in 4.17. The book's code omits necessary includes, and later abandons the idea of creating the tables in a spreadsheet. A quick google tells me that the problems they mention were fixed in UE4 version 4.15, though.

          - They start using blueprint heavily in the latter part of the book - I was attracted to the initial c++ focus, so I was disappointed to see so much blueprint, especially since viewing the tiny images on Kindle is a real chore.

          - There are so many aspects to an RPG that are omitted or glossed over - character creation by the user, images in the UI (of items or the player), maps and minimaps, quests, what is seen in the shopkeeper or player inventory, how these things are acquired (chests in the landscape? how do we select and interact with them?) a toolbar of spells or skills, a graphical hud with visual bars for health and mana, etc.

          That said, I probably did learn a lot by studying the current Third Person Template code, getting the initial code to compile and run, and exploring Data Tables. Worth the dollar I paid, ...maybe.

          Comment


            #20
            Thanks for the feedback on this.
            When explaining what would be covered within the first chapter of this book, it could have been explained better, that the focus of the book is to develop a framework for a classic turn-based RPG (think classic Dragon Quest or Final Fantasy). The idea was to set up the base combat, player, inventory, and shop systems, nothing else. The idea of the scope being such a limitation could have also been added to this description. Starting from the Third Person Template gives the reader a base player and field necessary to start combat and interact with the shop, however, the book does not cover creating your own field/levels, or visual/audio assets since that is beyond the scope of the book. AI class creation with utilization of behavior trees and nav meshes would be great if the focus of the book were to set up a frame work where enemies were visibly on field and would behave in a more action oriented way, but again, the idea was to have this book be turn-based with players running into enemies not seen on the field. I think you are right that the combat should have been triggered differently than a console command, given the theme of the book, the combat should have been random encounters, this is something I would want in the book, and I think should have been there, it is easy enough to set up a random encounter system based on steps so it would have made more sense to have that rather than the console command which was really only there for testing purposes. There is combat UI and a screenshot of it, but the UI is simple, when entering combat there is combat UI and the ability to press buttons for different types of attacks. Enemies will attack you as well and damage will show up, but this is all displayed as text and buttons done through widget blueprints. It becomes more in-depth and visible to the player in later chapters, specifically this is one of those things that does not get fully finalized until Chapter 10, and there could have been more screenshots of it, but the publisher had enforced us to omit many of those screenshots due to page count. If we were allowed to use more pages I would have wanted the book to have a lot more in the UI itself, I agree that there should have been more of that.

            The idea of creating a new character class based from UObject was to get the reader create a new character from a lower-level class and give them a little more experience coding from scratch. We could have created all of our characters (including enemy characters) from RPGCharacter, which is a good solution and probably a better one.

            I also think creating the data tables from a spreadsheet is best and most organized. I think more of that is needed. There were certainly some changes through versions, but it is certainly working properly by now.

            I also agree that the book could have been organized a bit better given that so many aspects of the book comes together in the end. Too many odds and ends get addressed in Chapter 10 rather than earlier chapters.

            Many of the issues you describe in your last point were things that were in the book but needed to be cut out. Also, I know the co-author and I wanted an actual dungeon with a boss set up (which would have required some of what I mentioned above being beyond the scope of the book). But the publisher forced us to trim down the book (by nearly half), which forced us to omit quite large areas, so then the scope of the book really became "here is a framework, expand upon it to make your own RPG." Which I think was fine to do to some degree, but I think the book could have been marketed much better in order to make what the book was really about a bit more clear.
            Last edited by thestevex; 11-19-2017, 06:58 PM.

            Comment

            Working...
            X