Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

  • Days Won


Nypyren last won the day on July 28

Nypyren had the most liked content!

Community Reputation

12247 Excellent


About Nypyren

  • Rank

Personal Information

  • Role
  • Interests

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. The constructor can't take 'var' (var is only allowed for local variables). The new[] {...} determines its type from the values inside the { }. In this case since 10 20 and 30 are int literals, the array will be an int[]. This might be a problem in your byte[] case since I don't believe there is a byte literal syntax yet.
  2. You can initialize arrays in a variety of ways: https://stackoverflow.com/questions/5678216/all-possible-array-initialization-syntaxes The most abbreviated form is: new[] { 10, 20, 30 }
  3. Nypyren


    (Ignore any links in this post; they are from gamedev's affiliate system) Slightly on a tangent - what are your guys' takes on the sheer flood of Games Workshop licensed PC games lately? Are they true to the brand or are they licensing the IP for games nobody wants? Personally I've had a ton of fun with Vermintide 2, and Dawn of War 2 was OK.
  4. Nypyren

    Global Variables

    Pass references/pointers to the list of objects around to the functions that need access to them. For classes which need a long term reference, store a reference in a member. For short lived references, pass as a parameter and use as a local. This is typically easier to deal with in garbage collecting languages because there are fewer ways the concept of ownership matters.
  5. If you have a small, known set of allowed characters, you can use an array indexed by character as an unordered map: // The following assumes that ALL chars are >= 'a' and <= 'z'. int countPerChar[26] = {0}; for (char c : answer) { countPerChar[c-'a']++; } int count = 0; for (char c : guess) { if (countPerChar[c-'a'] > 0) { countPerChar[c-'a']--; count++; } }
  6. Fallout 3 and 4's hacking comparison is EXTREMELY simple. Comparisons are done on the same character position in both words, and all words in one 'screen' are the same length. Word length is increased when the terminal is more difficult, and decreased if the player's hacking skill is high. int same = 0; for (int i=0; i<wordLength; ++i) { if (wordA[i] == wordB[i]) { same++; } }
  7. Nypyren

    AIMBOT prevention

    What if the player doesn't install a nand program?
  8. Allocators either garbage collect and compact the heap (in garbage collecting runtimes), ask the OS for more memory to expand the heap (ex: VirtualAlloc), return null, throw an exception, or produce some other type of error. Successfully allocated memory is ALWAYS contiguous from the perspective of the program (code assumes that data structures are always arranged the same way). However, protected mode virtual memory allows the addresses that the program uses to map to different actual physical RAM (or even hard drives)
  9. Check unity's logfile, since it may include an explanation of what was happening which caused or was related to the crash. If you're on Windows, it's at: C:\Users\<username>\AppData\Local\Unity\Editor\Editor.log You can try deleting your Temp and Library folders. They contain files that Unity can regenerate from your Assets folder. Sometimes Temp or Library can become corrupt. The Temp folder is normally deleted when Unity exits cleanly, so if Unity crashes it can sometimes leave it behind. Deleting the Temp folder is always safe after Unity crashes. The Library folder can take a long time to regenerate based on the number and complexity of your Assets. During Unity upgrades, frequently some of the Unity C# API methods will be obsolete/renamed. Unity tries to automatically replace these before the "compiling scripts" phase. It can't always get everything. You can try temporarily removing some of your scripts from the project to see if you can get it to finish compiling. Same goes for DLL files. Visual Studio works fine with all versions of Unity that I've used (from 3.x through 2018.x so far)
  10. Nypyren

    GameManager destroyed error

    Can you post screenshots of your scene hierarchies (just including the gameobject(s) that contain(s) the managers) and the inspector when the gameobject with your GameManager is selected in each scene? Preferrably the scenes when they're not running yet.
  11. Nypyren

    GameManager destroyed error

    Have you tried putting a Debug.Log in GameManager.OnDestroy?
  12. The firewall inbound rules are a separate thing from the router's port forwarding mapping table. There are also firewalls in both the router and computer's operating system and it's not clear from your post which firewall you configured. WAN -- cable/DSL modem -- router(mapping table, firewall, etc) -- switch(es) -- computer's network adapter -- driver/os/firewall/etc -- application software Special cases: Sometimes the modem and router are combined in one physical device. If you only own a single computer you can plug it directly into a modem. The router's main job that may affect you is to map IP addresses in packets arriving on the WAN side (83.x.x.x:wan_port) of the router to IP addresses in your LAN (192.168.x.x:lan_port) and lookup the MAC address to send the packet to on the LAN. This is because typical home customers only have a single public-facing IPv4 address, but many internet connected devices. When one of your computers connects to the outside world (LAN->router->WAN), the router automatically creates a temporary mapping so that returning traffic (WAN->LAN) gets back to the correct computer/port. When the outside world sends traffic to the router (WAN->router), the router only allows the packet to continue (router->LAN) if it knows where on the LAN to send it, and if its security rules allow it. If you just start up a listening socket on the LAN side, nothing automatically tells the router to make any mapping at all. This is where you either use UPnP to tell the router to add a mapping, or use the router's web interface (opening or whatever its IP address is in a browser and manually configuring it), or using a WAN-side service to facilitate connections (STUN, etc).
  13. If you have a router, you need to set up port forwarding (or a similar alternative) in order for the router to know what to do with incoming traffic on that port. By default, a router only knows what to do when something on the LAN side of the router tries to connect to something on the WAN side, and rejects anything else. (This post assumes you're using typical network equipment found at home, not a cloud provider like Amazon)
  14. Nypyren

    GameManager destroyed error

    I thought DontDestroyOnLoad on a GameObject would keep all MonoBehaviours on that object alive, but I might be wrong. Try calling it on the MonoBehaviours as well and see if that helps.
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!