{"id":4941,"date":"2022-08-25T06:28:46","date_gmt":"2022-08-25T00:58:46","guid":{"rendered":"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-simple-check-that-the-game-was-recompiled-closed\/"},"modified":"2022-08-25T06:28:46","modified_gmt":"2022-08-25T00:58:46","slug":"solved-how-to-make-a-simple-check-that-the-game-was-recompiled-closed","status":"publish","type":"post","link":"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-simple-check-that-the-game-was-recompiled-closed\/","title":{"rendered":"[Solved] How to make a simple check that the game was recompiled? [closed]"},"content":{"rendered":"<p> [ad_1]<br \/>\n<\/p>\n<div id=\"answer-36025735\" class=\"answer js-answer accepted-answer js-accepted-answer\" data-answerid=\"36025735\" data-parentid=\"36025317\" data-score=\"2\" data-position-on-page=\"1\" data-highest-scored=\"1\" data-question-has-accepted-highest-score=\"1\" itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n<div class=\"post-layout\">\n<div class=\"votecell post-layout--left\"><\/div>\n<div class=\"answercell post-layout--right\">\n<div class=\"s-prose js-post-body\" itemprop=\"text\">\n<blockquote>\n<p>I have read that it is very easy to hack and recompile an unity game.<br \/>\n  Also, I read that they have a function (provided by the engine) to<br \/>\n  determine that the game has been recompiled.<\/p>\n<\/blockquote>\n<p>Yes, Unity has a function to determine if your game has been <strong>de-compiled<\/strong> and <strong>recompiled<\/strong> or <strong>modified<\/strong> in any way. But the hacker would be <strong>smart<\/strong> enough to modify what that function <strong>returns<\/strong>, before <strong>re-compiling<\/strong> the game. Any protection code you write can be <strong>modified<\/strong> or <strong>removed<\/strong> by the <strong>hacker<\/strong>.<\/p>\n<blockquote>\n<p>I release the game, a bad guy hacks it and publish as his own, but<br \/>\n  somewhere in the depth of the code still there is a check that the<br \/>\n  game has been recompiled, so that I can display some note to the user<br \/>\n  or to make the game unplayable.<\/p>\n<\/blockquote>\n<p>Some one will always try to hack your game. This will be likely if your game is famous and is played by many. Displaying some note to the user wont stop hackers from hacking your game. Making the game unplayable wont either.<\/p>\n<blockquote>\n<p>Is it easy to hack a cocos game? Do I need to worry about it? How to<br \/>\n  make a small copy protection for my game?<\/p>\n<\/blockquote>\n<p>Any game can be <strong>hacked<\/strong>. Depending on the hacker&#8217;s <strong>experience<\/strong>, the hack could be <strong>hard<\/strong> or <strong>easy<\/strong> for them. You <strong>don&#8217;t<\/strong> need to <strong>worry<\/strong> about this. <strong>Large<\/strong> game companies have <strong>dedicated<\/strong> team of <strong>programmers<\/strong> that <strong>protects<\/strong> their <strong>games<\/strong> but it only takes hackers <strong>weeks<\/strong> or <strong>months<\/strong> to remove every <strong>protection<\/strong> from the <strong>game<\/strong> and make the game <strong>playable<\/strong> once again.<\/p>\n<p>Spend most of your time making <strong>great<\/strong> games and make the game cost to be <strong>affordable<\/strong>, then <strong>less<\/strong> people will <strong>pirate<\/strong> your game. There is <strong>no way<\/strong> you can <strong>fully<\/strong> stop people from <strong>hacking<\/strong> your game no <strong>matter<\/strong> the <strong>programming language<\/strong> or <strong>operating system<\/strong> the game was designed for.<\/p>\n<p><strong>EDIT<\/strong>:<\/p>\n<ol>\n<li>\n<p>To add a simple protection you, should <strong>obfuscate<\/strong> your C++ code.<strong>Obfuscation<\/strong> will make your code more <strong>un-readable<\/strong>. For example, if you have a class called <code>PlayerInfo<\/code> that contains the score, Obfuscation will rename the class name to <code>Esfjhsakm4<\/code>. The hacker would have to go through everything one by one to realize what&#8217;s going on in your app. You can google C\/C++ <strong>Obfuscator<\/strong> for more information.<\/p>\n<\/li>\n<li>\n<p>Another way to protect your code is to give your game a limit of player score over time. Maybe if a player points goes from <strong>0 to 100<\/strong> within a second and you know that is not <strong>possible<\/strong> with your game mechanics, you can <strong>detect<\/strong> this as a hack and then take action.<\/p>\n<\/li>\n<li>\n<p>If this is a network game, make the game so that players would have to <strong>register<\/strong> and <strong>sign in<\/strong> to play. Then you can ban the player&#8217;s account if you catch them cheating. Also ban their <strong>IP Address<\/strong> for <strong>3 days<\/strong> then lift the ban after <strong>3 days<\/strong> but don&#8217;t lift the ban on the <strong>player&#8217;s account<\/strong>. <\/p>\n<\/li>\n<li>\n<p>Detect if an item has been unlocked while the user has not played the level that is required to unlock that item.<\/p>\n<\/li>\n<\/ol>\n<p>The big advice is that you don&#8217;t let user know that you detected hack in their game. Just take a background action such as changing the games mode from <strong>easy<\/strong> to <strong>hard<\/strong>, <strong>banning the player<\/strong> and make the game annoying. If you <strong>close<\/strong> the game when hack is detected, they will remove the <strong>code<\/strong> that closes the game.<\/p>\n<\/p><\/div>\n<div class=\"mt24\"><\/div>\n<\/div>\n<p>            <span class=\"d-none\" itemprop=\"commentCount\">7<\/span> <\/p><\/div>\n<\/div>\n<p>[ad_2]<\/p>\n<p>solved How to make a simple check that the game was recompiled? [closed] <\/p>\n","protected":false},"excerpt":{"rendered":"<p>[ad_1] I have read that it is very easy to hack and recompile an unity game. Also, I read that they have a function (provided by the engine) to determine that the game has been recompiled. Yes, Unity has a function to determine if your game has been de-compiled and recompiled or modified in any &#8230; <a title=\"[Solved] How to make a simple check that the game was recompiled? [closed]\" class=\"read-more\" href=\"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-simple-check-that-the-game-was-recompiled-closed\/\" aria-label=\"More on [Solved] How to make a simple check that the game was recompiled? [closed]\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[320],"tags":[324,1162],"class_list":["post-4941","post","type-post","status-publish","format-standard","hentry","category-solved","tag-c","tag-cocos2d-x"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>[Solved] How to make a simple check that the game was recompiled? [closed] - JassWeb<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-simple-check-that-the-game-was-recompiled-closed\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[Solved] How to make a simple check that the game was recompiled? [closed] - JassWeb\" \/>\n<meta property=\"og:description\" content=\"[ad_1] I have read that it is very easy to hack and recompile an unity game. Also, I read that they have a function (provided by the engine) to determine that the game has been recompiled. Yes, Unity has a function to determine if your game has been de-compiled and recompiled or modified in any ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-simple-check-that-the-game-was-recompiled-closed\/\" \/>\n<meta property=\"og:site_name\" content=\"JassWeb\" \/>\n<meta property=\"article:published_time\" content=\"2022-08-25T00:58:46+00:00\" \/>\n<meta name=\"author\" content=\"Kirat\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kirat\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-simple-check-that-the-game-was-recompiled-closed\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-simple-check-that-the-game-was-recompiled-closed\/\"},\"author\":{\"name\":\"Kirat\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31\"},\"headline\":\"[Solved] How to make a simple check that the game was recompiled? [closed]\",\"datePublished\":\"2022-08-25T00:58:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-simple-check-that-the-game-was-recompiled-closed\/\"},\"wordCount\":597,\"publisher\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\"},\"keywords\":[\"c++\",\"cocos2d-x\"],\"articleSection\":[\"Solved\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-simple-check-that-the-game-was-recompiled-closed\/\",\"url\":\"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-simple-check-that-the-game-was-recompiled-closed\/\",\"name\":\"[Solved] How to make a simple check that the game was recompiled? [closed] - JassWeb\",\"isPartOf\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#website\"},\"datePublished\":\"2022-08-25T00:58:46+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-simple-check-that-the-game-was-recompiled-closed\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-simple-check-that-the-game-was-recompiled-closed\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-simple-check-that-the-game-was-recompiled-closed\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/jassweb.com\/solved\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[Solved] How to make a simple check that the game was recompiled? [closed]\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/jassweb.com\/solved\/#website\",\"url\":\"https:\/\/jassweb.com\/solved\/\",\"name\":\"JassWeb\",\"description\":\"Build High-quality Websites\",\"publisher\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/jassweb.com\/solved\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\",\"name\":\"Jass Web\",\"url\":\"https:\/\/jassweb.com\/solved\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png\",\"contentUrl\":\"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png\",\"width\":693,\"height\":132,\"caption\":\"Jass Web\"},\"image\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31\",\"name\":\"Kirat\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1776403586\",\"contentUrl\":\"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1776403586\",\"caption\":\"Kirat\"},\"sameAs\":[\"http:\/\/jassweb.com\"],\"url\":\"https:\/\/jassweb.com\/solved\/author\/jaspritsinghghumangmail-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[Solved] How to make a simple check that the game was recompiled? [closed] - JassWeb","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-simple-check-that-the-game-was-recompiled-closed\/","og_locale":"en_US","og_type":"article","og_title":"[Solved] How to make a simple check that the game was recompiled? [closed] - JassWeb","og_description":"[ad_1] I have read that it is very easy to hack and recompile an unity game. Also, I read that they have a function (provided by the engine) to determine that the game has been recompiled. Yes, Unity has a function to determine if your game has been de-compiled and recompiled or modified in any ... Read more","og_url":"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-simple-check-that-the-game-was-recompiled-closed\/","og_site_name":"JassWeb","article_published_time":"2022-08-25T00:58:46+00:00","author":"Kirat","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kirat","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-simple-check-that-the-game-was-recompiled-closed\/#article","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-simple-check-that-the-game-was-recompiled-closed\/"},"author":{"name":"Kirat","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31"},"headline":"[Solved] How to make a simple check that the game was recompiled? [closed]","datePublished":"2022-08-25T00:58:46+00:00","mainEntityOfPage":{"@id":"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-simple-check-that-the-game-was-recompiled-closed\/"},"wordCount":597,"publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"keywords":["c++","cocos2d-x"],"articleSection":["Solved"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-simple-check-that-the-game-was-recompiled-closed\/","url":"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-simple-check-that-the-game-was-recompiled-closed\/","name":"[Solved] How to make a simple check that the game was recompiled? [closed] - JassWeb","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/#website"},"datePublished":"2022-08-25T00:58:46+00:00","breadcrumb":{"@id":"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-simple-check-that-the-game-was-recompiled-closed\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jassweb.com\/solved\/solved-how-to-make-a-simple-check-that-the-game-was-recompiled-closed\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jassweb.com\/solved\/solved-how-to-make-a-simple-check-that-the-game-was-recompiled-closed\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/jassweb.com\/solved\/"},{"@type":"ListItem","position":2,"name":"[Solved] How to make a simple check that the game was recompiled? [closed]"}]},{"@type":"WebSite","@id":"https:\/\/jassweb.com\/solved\/#website","url":"https:\/\/jassweb.com\/solved\/","name":"JassWeb","description":"Build High-quality Websites","publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jassweb.com\/solved\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/jassweb.com\/solved\/#organization","name":"Jass Web","url":"https:\/\/jassweb.com\/solved\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/","url":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","contentUrl":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","width":693,"height":132,"caption":"Jass Web"},"image":{"@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31","name":"Kirat","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/image\/","url":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1776403586","contentUrl":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1776403586","caption":"Kirat"},"sameAs":["http:\/\/jassweb.com"],"url":"https:\/\/jassweb.com\/solved\/author\/jaspritsinghghumangmail-com\/"}]}},"_links":{"self":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/4941","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/comments?post=4941"}],"version-history":[{"count":0,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/4941\/revisions"}],"wp:attachment":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/media?parent=4941"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/categories?post=4941"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/tags?post=4941"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}