Tacticular Cancer: We'll have your balls

  1. Welcome to rpgcodex.net, a site dedicated to discussing computer based role-playing games in a free and open fashion. We're less strict than other forums, but please refer to the rules.

    "This message is awaiting moderator approval": All new users must pass through our moderation queue before they will be able to post normally. Until your account has "passed" your posts will only be visible to yourself (and moderators) until they are approved. Give us a week to get around to approving / deleting / ignoring your mundane opinion on crap before hassling us about it. Once you have passed the moderation period (think of it as a test), you will be able to post normally, just like all the other retards.
    Dismiss Notice

Vapourware Codexian Game Development Thread

Discussion in 'Codex Workshop' started by 20 Eyes, Feb 10, 2012.

  1. Make America Great Again Zep Zepo Titties and Beer Patron Repressed Homosexual

    Zep Zepo
    Joined:
    Mar 23, 2013
    Parrots:
    2,686
    Divinity: Original Sin
    Click here and disable ads!
    I looked at your screenshot again. It's text, granted it's heavily formatted text, but in the end its text.

    Text editors have been able to open large "text" files going on almost 20 years now.

    There is nothing special about text.

    Formatting it is another matter (so your tools can parse it).

    Whatever that format is your using? (A neckbeard version of XML?). You'd be better off using XML then as it's been around a while.

    So, what to do? Make a copy (ofc). Find that spot where your data crashes your tool, delete everything under that. Try to load again, still crashing? Delete another page. Rinse and repeat until the tool doesn't crash. Try to narrow down to the offending line(s).

    I had to do something similar for a client not too long ago, the XML would parse, but the data was not coming in correctly. The XML was gigantic, probably 80MB or so. Turns out some shmo, who was doing some editing, used some UTF(something or other) characters not compatible with the application. Goofy characters...like a "U" with 2 dots over it and shit like that.

    The most stupidest thing can cause the biggest headache...

    Zep--
     
    • Agree Agree x 1
    • Informative Informative x 1
    • Old Old x 1
    ^ Top  
  2. Make America Great Again baturinsky Arcane

    baturinsky
    Joined:
    Apr 21, 2013
    Parrots:
    3,819
    Location:
    Russia
    How you could not recognize JSON?
     
    • Agree Agree x 1
    ^ Top  
  3. Make America Great Again baturinsky Arcane

    baturinsky
    Joined:
    Apr 21, 2013
    Parrots:
    3,819
    Location:
    Russia
    JSON by itself is not that bad, and has an advantage over binary format in it's human-accessibility.

    Though, Unity's own JSON serialiser is shit, because it is dumb. Even browser's javascript allows way more configurability for json serialisation by hooks and such.
     
    ^ Top  
  4. Nathaniel3W Rockwell Studios Developer

    Nathaniel3W
    Joined:
    Feb 5, 2015
    Parrots:
    141
    Location:
    Washington, DC
    He knows what JSON is. But any format invented after 1980 is just some new neckbeard thing.

    Thanks for the advice Zep. I fixed the savegame weeks ago, and I ended up doing something similar. I wrote a regex that replaced anything that was an illegal character. I would feed the document into the JSON parser, it would fail and tell me which illegal character it came across, which I would add to the regex, and repeat. By the end I was able to read a perfectly legible and tab-indented JSON file and figure out where my stuff was getting saved and therefore what part of my code was saving something twice.

    The issue with not being able to read the JSON was threefold: 1, Epic Games' savegame system doesn't write actual legal JSON, as evidenced by the illegal characters; 2, because I couldn't read the JSON on my own computer (because of the illegal characters) I found something online that didn't care whether the JSON was legal, but would just tab-indent everything anyway; and 3, I recently moved to Egypt where the internet sucks and when I started saving more data, inspecting 4 MB of text over the internet became cumbersome. Yes, this would have all been avoided if I had written the savegame system from scratch and therefore knew which certain illegal characters would violate JSON, and I would look out for that. It also would have been avoided if I had tried finding out why the JSON was illegal to begin with instead of using a crutch tab-indenter online, or had written my own.

    Of course, lots of problems could be avoided if I just wrote my own game engine myself, and while I'm at it maybe I should write my own operating system myself, to run on the hardware I designed myself. But if I want to finish a game of this size (have you seen my game?) within my own lifetime, I'm going to have to rely a lot on code that other people wrote.
     
    ^ Top  
  5. Make America Great Again Zep Zepo Titties and Beer Patron Repressed Homosexual

    Zep Zepo
    Joined:
    Mar 23, 2013
    Parrots:
    2,686
    Divinity: Original Sin
    I have no idea what JSON is. Never saw it, never used it. Only thing I learned in this thread is it's stand for Java Script something something.

    And isn't all this neckbeard shit free? Why would you use something online instead of downloading something?

    So tell us, how did your borrowed savegame system insert/change characters into your whatever that format is called you use? What exactly happened?

    Zep--
     
    • Old Old x 1
    ^ Top  
  6. Make America Great Again Zep Zepo Titties and Beer Patron Repressed Homosexual

    Zep Zepo
    Joined:
    Mar 23, 2013
    Parrots:
    2,686
    Divinity: Original Sin
    I actually had to write an OS (boot strapper and all) in Systems Analysis and Design class in college (1984-ish). All in Assembler, of course.

    I've been around the programming block a time or two (going on 35 years now), young padawan.

    Zep--
     
    • Prestigious Prestigious x 1
    ^ Top  
  7. Nathaniel3W Rockwell Studios Developer

    Nathaniel3W
    Joined:
    Feb 5, 2015
    Parrots:
    141
    Location:
    Washington, DC
    I don't see what you're getting at Zep. The system is working. Do you just want to see me sweat? Are you trying to prove that I don't actually understand something? And if you do that, who benefits?

    I'm 36 years old and I have not been programming as long as you. I started off college in computer engineering but changed to studying Arabic after spending some time in the Middle East and South Asia and having a hunch that there was something more I needed to know. I don't regret the decision. It led me to meet my beautiful wife and opened up opportunities for work and adventure that I wouldn't have imagined fifteen years ago. My technical skills have always been a tool in my belt, ready when needed. And now because of some smart financial decisions I made, I have the freedom to make a stupid financial decision and work on my game full time, learning a lot along the way. It has been a lot of fun, except when people on the internet give me a hard time.

    But since you asked, I save the game by triggering my SaveGame function, which builds a JSonObject from all of the objects that I need to save. From there, I make a string using JSonObject.EncodeJson(), which converts the JSonObject into a string using a function in native code, or the precompiled C++ code that UDK users don't get to see. I paid for the full UE3 license, and I don't think I'm breaking my NDA if I mention that Epic put that function in their FacebookIntegration.cpp file, UJsonObject::EncodeJson. I just thought it was interesting that their savegame system is built on top of the code they wrote for making social games. It makes sense I guess, if JSON is how Facebook sends and receives data. Anyway, at that point the string is still just a string. It gets sent to Engine.BasicSaveObject, which once again calls a native function, this time UEngine::BasicSaveObject. There Unreal Engine inserts binary wrappers around parts of my otherwise human-readable JSON before converting the whole thing into an array of bytes and writing it to the hard drive. I honestly don't know what the binary wrapper is there for or why the engine needs it. The comment above the line that makes the wrapper is just "// use a wrapper archive that converts FNames and UObject*'s to strings that can be read back in." And if you want to gloat now, go ahead. The system works, I know what my problem was, and I don't actually want to dive any deeper into an issue that isn't currently causing any problems. If I needed to dive deeper, I'm confident I could. And if I needed to write data to the hard drive on my own, I could just import a .dll that I wrote for another project that does exactly that. But the truth is I have bigger issues than poking around in a system that is currently 100% functional, and I don't need to bring in my own code when the game engine handles this stuff for me.
     
    • Informative Informative x 1
    ^ Top  
  8. Make America Great Again Zep Zepo Titties and Beer Patron Repressed Homosexual

    Zep Zepo
    Joined:
    Mar 23, 2013
    Parrots:
    2,686
    Divinity: Original Sin
    So your save system was throwing some binary into your file?

    You know, you are a little butthurt about all of this. I asked the question because maybe someone reading this thread will have the same problem and wonder why.

    If you talk nice to them, and have an good hobby idea, the UE people will cough that shit up for free. I know this from personal experience.

    Of course you can't release anything until you 1. you pay for it or 2. sign a profit sharing agreement.

    Zep--
     
    ^ Top  
  9. Make America Great Again baturinsky Arcane

    baturinsky
    Joined:
    Apr 21, 2013
    Parrots:
    3,819
    Location:
    Russia
    Why not just save it as text file https://wiki.unrealengine.com/File_Management,_Create_Folders,_Delete_Files,_and_More#Text_Files ?

    Looks like you take worst from the both worlds - you have to serialize each field by hand, it works slower than binary serialisation, and result is not human readable/editable.
     
    ^ Top  
  10. Nathaniel3W Rockwell Studios Developer

    Nathaniel3W
    Joined:
    Feb 5, 2015
    Parrots:
    141
    Location:
    Washington, DC
    That's UE4, bro. I'm using UE3. This game has been in development for a long time.
     
    ^ Top  
  11. Reinar Educated

    Reinar
    Joined:
    Oct 20, 2015
    Parrots:
    93
    I had an urge to make something new and different. After thinking about it for a day, I started prototyping the game in Unity on saturday. By monday I had this:
    [​IMG]

    Dungeon crawler on tiled map. Currently 64x64 tiles. I didn't know how to create and work with a map as a single game object so I did the ugly thing and each tile is a separate game object (so 4096 GOs just for the tiles). It isn't as bad as I expected performance-wise. They also have colliders, though they are enabled only on wall tiles. Initial floor generation takes around 170 ms, the first floor visualisation 100 ms, and switching between floors around 50 ms. When I switch levels, I use the same GOs, just change their properties (sprite and collider on/off). So it seems it can work on this scale (at least on solid PC).

    At first, I wanted to make it more like a strategy game where you command several unit squads, but then I decided to make it just a party RPG. The player will take the role of the Dark Lord, his (anti)heroes are various evil creatures and people. The goal is to make your way through several underground levels to the surface. It's basically a mix of Cavewars and Dungeon Master. I can't decide how many characters should be in the party (6? 8?) and how deep the RPG system should be. Combat will be either realtime semi-automatic (characters move towards each other to fight, player can use their abilities) or turn-based tactical (characters would need more depth to be entertaining).

    I also want the environment to play a role, so Swimming as a passive ability will come back once again. Caves aren't usually connected so in order to get to the stairs up, you have to dig your own path. That's where Mining will save you time. Then there's Crafting and Enchanting and Medicine to increase party regeneration.
    [​IMG]

    The game will have a time limit so you can't just slack around. Levels are randomly generated, so will be the enemies. It will be possible to set floor size, number of floors etc when starting new game.
    In the end, it's just to work on something different for a while after working on prosperous trolls the last two months. I will probably drop the project soon (put it in the shelf next to 4 other projects). :)
     
    • Brofist Brofist x 3
    ^ Top  
  12. I'm With Her Mustawd for prison Shitty Team Member, ditch at first opportunity Douchebag! Illiterate Sychophantic Noob Village Idiot Weasel Repressed Homosexual Possibly Retarded Trigger Warning Edgy No Fun Allowed Shitposter Cuck Manlet

    Mustawd
    Joined:
    Jan 10, 2015
    Parrots:
    7,936
    Just make sure you play test it for fun. Heroes of a Broken Land had randomized dungeons and enemies and it got repetitive after like 1 hour of playing.
     
    Last edited: Mar 22, 2017
    • Acknowledge this user's Agenda Acknowledge this user's Agenda x 1
    ^ Top  
  13. Make America Great Again baturinsky Arcane

    baturinsky
    Joined:
    Apr 21, 2013
    Parrots:
    3,819
    Location:
    Russia
    [​IMG]
     
    • decline decline x 1
    ^ Top  
  14. Make America Great Again ERYFKRAD Arcane Patron

    ERYFKRAD
    Joined:
    Sep 25, 2012
    Parrots:
    8,987
    Serpent in the Staglands Shadorwun: Hong Kong Pillars of Eternity 2: Deadfire
    Classy.
     
    ^ Top  

(buying stuff via the above buttons helps us pay the hosting bills, thanks!)