Engine for Creating Mobile Games

Have you ever had an idea for a multiplayer mobile game? I have one in mind. I was thinking of creating a browser game so that both IOS and Android users can enjoy playing it.

However, there is something that worries me. If I develop the game mostly using JavaScript, wouldn't it make it vulnerable to hacking attacks? For instance, if I make AJAX requests to the server, anyone could simply open the developer tool in their internet explorer, set a breakpoint on the request, and alter the data before it is sent.

For example, let's say a user earns some money in the game. When I try to send the updated amount to the server to be saved in the database, malicious individuals could modify the money value before the request goes through, leading to the server receiving incorrect information.

Am I right to be concerned about this security vulnerability? Are there any measures I can implement to enhance the security of the game?

In my quest for a multi-platform mobile engine, I struggled to find the perfect fit. I came across spaceport.io, but unfortunately, it has not been released yet.

Do you know of any other engines that would suit my needs?

  • I prefer programming in Javascript or C#
  • I aim to deploy the game for IOS and Android devices
  • The game will initially be 2D, with the possibility of incorporating 3D elements later
  • I require network support for multiplayer functionality

Also, just to add - I don't have a large budget to work with ;-)

Answer №1

Indeed, Javascript may have some security vulnerabilities as mentioned, but this is not unique to only that programming language. Other engines also have their weaknesses, although they require more effort to exploit.

The key here is to ensure that the client sends only user input to the server, and it is the server that processes these inputs and generates responses accordingly.

For example, if the client declares "I opened a chest and received 100 gold, add it to my balance", it can easily be manipulated to say "I gained 100,000 gold instead".

Instead, the client should simply state "I opened the chest," and the server would respond with "you obtained 100 gold from the chest, which has been added to your balance."

Furthermore, the server should keep track of the player's location based on movement requests sent by the client. Instead of the client indicating "I opened the chest at this spot," it should just indicate "I opened the chest where I am." The server should know the user's position so that they cannot manipulate chest locations without actually moving.

This implies that the client should not inform the server of the player's location directly, but rather give movement updates such as "I moved one block north" or "I moved one block east." The server can then record and act upon these movements while monitoring for any suspicious activity. If the user attempts to alter their location without sending proper movement updates, the server will ignore the falsified location.

Although the client can move the player before receiving a response from the server for efficiency, if the server corrects the player's position (due to latency issues), the client must adjust accordingly. This adjustment often leads to games appearing jumpy or even reversing directions during laggy moments. The client aims to maintain smooth gameplay by preemptively updating movements, but discrepancies between client and server communication can result in these unexpected changes.

Answer №2

Security is a major concern with JavaScript due to its susceptibility to client-side hacking. It is essential to validate all actions on the server side.

I am torn between learning Javascript or C# for programming.

C# is used for server-side programming, while Javascript is primarily for client-side scripting. Both languages have their own unique purposes and are not interchangeable.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Can you explain the distinction between compiled and interpreted programming languages?

Despite my efforts to research the topic, I am still confused about the distinction between a compiled language and an interpreted language. It has been mentioned that this is one of the distinguishing factors between Java and JavaScript. Can someone ple ...

Send the NameSpace to the object and store it in the local storage

Hey there! I've developed an Android application that accesses the device certificates to retrieve specific information (APPCID). handleCertificate(appId) { OData.defaultHttpClient = sap.AuthProxy.generateODataHttpClient(); this.factory.connectionDa ...

Filtering rows in JQgrid is made easy after the addition of a new record

Here's the situation I'm facing: Every second, my script adds a new record using the "setInterval" function: $("#grid").jqGrid('addRowData', id, data, 'first').trigger("reloadGrid"); However, when users apply filters while t ...

An issue occurs with the scope of a variable during the compilation of Relay Modern code, resulting in an

I have created the following simple Relay Modern code snippet: import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { QueryRenderer, graphql } from 'react-relay' import environment f ...

Discovering descendant div elements

I've been conducting some research, but I'm struggling to find a specific answer for this. Here is the HTML code snippet: <div class="collapsingHeader"> <div class="listItemWrapper"> <div class="itemWrapper"> ...

Navigating the Spine

Struggling to get routing to function properly in Backbone, I have tried my best but it still seems quite confusing. Here is a snippet of what I currently have: routes: { '' : 'home', 'home' ...

Retrieve the element (node) responsible for initiating the event

Is there a way to identify which element triggered the event currently being handled? In the following code snippet, event.target is only returning the innermost child node of #xScrollPane, with both event.currentTarget and event.fromElement being null. A ...

After resizing, reordering, hiding, or showing columns in the kendo grid, the grid's data source will be set to

I am encountering an issue with my kendo grid where the data disappears after performing certain actions: Reordering columns using mouse drag and drop Resizing columns using mouse drag and drop Hiding columns through the column menu Showing columns throu ...

AngularJS tip: monitor the size of a filter in ng-repeat loop

Take this example of a repeated list: <ul> <li class="suggestion-item" ng-repeat="item in suggestionList.items | filter: {id: 2} track by track(item)">{{item.text}}</li> <ul> Is there a way to check if the filter results are n ...

Creating PHP Form Arrays with Checkbox Input Fields

In a nutshell, I have created a concise form with an input field, a drop-down menu, and three checkboxes. Using a function attached to a button, I am able to add multiple instances of this form dynamically on my webpage. The data is saved as an array in th ...

Having trouble with the JSON array not being rendered properly in React Native?

I received the following JSON data from an API endpoint using a fetch() function: [{"username":"\"Hyh\"","name":"GitHub","url_main":"https://www.github.com/","url_user&quo ...

How can a controller in AngularJS detect when the back button of the browser is pressed

I've created a browser trivia game where authenticated players can select a game type, triggering a socket.io event in my Node.js server. The view then transitions to a "Searching for game" screen with a loading icon as the server waits for enough pla ...

Is there a way to simulate a call to a method triggered by a Vue directive?

I am having an issue with the close() method in my Test component. It seems to only work when clicking outside of the div that the directive is applied to. How can I ensure that the method is triggered appropriately in my test? The component utilizes the v ...

What causes the issue when attempting to import multiple CSS files in a Vue.js project using @import more than once?

Currently, I am working on a project that involves one main component and several child components. These components require custom CSS files as well as additional vendor CSS files. A challenge I encountered is that I cannot use the @import "path/to/css/fi ...

Executing a series of tests using Postman

Is running multiple requests in a postman script feasible? I have an endpoint: http://localhost/gadgets/{id}/buy This endpoint sets a flag in a gadget object/entry based on its id. With hundreds of gadgets, can I use a shared file of ids to create and run ...

Preventing a scroll handler from executing once an element has been clicked

When a user scrolls to the video, it will automatically start playing. Similarly, when the user scrolls away from the video, it will stop playing and display the poster image. However, I encountered an issue where I don't want this functionality to tr ...

Using Javascript and HTML5 Canvas to retrieve dimensions of selected objects

I have a canvas with an image containing colored squares. I want to be able to click on a square and retrieve its dimensions in pixels. For instance, clicking on a red square with a yellow border should return 24 X 100. I've come across some code that ...

Create a function in JavaScript that is able to accept a variable number of objects as arguments

I have a good grasp of how to pass infinite parameters in a function in JavaScript. But what about accepting any number of objects as parameters in a function? This is my current implementation: function merge<T>(objA: T, objB: T){ return Object. ...

Parsing values from deeply nested objects and arrays

I've come across this issue before, but I'm having difficulty navigating through a nested structure. I can't seem to find any guidance in the right direction. Here is the object I'm attempting to parse: const nestedArray = { id ...

The logical operator malfunctions following a computation

var sub_response_type = {"survey_question":["Test lable"],"responseTypeText":"Exit label","select_param_type":[">","<"],"questions_id":["7","8"],"select_param_value":["12","34"],"radio_type":["&&"]}; var order = ['questions_id' ...