way to implement a menu pratical i do my first game and already read alot about design strategie, programming style, design .. and so on theoretically it works perfect but in practice i dont know if i do thinks "right" i have three classes my main which starts the view in this i do all my stuff currently it holds an state variable, it has an onDraw method .. and so on the third class is the game thread while my game is running, in here are decisions depending on my current state what should be done Override public void run() Canvas canvas null mStartTime System.currentTimeMillis() while (mRun) canvas mHolder.lockCanvas() if (canvas ! null) State Updating State means to manage state transitions, such as a game over, character select or next level. switch( mPanel.getModeState() ) case Surface.MODE LOGO SPLASH break case Surface.MODE MENU the menu break case Surface.MODE LOADING loading animation break case Surface.MODE GAME PLAYING game stuff GAME START RUNNING END Input AI Physics animation mPanel.animate(mElapsed) break draw everyThing mPanel.doDraw(mElapsed, canvas) sound Sound and Video. mElapsed System.currentTimeMillis() mStartTime mHolder.unlockCanvasAndPost(canvas) mStartTime System.currentTimeMillis() my problem is .. the function onDraw draws everything .. including the menu ? this sounds for me like bad code because everytime doDraw is executet, i have to check in this function which state i am currently in .. this cost time, dosent it ? public void doDraw(long elapsed, Canvas canvas) canvas.drawColor(Color.BLACK) currently just gameLayout canvas.drawBitmap(background, 0, 0, mPaint) gameLayout.draw(canvas) would it not be better do implement an other thread which draws the menu ? but if so, how can i overlay the menu afer pause the game ? thanks for help erwin


Why does Forge not find my texture for my custom background? I am creating a minecraft mod that improves the main menu for my minecraft server. At first I wanted to create the background, but somehow when I try to start minecraft it closes and I get a nullpointerexception because minecraft didn't find my background. public class ThundrialMenu extends GuiScreen Override public void initGui() Override public void drawScreen(int mouseX, int mouseY, float partialTicks) Random rnd new Random() int background rnd.nextInt(3) 1 String backgroundLocation " assets thundrial gui Background" background ".png" this.drawBackground(mc.renderEngine.getTexture(new ResourceLocation(backgroundLocation)).getGlTextureId()) super.drawScreen(mouseX, mouseY, partialTicks) Override public void updateScreen() super.updateScreen() This is the folder where the pictures are located Why does Minecraft not find those pictures?


Best approach for Event driven UI Had an idea for a modification to a game, however the core functionality heavily involves UI, and the API for the mod is event based. The player will have there own custom data object, so I know one option could be onClickEvent if Player doing X task player.doX if Player doing Y task player.doY on ScrollEvent if Player doing X task player.setXValue I have a feeling this is not the best approach, so my question is what is the best approach to an event driven UI?


Error in DRAW GUI event on android. (GameMaker) Image of the game on a mobile phone As you can see the maze (draw event) has been resized correctly. But the yellow post it (draw GUI event) has not been scaled or displayed in the correct location (center of the screen). Same thing with GUI layout (draw GUI event). Because this is a small stage room (size) I do not use the artifice of views, I thought that could be because of that the problem, but I enabled the views and did not get any different result. Picture of the game on a computer (like it should be on the phone) OBS One information that can help you to help me solve the problem, is that to draw the post it I use the following code draw GUI event draw sprite(spr Post,0,640,360) . 640 is the half screen width of the game and also the room, 360 is half the height of the game screen and also the room. It seems that somehow the room on the cell phone is different size than 1280x720. I do not put the following code draw GUI event draw sprite(spr Post,0,room width 2,room height 2), because there are much larger phases that need views, so the post it needs to be in the center of the screen of the player, and with this code it ends up being in the center of the phase. I tested the game on Bluestacks and it did not happen the same as on the phone.


Interfaces 101 Making it Pretty I've made a few games which I've actually released into the wild. There's one particular issue I run into over and over, and that's the issue of the interface theme of the game. How can you make non arbitrary, consistent decisions about the look and feel and interface of your game? For example, in version one of my Silverlight chemistry based game, I made a (bad?) decision to go witha natural, landscape style look and feel, which resulted in this UI Then in a later iteration, I got smarter and went with a more "machiney," grungy look and feel, which resulted in this (final UI) I will definitely say that my taste in UI improved through iteration. But it was a result of a lot of initially arbitrary decisions followed by a lot of tweaking. Is there a better way to figure out how to theme your game? To give a parallel in writing, when you're writing a fantasy sci fi novel, there are a lot of elements you need to describe. While you can arbitrarily invent objects creatures places etc., you get a much more consistent world when you sit down for a few minutes and design the area, region, planet, or universe. Everything then fits together nicely, and you can ask yourself "how would this work in this universe? Edit It seems like I didn't explain this well. Let me simplify the question in the extreme when I need to lay out a title screen (with background, fonts, skinned buttons) how do I decide how they should look? Green or blue? Grunge or not? Rounded or flat? Serif or sans serif? Take that question and explode it into your game as a whole. How do you figure out how things should look? What process do you use to make them consistent and non arbitrary? Look at the screenshots again. I could have stuck to grass sky rocks, but metal seemed more fitting to the idea of chemical reactions and atoms.


How to create guides to off screen objects? I've played Metroid Blast on Wii U, and would like to build one of its features in a three.js game. The feature is if an opponent is out of view, a guide is displayed showing the direction of the opponent. An example of it is here (Image source) Notice the small circles with arrows in the left side. How could I have a similar feature in my game?


Is it possible to skin Qt 4.5 such that it has a 'game like' interface? Is it possible to skin Qt 4.5 such that it looks less like an application framework but more of a game? I guess this probably means replacing the canvas, the title bar and the artwork of the various widgets. Will such an approach be platform independent too?


How to display Render Target live to HUD widget in UE4 I'm making a security camera system in Unreal Engine 4. It allows the player to 'activate' the monitor, which should display the Render Target texture or the material made from it on the HUD. However, that just doesn't work. There's just no image when I try to play it. Nothing appears on the screen. I'm using blueprints btw, not C . And yes, I did check and make sure that it's not the part that displays the HUD that's going wrong, it's the displaying of the render target to the UI widget. To display it, i've tried using the image component in the UI widget. Can anyone help?


Runtime Storage vs Static Storage Runtime Storage (hardcoded) vs Static Storage (file storage) (original question) I extended my engines GUI from procedural style to object orientated style, but I still have to create menues, buttons etc. So I got the choice to create each menue via a class or have a static main class which loads menues from a XML file. My problem is that I actually like to have static and external storage in XML because it keeps the code and the project clean. But if a GUI Object is created e.g. a button I want to have delegates callbacks events on it, but I think that isn't possible with loading and creating GUI Objects by XML files that only contain ints and strings. The question is when do you hardcode parts of your game and when do you store them locally. Runtime Storage You safe time while you do not have to write a parser or something similar. You lose a lot of flexibility in late development Static Storage You gain a lot of flexibility in the late development You spent a lot of time into a system to read and write, and also handle the storage


How do I create a message box that fires a callback on button press? I need to create a message box with an "OK" button. When the user touches the button, it should execute a callback. I'm new to this and couldn't find any articles in the docs.


Does a successful attempt count as an attempt? I'm writing a video game and I'd like to know if I should include the "successful" attempt in the count of "total attempts". For instance, in a clay shooting game, if the player needs four shots before they hit the target bullet one miss bullet two miss bullet three miss bullet four hit Does it equate to three attempts, or four attempts? What text do I need to write at the end of the round? You needed three attempts to hit the target! or You needed four attempts to hit the target!


In tools development, what languages and technologies are currently in use? I am an aspiring tools developer currently in university. Normally I use both C and C to and from but as my time at university is coming to an end, what language and technologies are worth focusing on? With tools I'm not only thinking simple data file editors, but level editors and such as well. I have tried searching in numerous places but generally I only find questions regarding what language or tools to use for game development. As I want to create the tools rather than use them, the answers don't necessarily apply. Seeing as C still seems to be the language of choice in the gaming industry, is it also still the primary language for tools? If so, what UI and core libraries are most prominent? wxWidgets and stl boost? Plain Win32? Or if C is being phased out in favor of "easier" languages like C is WinForms the right pick, or is the industry moving towards WPF? Maybe scaleform internally as well? In short, is there anything I absolutely need to know to not be just an expensive chair heater?


Slick2D and Nifty GUI I am currently trying to combine both slick2d and nifty to work together. I've had some amount of success I can now actually run my test and it won't crash. As far as I can tell, it will also receive input properly. First, I'm having doubts I'm doing it right. I extend NiftyStateBasedGame in my outer game and then I extend two NiftyOverlayGameState to create the two states. However, I am getting an error that doesn't crash my application saying WARNING An event service by the name NiftyEventBusalready exists. Perhaps multiple threads tried to create a service about the same time? org.bushe.swing.event.EventServiceExistsException An event service by the name NiftyEventBusalready exists. Perhaps multiple threads tried to create a service about the same time? at org.bushe.swing.event.EventServiceLocator.setEventService(EventServiceLocator.java 123) I could ignore it, since the application is running well enough (I think?) but I'm concerened that once I figure out how to actually implement some parts of the GUI they might not work. Which leads me to my next question. I was trying to create a simple button on screen and I could not for the life of me figure out how to go about it. I have my nifty instance... But what do I do with it? Any pointers in the right direction would be greatly appriciated! My three classes The outer class, TheGame (This is the StateBasedGame) public class TheGame extends NiftyStateBasedGame Menu menu Nifty nifty GameOver go public TheGame(String name) super(name) menu new Menu() go new GameOver() Override public void initStatesList(GameContainer arg0) throws SlickException this.addState(menu) this.addState(go) public static void main(String args) throws Exception AppGameContainer game new AppGameContainer(new TheGame("OMG, Super test!")) game.setDisplayMode(800, 600, false) game.setAlwaysRender(true) game.start() And the two dummy classes the are the states public class Menu extends NiftyOverlayGameState Override protected void initGameAndGUI(GameContainer gc, StateBasedGame sbg) throws SlickException initNifty(gc, sbg) Override protected void renderGame(GameContainer gc, StateBasedGame sbg, Graphics g) throws SlickException g.drawString("Does it work?", 100, 100) Override protected void updateGame(GameContainer gc, StateBasedGame sbg, int delta) throws SlickException Input input gc.getInput() if (input.isMouseButtonDown(Input.MOUSE LEFT BUTTON)) sbg.enterState(1) public int getID() return 0 public class GameOver extends NiftyOverlayGameState protected void initGameAndGUI(GameContainer gc, StateBasedGame sbg) throws SlickException initNifty(gc, sbg) Override protected void renderGame(GameContainer gc, StateBasedGame sbg, Graphics g) throws SlickException g.drawString("WORKS, OOOH YEA!", 100, 100) Override protected void updateGame(GameContainer gc, StateBasedGame sbg, int delta) throws SlickException Input input gc.getInput() if (input.isMouseButtonDown(Input.MOUSE RIGHT BUTTON)) sbg.enterState(0) public int getID() return 1 Again, if compiled, this gets me the two screens I want with the warning exception I mentioned above. What am I doing wrong? And how would I start actually adding GUI elements to this?


Keeping track of focused widget in GUI tree I'm designing a GUI framework based on trees of widgets. Widgets are general control and container structures that are everything from panels to buttons to file dialogs. Widgets have an array of child widgets a button contains a label and maybe an icon. Widgets are fed input events where the widget first does its own logic with the event then passes it on to its children. The application feeds input events to a single root widget, which can be anything from a single button in the middle of the screen to a full control window. I need a way to handle which widget(s) receives keyboard events. I've decided that one of the widgets in a given widget tree would be the focused widget. Widgets would have a gainFocus method and a loseFocus method, which would be used in response to mouse click events or manually by the application. It's unlikely I'll implement tabbing. When one widget gains focus, any existing focused widget would naturally lose focus. I still want each ancestor of the focused widget to see a given keyboard event in turn before it's given to the focused widget itself. So if I have a panel with a text box in it, the panel would see the event before the text box does. Therefore I really need to keep track of the chain of widgets from the root widget to the focused widget. I also need to maintain data integrity when I change focus so that all widgets in a tree can correctly tell whether or not they're the focused widget or an ancestor of the focused widget. I've so far come up with giving widgets a hasFocus boolean and a focusedChildIndex integer. hasFocus would be set to true when the widget has focus. focusedChildIndex would be set to the index of the focused child in its child array, which could be the focused widget itself or the next widget in the chain leading to the focused widget, or 1 to indicate that there's no focused child. Setting these variables when one widget in the tree gets its gainFocus or loseFocus method invoked is something I'm stumped on though. Edit So we're clear, this is what I think my widget class will be like class Widget private Widget parent private Array lt Widget gt children Methods for getters, adding widgets to widget trees, etc. ... public void mouseClick(int x, int y) doMouseClickEvent(x, y) for c in children c.mouseClick(int x, int y) As you can see in mouseClick the widget sees the event before its children does. I want keyboard inputs to work the same way, except this time I want to only have a single chain from the root to the focused widget to see the event. Plus I need to make sure that when one widget gains focus the currently focused widget in the tree loses focus.


Immediate GUI yae or nay? I've been working on application development with a lot of "retained" GUI systems (below more about what I mean by that) like MFC, QT, Forms, SWING and several web GUI frameworks some years ago. I always found the concepts of most GUI systems overly complicated and clumsy. The amount of callback events, listeners, data copies, something to string to something conversions (and so on) were always a source of mistakes and headaches compared to other parts in the application. (Even with "proper" use of Data Bindings Models). Now I am writing computer games ). I worked with one GUI so far Miyagi (not well known, but basically the same Idea as all the other systems.) It was horrible. For real time rendering environments like Games, I get the feeling that "retained" GUI systems are even more obsolete. User interfaces usually don't need to be auto layouted or have resizable windows on the fly. Instead, they need to interact very efficiently with always changing data (like 3d positions of models in the world) A couple of years ago, I stumbled upon "IMGUI" which is basically like an Immediate Graphics mode, but for user interfaces. I didn't give too much attention, since I was still in application development and the IMGUI scene itself seemed to be not really broad nor successfull. Still the approach they take seem to be so utterly sexy and elegant, that it made me want to write something for the next project using this way of UI (I failed to convince anyone at work (...) let me summarize what I mean by "retained" and "immediate" Retained GUI In a separate initialization phase, you create "GUI controls" like Labels, Buttons, TextBoxes etc. and use some descriptive (or programmatical) way of placing them on screen all before anything is rendered. Controls hold most of their own state in memory like X,Y location, size, borders, child controls, label text, images and so on. You can add callbacks and listeners to get informed of events and to update data in the GUI control. Immediate GUI The GUI library consists of one shot "RenderButton", "RenderLabel", "RenderTextBox"... functions (edit don't get confused by the Render prefix. These functions also do the logic behind the controls like polling user input, inserting characters, handle character repeat speed when user holds down a key and so on...) that you can call to "immediately" render a control (doesn't have to be immediately written to the GPU. Usually its remembered for the current frame and sorted into appropiate batches later). The library does not hold any "state" for these. If you want to hide a button... just don't call the RenderButton function. All RenderXXX functions that have user interaction like a buttons or checkbox have return values that indicate whether e.g. the user clicked into the button. So your "RenderGUI" function looks like a big if else function where you call or not call your RenderXXX functions depending on your game state and all the data update logic (when a button is pressed) is intermangled into the flow. All data storage is "outside" the gui and passed on demand to the Render functions. (Of course, you would split up the big functions into several ones or use some class abstractions for grouping parts of the gui. We don't write code like in 1980 anymore, do we? )) Now I found that Unity3D actually uses the very same basic approach to their built in GUI systems. There are probably a couple of GUI's with this approach out there as well? Still.. when looking around, there seem to be a strong bias towards retained GUI systems? At least I haven't found this approach except in Unity3D and the original IMGUI community seems to be rather .... .. quiet. So anyone worked with both ideas and have some strong opinion? Edit I am most interested in opinions that stem from real world experience. I think there is a lot of heated discussions in the IMGUI forum about any "theoretical weakness" of the immediate GUI approach, but I always find it more enlightening to know about real world weaknesses.


zoom to cursor calculation I want to be able to zoom in and out of the map using the scroll wheel. I want to zoom towards the cursor like google maps does but I'm completely lost on how to calculate the movements. so far, all I have is the resizing but I now need to change the map position. What I have map x and y map width and height cursor x and y. Any help would be most welcome.


Tech Tree layouts for games? I'm trying to do a tech tree GUI for my game, but i have limited width and the tree has alot of branches, the problem is if I make them small to fit the width, the tech tree is too small to read. For example the AOE one is very large (in width) I could allow scroll bar but as its web based, scrolls are quite ugly. So i was wondering how to deal with branches which slowly cause the tech tree to get wider as you go down the tech tree and how you would fit such a design in a limited space. Are there different known designs for tech trees that any one knows of so i can look at their types. I don't know the names given to the types of tech tree layouts. But am hoping to find one that is not overly complex for the user aswell.


HTML5 Game (Canvas) UI Techniques? I'm in the process of building a JavaScript HTML5 game (using Canvas) for mobile (Android iPhone WebOS) with PhoneGap. I'm currently trying to design out how the UI and playing board should be built and how they should interact but I'm not sure what the best solution is. Here's what I can think of Build the UI right into the canvas using things like drawImage and fillText Build parts of the UI outside of the canvas using regular DOM objects and then float a div over the canvas when UI elements need to overlap the playing board canvas. Are there any other possible techniques I can use for building the game UI that I haven't thought of? Also, which of these would be considered the "standard" way (I know HTML5 games are not very popular so there probably isn't a "standard" way yet)? And finally, which way would YOU recommend use? Many thanks in advance!


Application toolkits like QT versus traditional game multimedia libraries like SFML I currently intend to use SFML for my next game project. I'll need a substantial GUI though (RPG strategy type) so I'll either have to implement my own or try to find an appropriate third party library, which seem to boil down to CEGUI, libRocket, and GWEN. At the same time, I do not anticipate doing that many advanced graphical effects. My game will be 2D and primarily sprite based with some sprite animations. I've recently discovered that QT applications can have their appearance styled so that they don't have to look like plain OS apps. Given that, I am beginning to consider QT a valid alternative to SFML. I wouldn't have to implement the GUI functionality I'd need, and I may not be taking advantage of SFML's lower level access anyway. The only drawbacks I can think of immediately are the learning curve for QT and figuring out how to fit game logic inside such a framework after getting used to the input update render loop of traditional game libraries. When would an application toolkit like QT be more appropriate for a game than a traditional game or multimedia library like SFML?


Need help with making a journal system My game uses a system similar to Metroid Prime's logbook, in that it logs things the player encounters and discovers on their journey, categorizing it, etc. I want to write out all of the possible entries they can find, with the categories and all, but I need a system similar to what'll be in the final product to toy with, and use as an example for when it gets implemented into the game itself. A click through menu sort of thing. Writing out all of these long descriptions would be too much of a hassle in a regular text document (and would make it FAR too long), and doing it through HTML or something sounds far too messy. Basically, I want something, like an app, that I can edit, and that'll let me click through the categories till I get to the entry I want, which should display on the side. Here's a really terrible example of what I'm looking for. I'm probably stupid for asking this, and there's likely an extremely obvious solution to this, but I have a thousand other things related to the game to think about, and Googling didn't result in anything.


How to get text width in pixels in direct2d I am making the simple editor on direct2d and i want to make adaptive buttons size. When i create a button i pass text to it and a button gets width based on text width in pixels. I have tried to use IDWriteTextLayout and the method GetMetrics but i get the weird result where height more than width. D2D1 SIZE F Direct2D get text size(const char text) IDWriteTextLayout text layout NULL DWRITE TEXT METRICS text metrics wchar t wtext char string wchar(text) HR(write factor gt CreateTextLayout(wtext, wcslen(wtext), text format, 0.0f, 0.0f, amp text layout)) text layout gt GetMetrics( amp text metrics) DELETE ARRAY(wtext) RELEASE COM(text layout) D2D1 SIZE F size size.width text metrics.widthIncludingTrailingWhitespace size.height text metrics.height return size


How do Nethack frontends work? I have been trying to learn about GUI frontends for Nethack, but I have been unable to determine how do they get the game information (map, inventory, player info, enemy locations, etc) from Nethack? As in, is there some API that allows these frontends to query these information? If so, how are they used? I have looked up everywhere but unable to find any documentation that describes how to do so.


Error in DRAW GUI event on android. Image of the game on a mobile phone As you can see the maze (draw event) has been resized correctly. But the yellow post it (draw GUI event) has not been scaled or displayed in the correct location (center of the screen). Same thing with GUI layout (draw GUI event). Because this is a small stage room (size) I do not use the artifice of views, I thought that could be because of that the problem, but I enabled the views and did not get any different result. Picture of the game on a computer (like it should be on the phone) OBS One information that can help you to help me solve the problem, is that to draw the post it I use the following code draw GUI event draw sprite(spr Post,0,640,360) . 640 is the half screen width of the game and also the room, 360 is half the height of the game screen and also the room. It seems that somehow the room on the cell phone is different size than 1280x720. I do not put the following code draw GUI event draw sprite(spr Post,0,room width 2,room height 2), because there are much larger phases that need views, so the post it needs to be in the center of the screen of the player, and with this code it ends up being in the center of the phase. I tested the game on Bluestacks and it did not happen the same as on the phone.


Differences between storyboarding for game design vs. web design I'm looking to UX and storyboard out a web adventure game. The goal being to have an area to show what the UI UX would look like (mockups), and ability to add dialog blurbs to describe the screen. I was thinking InVision, but that seems strictly for web development mockups. I could also simply draw them in Photoshop or on paper, but was looking more for something game design specific. Are there significant differences between storyboarding for game design as opposed to web design? If so, how do UX or storyboarding tools cater to those differences?


What interchange format should I use for e.g. subtitles and UI texts? Are there any standard formats that can be used as the source material for game texts (i.e. subtitles, UI texts, etc.)? I can think of the following constraints at least some style effects (e.g. bold, italics) at least some format string support (e.g. you found d gold, you found count gold) be translator friendly either easy to grasp, or standard enough that translation companies may already have experience with it I know about the following but none of them appear to support format strings. Are there any industry standards for that or does every game or engine roll their own format? UE4 uses a custom rich text format (example Hello lt RichText.Emphasis gt everyone lt gt !) Unity uses its own HTML like format (example Hello lt b gt everyone lt b gt !) the srt format uses HTML like syntax, too (example Hello lt b gt everyone lt b gt !) BBCode is another popular format (example Hello b everyone b !)


Display a variable in the UI I have been searching and searching for an answer to this question but nobody seems to be helping me. I have wasted the past two hours trying to figure out how to do this, so please help me out here. I am making a FPS game in Unreal Engine 4, and I want to display ammo. I can do that fine, but changing the text of the UI displaying the ammo is turning into a nightmare. I need to access the text label variable Inside of the blueprint that handles the actual gun firing From there I should be able to adjust the text to match what my ammo is. Unfortunately, no matter what I try, I cannot change the variable in my blueprint. I can't even make the variable public to begin with! What do I need to do to accomplish this?


Technical term for the border that appears around the screen, usually in response to low health? This had a strange term but I can't remember what it's called and it's difficult to search for.


How can I implement dynamic button size? I'm on the process of planing a sort of a 2D 2.5D, pixel art multilingual game, while I learn about game development. I have a pretty solid background at programming, but when it comes to game design, I don't know too much. My particular question is about how is the proper better way of creating and implementing a game text button, but I suppose it can be applied to other GUI elements. What I have found so far, while "googleing" looking for this specific question, is how to deal with engines or frameworks which have their own way of doing it, but I would like to do it by my own. So to make things clearer, let me expose my vision of potential approaches. Fixed text in a fixed size texture This is an easy way of implementing a text button, as all I have to do is loading and positioning a texture. However, it could be painful to change my .psd files all the time, as I'm working with a multilingual game. Variable text and fixed size texture I could use a texture as a button model and overlap it with all kinds of text of different languages, reading the texts from .xml files. The problem is that a word in a language can exceed its equivalent of another language. A workaround for this could be switching between different font sizes, i.e., a text in a language would be smaller or larger than in another, but this would look ugly. Variable text and splitted texture This approach would divide a button texture into 3 different parts left, middle and right. Then, I would read a text from a .xml file, measure its length in pixels and increase ("multiply") the "middle" part of the texture so that the text could fit on it. This looks fine when working with a pixel art game GUI, but sounds not fine when working with vectorized images. Dynamically generated GUI I could use OpenGL to render rectangles and use them as buttons, but this would produce quite basic shapes. At most, I would have shaded rectangles with a basic border and some text rendered on it it would look like a HTML CSS GUI, which is a way far from a game GUI. These approaches are just my guesses, as I've never worked in the game industry I assume that someone experienced can correct me if I deduced something wrong. Another thing is that I think these approaches can work diffently depending of the texture type (e.g. pixel art and vectorized textures), so you'll be welcome for answering why an approach is better for a texture type or another. There's also a possibility of me being a bad thinker and all of this being a "bullshit", and if it is the case, I hope you share your technique with me. Moreover, as I said before, this question is specific for a text button, but I think with some adjustments it could cover more GUI elements which have related properties (such as window, text input and the like), so if you include it as part of your answer, it'll be helpful.


Godot tween animation playing order I'm making a three in line game with godot, but i'm having an issue. First time when swapping cells, the animation of swapping and the elimination of cells (in the case of making 3 or more cell aligned in a line) played both at the same time. So i refactored a bit the code, now i have queue for each cell that manages the animation to be played one by one. Now my problem is this, the cells that the player swaps, they do fine, the play the swap animation then the elimination animation. the problem are the other cells in the line, those get removed as the first cells are playing the swap animation first and then elimination animation. Step 1 Step 2 cells in line remove animation nothing swaped cells swap animation remove animation in case i didn't explained well i left a more graphic description of the flow of the animation steps. this is how i want the animation to be played Step 1 Step 2 cells in line nothing remove animation swaped cells swap animation remove animation I'm not sure how to solve the problem, each cell manages their animations in the queue.


Is it possible to have a script built in into a custom resource? Here's a rudimentary custom resource extends Resource export(Resource) var scr I can drag a pre made .gd script into this exported property in Inspector, and it works as intended. I can click on the exported property field and embed a resource (like "New ShaderMaterial"), and it would also work as intended, and I would be able to edit that sub resource normally. However, if I click on the exported property and select "New GDScript", there doesn't seem to be a way to open the new gdscript for editing. Is it possible to embed a gdscript sub resource the same way you can embed a different sub resource?


Add a sound to all the buttons in a project Is there an option on the texture button or something like that where you can specify a sound to be played on button press. I have created a global sound manager but for the button presses, I have to manually code it everywhere the script has a button pressed signal. Or some kind of logic that when a button is pressed anywhere in the project, sound manager plays a particular sound.


Godot doesn't loop the sound Basically it's the sound of a fuse for a bomb, until the timer sends the signal the sound should stop playing and play the explosion sound, but right now only plays once and the stop. What i did wrong what i did missed? the code i use for the bomb scene extends StaticBody2D func ready() AnimatedSprite.animation quot bomb quot CollisionShape2D.disabled true BombTimer.start() FuseSound.play() func on BombTimer timeout() AnimatedSprite.animation quot explosion quot CollisionShape2D.disabled false RemoveTimer.start() ExplosionSound.play() func on RemoveTimer timeout() queue free() func on Bomb body entered(body) print( quot bomb collided with quot body.get name())


How to seperate gui input from world input? I have a GUI interface and a player that hase code to detect when the mouse is pressed. When i mess with my GUI buttons the code for the player also fires off an undesired behavior. The code in the player is meant for mining or using his current item not meant for buttons. Some people have suggested using unhandled input and mouse filters, but i havent gotten either of those to work. Im just wondering what the common thing to do in the situation?


Linux Mint Godot window when ran very small I am running my game on Linux Mint 20 Cinnamon. When I run my game I get a very small window that is about 1 pixel tall. This happens across all projects. I have tried uninstalling Godot and reinstalling it from the package manager. I have also tried the official launcher from their website. Updating through update manager does not help as well. I get the same issue using Godot 3.2.2 and 3.2.3


"ui is not declared in current scope" error I just started development for a game I have to design for school. When using gd in the script to make the character move right I get an error extends KinematicBody2D var motion Vector2() func physics process(delta) if input.is action pressed(ui.right) motion.x 100 move and slide(motion) This is the line that is giving me problems if input.is action pressed(ui.right) and it keeps saying that ui is not declared in the current scope


How to know if an overriden method calls its super method or not? Consider this situation, where a Player class inherits from a more general Actor class Actor.gd class name Actor extends KinematicBody2D func ready() print( quot I am an actor quot ) foo() func foo() print( quot I was thinking I was an actor quot ) Player.gd class name Player extends Actor func ready() print( quot I am a player quot ) func foo() print( quot I was thinking I was a player quot ) When one instantiate a player in a scene, we have this output I am an actor I was thinking I was a player I am a player How to know when a method will call its super class?


Godot and getting files via HTTP So, I am wanting to use Godot to get a (binary) file using HTTP and then either save it or, even better, turn it into a Resource in memory that I can use. It'll be WAV files that I'm getting in return (trying to implement MaryTTS, which is running as a server on localhost). I had a look at the docs for HTTPRequest, but can't seem to get a working solution. I do HTTPRequest.request("http ...") when a keypress is made, and I have the on HTTPRequest request completed() function, but this never seems to be called. I tried with the function in the same Node as the request (as per the docs' example), and I also tried putting it as part of a script for the HTTPRequest Node. If I hit the triggering key fast enough, it gives an error ("HTTPRequest is processing a request"), but if I do it slower, it doesn't give that error, so it appears it is finishing. It just doesn't do anything when it finishes. HTTPRequest gives a return value of 0, which I assume means no error? (Or should this give me HTTP status codes?) Any idea what I'm doing wrong? Can HTTPRequest handle binary files? How do I get this working? (Any suggestions on a better way to implement MaryTTS are also welcome).


Change object's location at instantiated moment I'm trying to instantiate object(scene) and set it's spawn position at the spawn time. Here's the code I wrote func spawn asteroid() var spawn position Vector3 get spawn position() var asteroid instance asteroid scene.instance() asteroid instance.transform.origin spawn position spawned asteroids.append(asteroid instance) add child(asteroid instance) asteroid scene is PackedScene, so get instance first, and then update it's position, and finally use add child to append current scene's tree. It seems fine to me, however when I run the game, the object was spawned at (0,0,0) and then move spawn position. I changed it's position before it appended to scene, but why it still (0,0,0) and right after move to the specified position? In Unity, change object's location right after instancing works. In Godot Engine, is this approach invalid?


Why does the kinematic body move in opposite direction after I interpolate its movement, and how do I fix it? I have added some basic movement and some manual interpolation to a cube that is a kinematic body in Godot. extends KinematicBody var speed int 10 var slowdown buffer 0.2 var movement Vector3(0,0,0) func ready() pass func interpolate() if movement.x gt 0 movement.x slowdown buffer elif movement.x lt 0 movement.x slowdown buffer else movement.x 0.0 func physics process(delta) if Input.is action pressed( quot left quot ) movement.x speed elif Input.is action pressed( quot right quot ) movement.x speed else interpolate() move and slide(movement) The problem is that when I move the cube using A and D, after the cube stops after the interpolation, it starts moving in the opposite direction with a non increasing speed. How can I fix this?


What should I enter in Debug user and Release User in android export section in Godot? I just want to export to android. I have tried by adding my name, I got install error.


Godot 3.X Implementing a smooth movement for pitch, yaw roll I'm implementing pitch, yaw and roll on airplane object, but when rotating the object (either pitch, roll or yaw), it starts rotating slowly but then the rotating movement goes awfully fast very quickly. it's quite jarring. i'm not sure how to make more smooth. The issues I think the problem lies in the acceleration when the object rotates, i want to be an uniform speed Other problem from this code, it's that if want to change the rotating direction it's slow to change, takes a while to rotate to the opposite direction The player input code extends Node const MAX CAM ANGLE 30 var pitch dir 0 var yaw dir 0 var roll dir 0 var thrust 0.5 var input '' func ready() DebugStats.add property( Plane, quot transform origin quot , quot round quot ) DebugStats.add property( Plane, quot force quot , quot round quot ) DebugStats.add property( Plane, quot torque quot , quot round quot ) DebugStats.add property(self, quot pitch dir quot , quot round quot ) DebugStats.add property(self, quot input quot , quot quot ) func physics process(delta) process inputs(delta) process movement(delta) func process inputs(delta) if Input.is action pressed( quot p1 fire quot ) Plane.fire weapon() input 'fire' if Input.is action pressed( quot ui up quot ) thrust delta input 'accel' if Input.is action pressed( quot ui down quot ) thrust delta input 'slow' if Input.is action pressed( quot p1 pitch up quot ) pitch dir delta input 'up' if Input.is action pressed( quot p1 pitch down quot ) pitch dir delta input 'down' if Input.is action pressed( quot p1 roll left quot ) roll dir delta input 'yaw left' if Input.is action pressed( quot p1 roll right quot ) roll dir delta input 'yaw right' if Input.is action pressed( quot p1 yaw left quot ) yaw dir delta input 'yaw left' if Input.is action pressed( quot p1 yaw right quot ) yaw dir delta input 'yaw right' if Input.is action pressed( quot ui quit quot ) get tree().quit() TODO Adjust values to make movement more smooth func process movement(delta) thrust clamp(thrust, 0.2, 1) pitch dir clamp(pitch dir, .6, .6) yaw dir clamp(yaw dir, .6, .6) roll dir clamp(roll dir, .6, .6) Plane.calc force(thrust, pitch dir, roll dir, yaw dir) The plane movement script extends RigidBody const v3 Vector3(0, 0, 0) const scalar z Vector3(0, 0, 1) var force v3 var torque v3 var drag v3 var lift v3 var thrust v3 const MAX THRUST TURN 150 const MAX THRUST 1 temporal value just to debug the rotating problem const MAX CAM ANGLE 30 const DRAG CONST 1 temporal value just to debug the rotating problem Calculates flying speed and direction func calc force(thrust, pitch dir, roll dir, yaw dir) var speed MAX THRUST (thrust) var drag coef DRAG CONST MAX THRUST MAX THRUST thrust transform.basis.z ( speed) drag transform.basis.z drag coef lift transform.basis.y drag coef force thrust drag lift var pitch global transform.basis.x pitch dir MAX THRUST TURN var yaw global transform.basis.z yaw dir MAX THRUST TURN var roll global transform.basis.z roll dir MAX THRUST TURN torque pitch yaw roll Applies all force at once in the airplane object func integrate forces(state) add central force(force) add torque(torque) How i can make the rotating movement more smoother? Note this is an arcade game, not really interested in a complex solution for the physics. Note 2 if you want to test it, you can check out here https github.com balmeidaa godot sky aces


How do I remove the window border in Godot? I want to show my Godot engine game in a borderless window, but not fullscreen. I want to just have the game view visible on screen with no title bar or window chrome.


Is there a way to run a tool script without attaching it to a node in the scene tree? What I want to do is run a tool script on the editor. The usual way would be to attach it to a scene tree node, but then I'd have to guard it with ifs all over to prevent editor code to be run at runtime and viceversa. I could instantiate the script and run it directly without it being attached to a node, but the script that instantiates that script would have to be tool too, so not getting rid of the problem. I guess I could create a node in the scene tree with a tool script attached, that removes itself from the scene tree once the game is running. Is there a more elegant way of doing it? Like some kind of project setting to run a tool script on project load?


How can I change the default New Project directory in Godot Engine? When I go to create a new project in Godot Engine (version 3.2) my Project Path is always the original default directory, no matter what path I last used. There doesn't appear to be any configuration inside the Project List window. How can I change the default project path for new projects?


How signals work when Node2D is queue freed? Consider this setup KinematicBody2D (Player) Sprite (icon.png) VisibilityNotifier2D With Player.gd class name Player extends KinematicBody2D signal unvisible onready var visibility notifier VisibilityNotifier2D VisibilityNotifier2D func ready() gt void visibility notifier.connect( quot screen exited quot , self, quot on screen exited quot ) func on screen exited() gt void emit signal( quot unvisible quot ) Now I have a template Level.gd Node2D (Level) Player extends Node2D onready var player Player Player export var debug no enemy false export var debug no player true func ready() gt void player.connect( quot unvisible quot , self, quot reset level quot ) if debug no player player.queue free() func reset level() gt void print( quot reset quot ) get tree().reload current scene() The print statement proves that this setup make a kind of infinite loop of reset because the signal screen exited is still emited when the player is queue free. Is it expected? I am even more surprised with this modified version which produces the same thing func ready() gt void if debug no player player.queue free() player.connect( quot unvisible quot , self, quot reset level quot )


How can I remove Godot's splash screen? I started using Godot lately (mostly because the editor supports Linux). There is one thing that bothers me the Godot splash screen. I know that I can (somehow) remove it and I saw something about C but I'm not sure. Is there any way to remove it? Or maybe it is only in the editor and once you export the game it'll disappear?


GET and POST requests in gdscript How do I perform get and post requests from Gdscript in Godot? I am trying to get a map API and use it in the game.


Godot Collision for character teleportation I'm currently working on a little game to discover Godot game engine. It's a Top Down game and I want my character to be able to teleport through walls. I thought to dupplicate my character's collision box and to set its position to the teleportation's position but I didn't find a way to check if there is a collision to this new position. Any advise?


Can't find sibling node, keeps giving "null instance" I'm trying to set it up so that there are three buttons but only one can be toggled at a time. So when one button gets toggled it makes sure that the other two are not toggled. The code is trying to set the toggled status however since it can't find the node I'm at a loss. var vec Vector2(0,1000) var ori Vector2(0,0) func ready() pass func on Ally1 Button toggled(button pressed) if button pressed set position(ori) Player Button.set pressed(false) else set position(vec) This is what the tree looks like. The Player Ally1 ui is trying to access Player Button but as stated it can't seem to find it and just returns null. Any help is greatly appreciated, thank you in advance.


How to have a tilted FNT font on Godot? Since FNT is a bitmap font I was thinking perhaps making the padding negative to the right and left side of the characters and rasterizing each glyph already skewed by an angle could make the font appear to be tilted. Does any one know whether FNT sports negative padding or whether Godot support some form of skewing that could accomplish that? Please take a look at the image to see what I'm describing


Error(45,74) Identifier 'collision' is not declared in the current scope func physics process(delta) direction Vector3(0, 0, 0) if Input.is action pressed("ui left") direction.x 1 if Input.is action pressed("ui right") direction.x 1 if Input.is action pressed("ui up") direction.z 1 if Input.is action pressed("ui down") direction.z 1 direction direction.normalized() direction direction speed delta if velocity.y gt 0 gravaty 20 else gravaty 30 velocity.y gravaty delta velocity.x direction.x velocity.z direction.z velocity move and slide(velocity, Vector3(0, 1, 0)) if is on floor() and Input.is key pressed(KEY SPACE) velocity.y 10 var hitCount get slide count() if hitCount gt 0 var collision get slide collision(0) if collision.collider is RigidBody collision.collider.apply impulse(collison.position, collision.normal)


Using add force and add torque to turn a RigidBody2D Godot Scene tree Scene (Node2D) RigidBody2D (Parent of Sprite and CollisionShape2D initially points to X direction 90 degrees) Camera2D When I use apply force() with ui up key, the Vehicle moves correctly and remains in motion. However when I use apply torque impulse() (such as ui right) it turns but, then the Vehicle is moving slipping sideways instead of towards the new direction. If I stop the motion by reversing the thrust, then start again it moves correctly in that new direction. Seems I have to do some vector math math on the value of torque but I am not sure what. extends RigidBody2D var thrust Vector2(0, 100) var torque 1024 var cot Vector2(0,0) var speed int var direction int func ready() set physics process(true) set process input(true) can sleep false speed 0 direction 0 func integrate forces(state Physics2DDirectBodyState) if Input.is action just pressed( quot ui down quot ) speed 1 add force(cot, thrust.rotated(rotation)) if Input.is action just pressed( quot ui up quot ) speed 1 add force(cot, thrust.rotated(rotation)) if Input.is action just pressed( quot ui right quot ) direction 1 apply torque impulse(torque) if Input.is action just pressed( quot ui left quot ) direction 1 apply torque impulse( torque)


How to inspect child nodes in IDE debugger? Consider an enemy with this node hierarchy KinematicBody2D (Enemey) Sprite CollisionShape Area2D (StompDetector) CollisionShape2D With signal from StompDetector to Enemy func on StompDetector body entered(body Node) gt void if body.global position.y lt StompDetector.global position.y die() gt gt BREAKPOINT lt lt That does not work as exepcted. How to inspect StompDetector from the debugger at BREAKPOINT?


How to create bullet hole decals in Godot engine? How can you create decals such as bullet holes in Godot? Godot doesn't seem to have any native method of creating decals. I am trying to create decals so that bullet holes will be displayed properly on curved and angled surfaces and corners. I have tried a few plugins, but none of them worked, they all either had a texture stretching issue or they didn't work at all. For example, when I tried using the Screen Space Decals plugin (https godotengine.org asset library asset 241), it did draw decals when a texture wasn't provided (a simple black rectangle by default), but when I assigned the bullet hole texture to the decal property the bullet holes became invisible. What would be an ideal method of creating decals in Godot?


How to get a consistent behavior for a rigid body hooked platform? Consider this platform made of RigidBody2D and PinJoint2D objects PinJoint2D setup is Softness 0 Bias 0.9 When I set the mass of the platform with high value, the structure starts to shake like this Why is this happening and how to fix that?


How do I add an object to the node tree at a specific position I'm making a skiing game, and a part of that is programmatically adding snow to the scene in a specific place. It will all be the child of a single node. I was looking through the Flappy Bird code but when it instances a scene, it only uses the function add child(). There doesn't seem to be a way to set its position. Here is the project on github.


How to change FPS when using a sprite sheet and AnimationPlayer? With AnimatedSprite it is easy to change FPS. Is there a convenient way to do that with AnimationPlayer?


How to make two keys pressed to make an action? Hey i am beginner gamedev. I couldn't find answer to this or I am bad articulating my problem. But really would like an answer to this. How can i make function to press two keys like A and D at the same time to make a jump animation if A and D are already taken separately to A walk left and D to walk right? Without them overlapping. func input(event) if event.is action pressed( quot left quot ) amp amp event.is action pressed( quot right quot ) DancerSprite.play( quot bluedouble quot ) if event.is action pressed( quot left quot ) DancerSprite.play( quot blueleft quot ) return elif event.is action pressed( quot right quot ) DancerSprite.play( quot blueright quot ) return


How do i get effect when gems come together in godot? I'm create gems puzzle game, In my game there is requirement that 2x2 matrix gem will group and then it will convert in power gem. check below image. I'm new in game development, so anyone can point me out ? any suggestion or link will be helpfull. Thank you


What is the efficient way to sync TextureProgress with a Timer not in the UI? I want to use a TextureProgress which reflects the state of a Timer. I have tried to emit signals FROM the Node2D. process() which owns the Timer with emit signal( quot time left changed quot , timer.time left) TO the UI but it seems to make huge impact on performance.


How to handle multiple clipping rectangles in a CanvasItem? Let's say I have a CanvasItem that needs to draw the background first, occupying the entire item rect, and then draw all its content within a smaller rect leaving a margin. How should this be done in the NOTIFICATION DRAW within notofication? This is what I've tried void MyCustomItem notification(int p what) case NOTIFICATION DRAW Enable clipping VisualServer get singleton() gt canvas item set clip(get canvas item(), true) draw background() Clip to margins VisualServer get singleton() gt canvas item set custom rect(get canvas item(), true, Rect2( Point2( MARGIN LEFT, MARGIN TOP ), Size2( width MARGIN LEFT MARGIN RIGHT, height MARGIN TOP MARGIN BOTTOM ) )) draw stuff() The problem with this is that it will clip everything to the margins including the background.


Godot play video after file load I used WebM video in my game but it's lagging. The audio is few secs delayed then video. Is there any way to load the video first then play so that the lagging doesn't occurs


In Godot browser game, is it possible to let the player download a file? I have a Godot game exported to the browser. I want to let the player export some data and let it save the data as a file on their PC, as if they were downloading a file from the Web. Is it possible for me to do that?


How do I access a variable from my code in Godot's editor? In Godot, I have a node with a variable that I often need to tweak for balancing purposes. It would be a lot easier to manage if I could modify it inside the editor instead of the code. How would I go about doing this?


Despite the connect() method returning 0 (enum), the function specified in the connection is not called The subject script extends ColorRect onready var subject get parent().get node('Page1') func ready() var error subject.connect('set timer', self, 'ad') func ad() print('signal connected')


How to get current Microphone Frequency in Godot Let us say I want to create a singing game similar to SingStar, and for this purpose I want to get the audio pitch the microphone is getting, in real time, or as close as possible. I know I can get audio input in Godot. Even record the microphone to a file, there is an official demo project that does that (mic record). I also know there are libraries that can analyze the audio. How can I get the microphone pitch in real time? Yes, I'm answering my own question. This question is inspired on a similar one on StackOverflow, which asked for a library to do this, which lead to the question getting closed, and the asker deleted it instead of editing the question Before I noticed. As it turns out, you don't need libraries to do this. This is a means to answer the question I believe that person should have asked.


How should bullet reflections be implemented? Im working on a tank game where bullets are relected off of walls. The formula for a relfection is r d 2d n n 2n where d is the incoming vector and n is the normal of a wall. My bullets stick to the walls and then quot bounce quot off at the corners an undesirable effect. Im honestly questioning my formula implementation at this point. func collision() for i in get slide count() var collision get slide collision(i) if collision.collider.is in group(globals.wall group) var normal collision.normal velocity velocity ((2 velocity.dot(normal)) normal.length squared()) normal rotation velocity.angle() PI if i use the is on wall function and simply negate the velocity this does produce a bouncing effect but not a correct one. I still need the normal. I orignally used rigid bodies as seen in the image. But i have switched to kinematic bodies.


Is it better to connect signals in source code or with the IDE feature? In Godot IDE, what are the advantages and the caveats of using the visual IDE to connect signals to listerners instead of doing this var state bool onready var countdown Timer Countdown func ready() gt void state true countdown.connect( quot end quot , self, quot toggle quot ) func toggle() gt void state not state


How to draw text with characters rendered in reverse order in a Godot game? I need to have some text showing up in my Godot game in a way that each character overlaps the character directly to its right, like so Using a BMFont (.fnt) in a Label node with the values of xadvance specified in the font smaller than the characters width I get this What approach can I use to still be able to use my .fnt font and also store the text with the characters in their natural order, as it would be stored for using with a normal Label or Button control? Which would help for language localization purposes.


How do I decrease the scale of an instanced node or scene? I'm trying to decrease size of instanced RigidBody2D scene, through code. With scale(), I'm trying to decrease the size of the image sprite that's attached to the RigidBody2D. The problem is, it's not working. No matter how much I try to scale down, the size of the blood drop circle remains the same. const blood druple scn preload("res Scenes blood.tscn") func spawnBlood() var newBlood Blood druple scn.instance() rotationAdd rotationAdd 30 if(switchBloodSize 0) set scale(Vector2(2,1)) This part is my problem print("blood size ", newBlood.get scale()) add child(newBlood) switchBloodSize 1 elif(switchBloodSize 1) newBlood.scale(Vector2(0.5,0.5)) This part is my problem print("Blood size ", newBlood.get scale()) add child(newBlood) switchBloodSize 0 newBlood.set pos(Vector2(100,100)) rotate(rotationAdd) As you can see, I have two different if conditions, each with a different scale() and size. Sadly, both remain the same size. The strange part is that it does display the scale values as been altered, yet the newBlood instance is not visually changing. Why is this?


How to make a 3D mesh invisible in Godot? Just like the title says i'm trying to make the mesh disappear after a set value reaches zero. Current code is trying to simply turn the entity invisible so that later i can implement a resurrect function. if Sname get node("Entity").get name() print("punched number 1") selected.health selected.health 10 if selected.health lt 0 selected.health 0 get node("Control Button").disabled true Entity.visable false Is it even possible to toggle that value or is there an easier way to do this? I dont want to use free queue() as that would interfere with other entitys. Thanks for the help in advance, im new to Godot so sorry if this ends up being a no brainer.


How do I attach the Visual Studio Code debugger to Godot At 3.0 Godot now supports C and encourages the use of Visual Studio Code to edit this code. It is not clear how to attach VS Code so that we an apply breakpoints and debug a project at runtime. I am running A recent build of Godot from master (b49ca94 with mono for 64 bit windows) Visual Studio Code 1.21.0 with these extenstions C 1.14 Mono Debug 0.15.8 Mono 5.10.0


Difference between process(delta) and physics process(delta)? The documentation is pointing one main difference, this is the concept of being synced or not with the physics engine, so the delta parameter has more chance to be constant in physics process(delta) than in process(delta). But I am pretty sure that no one counts on that. And that everybody checks the value of delta in physics process(delta). So what are the different use cases of those two functions?


How can I cull non visible isometric tiles? I have a problem which I am struggling to solve. I have a large map of around 100x100 tiles which form an isometric map. The user is able to move the map around by dragging the mouse. I am trying to optimize my game only to draw the visible tiles. So far my code is like this. It appears to be ok in the x direction, but as soon as one tile goes completely above the top of the screen, the entire column disappears. I am not sure how to detect that all of the tiles in a particular column are outside the visible region. double maxTilesX widthOfScreen halfTileWidth 4 double maxTilesY heightOfScreen halfTileHeight 4 int rowStart Math.max(0,( xOffset halfTileWidth)) int colStart Math.max(0,( yOffset halfTileHeight)) rowEnd (int) Math.min(mapSize, rowStart maxTilesX) colEnd (int) Math.min(mapSize, colStart maxTilesY) EDIT I think I have solved my problem, but perhaps not in a very efficient way. I have taken the center of the screen coordinates, determined which tile this corresponds to by converting the coordinates into cartesian format. I then update the entire box around the screen.


How can I implement (almost) infinitely large maps in Unreal Engine 4? I'm making a game where a helicopter travels around. I'd like that the environment around be as realistic as possible. For instance, since the helicopter can travel at speeds up to 200 km h, I want the player to see very far away, in a realistic fashion. I'm talking about a map where let's say there is a "real" mountain 50km away and you could "walk" there, as well as the mountain looking like a mountain in game from the any distance (no matter the quality). How could I manage my map in UE4 that would allow me to implement such a "real" world?


Best way to let the player know there are multiple solutions to a problem?(and force them to play again) I am going to work on a map for my game that is in first person mode. This is the story(planned). He is on a sinking ship and he wants to escape before the ship sinks. He has a few ways of doing so, either with the on board seaplane or an emergency raft. Both methods will lead the player to different maps in the game. So here is the question How can I notify the player that there is another way of "winning" the map if he chooses one. I do not want to just pop out and say "hey you could have used the boat" or even include a progress map of some sorts, but I still want the player to visit the map again in the future to figure out the paths. Any suggestions would be awesome. The lighting would be dimmer as the scene is set at night. There will be blood, grease and other dirty stuff on the player's screen. The ship itself is most probably going to wobble around. edit Sorry that I didn't clarify, but I want to know methods to lure players to play the map again. Methods of letting the player know that there are different methods works, but I think that should not be the only method. I'll change the title.


How can I build a graphical map for my MUD engine? I am working on a text based game totally from scratch and one thing I am not sure how to do is the map system. In my mud engine totally writen in Javascript (that will be executed in a Node.js environment), I use that kind of data to design an area and the links between rooms. 003 004 001 002 007 005 006 var map "001" "Id" "001", "Name" "Room 001", "Directions" "N" "", "S" "", "E" "002", "W" "" , "002" "Id" "002", "Name" "Room 002", "Directions" "N" "003", "S" "005", "E" "", "W" "001" , "003" "Id" "003", "Name" "Room 003", "Directions" "N" "", "S" "002", "E" "004", "W" "" , "004" "Id" "004", "Name" "Room 004", "Directions" "N" "", "S" "007", "E" "", "W" "003" , "005" "Id" "005", "Name" "Room 005", "Directions" "N" "002", "S" "", "E" "006", "W" "" , "006" "Id" "006", "Name" "Room 006", "Directions" "N" "007", "S" "", "E" "", "W" "005" , "007" "Id" "007", "Name" "Room 007", "Directions" "N" "004", "S" "006", "E" "", "W" "" On the MUD game I am actually playing, the mud command display something like this I would like to know in pseudo code the way to do this in the most efficient way. Please note that it has a maximum character length for each lines and that the map is centered around You ( ). Thank you for your help!


What is a good format for a 3d topview map? I am building a 3d topview game like GTA2. In this game the ground is mostly one level (except for tunnels and highways). Most of the ground is also city so the ground is usually covered by either roads or buildings. The buildings are simple 3d models which the player can walk around on. Most of the gameplay is 2d. How should I model the map? I have considered the following options Bitmaps, I think this gives problems when I want to add data smaller than a tile. Also the problem of bridges and tunnels seems hard to solve with this. Polygons, define all roads, terrain types, buildings with polygons and save that along with physics and texture information. What approach would you take or have you ever implemented this or know of an implementation?


How do RPG store and retrieve maps? I'm making a very basic online RPG (2d, and instead of sprites I use characters, like a roguelike) and I still haven't figured out how to store and retrieve maps. Until now I used a text file that are stored on the server. Should I store the map in the database and retrieve it as the player moves around? For example, if the player is in the position x, y , load all the tiles within a 15 tile radius. Or maybe dividing the map in "sections" and then, depending on the player's location load a given section? Which is the best option? Also, if I was to save the map in the database, which is the best data type to store it as a bi dimensional array? BLOB maybe?


Vertical vs horizontal hex grids, pros and cons With hex grids, you can choose to arrange the tiles with the pointy sides up, so that you can move along the west east axis, or you can arrange them with an edge up, so that you can move along the north south axis. Horizontal or pointy side up hex grid Vertical or flat side up hex grid According to this page, the vertical alignment is "by far the most popular" in pen and paper RPGs, but it doesn't explain why. This blog post also mentions both varieties, but again gives no reason to use one or the other. And if you look at some PC games using hexes, it seems both have their adherents Horizontal Heroes of Might and Magic series (except V), Civilization V... Vertical Panzer General and many similar wargames, Battle for Wesnoth... But what are the main reasons for choosing a vertical or a horizontal layout of hex grids? I'm looking for objective advantages and disadvantages in terms of data structures, graphics, gameplay, etc, not personal preferences. Or is it really inconsequential which orientation you choose?


How do I show the current view from the viewport on my map? I'm doing HTML5 Canvas development and currently have a large viewport (on the left) and a map (on the right). Like this I need to show on the map what is currently being viewed in the left. And I'm at a lost on how to calculate this. This is how I want it to be I am manipulating the main viewport via a transformation matrix. like 1, 0, 0, 1, 0, 0 This is decently common functionality in different games and apps. So I assume there are resources on how to do it. But I haven't been able to find any.


How to make a map (game world) based on a real world place or city? As a disclaimer before my real question, I have little experience in game development, only basic Unity knowledge. I noticed a lot of games are based on real world places and cities, for example GTA 5 on Los Angeles and Watch Dogs. What is the process of making such a virtual version of a real world place or city? Or at least, what is a good starting point? I imagine you could get some sort of map data or satellite images and import this in a tool, from which you can start modelling the buildings etc. But if this is the case I don't know how to do that.


Generating a map in runtime for a simple top scrolling racing game I'm creating a simple top scrolling racing game. The concept is quite simple the player controls the car, which goes on a dynamically generated field with square blocks. Once the car hits a car, the game ends. My first implementation was simply to put a few random blocks in each row being generated on the top of the screen, but this does lead to maps where going through is impossible. What is the best algorithm for generating such type maps? My platform of choice is XNA and C , if that's important. EDIT Here's an illustration (pic) In this case, there's no possible way for the player to pass.


Good basemap generator I am currently making a board game and cannot seem to find any vector world map creators where I can select a region of the world to capture and have it download that section. I just want a base map so no city names and preferably no borders. The map doesn't have to be vector if it is of good enough quality.


Good map file structure? I need a map file structure for my game but does anyone know a good way to map it out? I was thinking something like this name MyMap add floor stone solid 20, 640 add playerspawn 20, 620


Spherical map representation My latest game will take place on a small planetoid. I am looking for good data structure for representing cells on the surface of a sphere. Triangles, squares, pentagons, hexagons? Which one minimises stretch the most and creates the best tiling? Spherical mapping is the easiest but the stretch at the poles is unacceptable. Cubemapping is also fairly easy but there would still be considerable stretch near the cube corners. Subdividing an icosahedron seems the best in terms of stretch but there is the problem of indexing many triangular arrays and finding neighbouring cells at the boundaries would be difficult. I guess I could use a single linear array of points representing N gons, each with an array of N neighbour indices, but that seems like a huge waste of space. The game has RTS elements so I will be storing things like influence maps and performing A pathfinding and convolution, so the representation has to be efficient.


How can randomly paired players fairly select a map? I'm developing a website for a board game that revolving around user created boards. Matches are currently created by selecting two people who have been waiting in a queue the longest and creating a match for them. We will later implement matchmaking with specific users. What is an appropriate way to select a map when a match is created with two random people? Should one player be allowed to pick the map? Should a random map be selected? Maybe the players should rank a collection of popular boards by preference, then select the one with the highest average rating?


Entity position In map or in script? I'd like to know how others have handled the issue of storing the entity's position. (Or maybe it's not an issue and I just make it too complicated.) I'm undecided on whether to store the position of each entity in the world map file or in the entity's script file. From what I figured, both approaches have their own good and bad points If you store the entity's position in the map Good Easier to edit the map you can see where the entity will be. Maybe this isn't a problem for integrated map editors, but I'm using an external, general purpose map editor (GLEED2D). Bad Inside the game it's easier to handle data if the position is inside the entity object, not the map object. So when you load the game, you have to gather data from a lot of places to build your entity object. On the other hand, if you store the position inside the entity script, the advantages and disadvantages are exactly the opposite of the above.


Alternative ways to construct maps I've searched around and it seems like most people are using tile based map systems. I suppose, this question is more theoretical than practical (I am not very concerned about memory or performance speed), but I want to know what other ways can a map be created in a game? A map being a graphic representation of terrain that can be navigated, has entrances and exits, and boundaries (no go zones). Besides using text files to store and arrays to load tile data, one idea I had, was to store a map entirely as a graphic file and use queries on the pixel colour to determine boundaries (i.e. you can only move in a certain direction if the way is bright enough in that direction). What other creative map systems are out there?


1D Terrain Generation in Java Not able to implement Perlin Noise for 1D Random Terrain Generation. I've tried everywhere and I cannot find anything useful, sure I sort of understand Perlin Noise but everytime I try it nothing works. I'm using LibGDX in Java if that helps, thanks. Here is the code for P.N. static float Noise(int x) x (x lt lt 13) x return (float) (1.0 ((x (x x 15731 789221) 1376312589) amp Integer.MAX VALUE) 1073741824f) public static float PerlinNoise1D(float x, float persistence, int octaves) float total 0 float p persistence int n octaves 1 for (int i 0 i lt n i ) float frequency (float) Math.pow(2, i) double amplitude Math.pow(p, i) total InterpolatedNoise(x frequency) amplitude return (int) total private static float InterpolatedNoise(float x) int integer X (int) x float fractional X x integer X float v1 SmoothNoise1D(integer X) float v2 SmoothNoise1D(integer X 1) return CosineInterpolate(v1, v2, fractional X) public static float CosineInterpolate(float a, float b, float x) float ft (float) (x Math.PI) float f (float) ((1 Math.cos(ft)) 0.5) return a (1 f) b f public static float SmoothNoise1D(int x) return Noise(x) 2 Noise(x 1) 4 Noise(x 1) 4 and here is the code for the for loop used to render the tiles (assuming my tiles are 32px x 32px) for (int i 0 i lt Gdx.graphics.getWidth() i ) float y PerlinNoise1D(i, 5f, 3) for (int j (int) (y) j lt Gdx.graphics.getHeight() j ) hudBatch.begin() hudBatch.draw(hp, i, j) hudBatch.end() j 31 i 31 P.S I'm sort of trying to create a terraria like game.


How can I handle a transition into building interiors? I am trying some stuff on Unreal Engine to make something approching games like Commandos series. But for now, I'm stuck with something I can't figure how it is done How are building interior handled ? Here's a screenshot to illustrate what I say When you enter a building, everything become black, except the building's interior. The interior is isolated, there is no "communication" between the interior and the exterior, and between linked interiors. For exemple if you shoot with a weapon and there is an enemy outside just behind the door, he can't hear you. Sometimes biggest buildings are divided in many parts, and each floor are a different "section" that are isolated from each other (you have a transition and can't communicate between). Here is an image that explain it well Commandos 2 interior Teleport I first thinked that you were teleported to a different portion of the map, or a different small map, but it is unlikely. If you look at a window, you are at the same time outside (you can see your character outside at the window) and inside (you character is leaning out the window). Teleport would cause many sync issue. Section toggle Then, I thinked that the interior is already handled in the exterior map, but completely hidden, and when you enter it, it "deactivate" the exterior by hidding everything outside and displaying interior. Again, this is unlikely since map are full 3D (you can rotate 360 ) and exterior are 2D. How can I create this kind of transition? I've specified that I am on Unreal, but I'm more searching the theorical way rather than Unreal specifics.


How to write a custom map canvas and project coordinates on it? I am writing a game with Objective C ( xcode ) and I need to use the users location service to mark their position on a map but since I need to create my own map component, I am not able to use the Map framework. Doing this I think I need to project latitude and longitude which I receive from location framework on my custom planar canvas, this is a small part of my game but the other parts are pretty easy or could be done if I could manage to implement this part, however I dont know where to start. did anybody does it before? is it easy to create a map canvas? Any kind of hint and help or sympathy are welcome. Thanks


How to generate tile based natural looking map? I have a tile based map which I generate using interpolation of pixels on a reference bitmap into appropriate tiles depending on the color of the pixel. I'm trying to make the output look natural in which blocks of similar tiles look like they are forming a single entity as in the following image While my version only puts static sprites onto aligned cells, the second image takes forest tiles and smashes them together like a whole single forest. The same is done for the water area. Could someone explain or point me somewhere where I can learn how to make the result of the first image look like the second? Thank you Also, how are the seamless road connections done in the above image?


How to use the SDL viewport properly? I'm very confused about the SDL2 viewport, I did some googling to find out how to implement it but people keep mentioning things like "world coordinates" which I don't have in my game. Question Do I even need world coordinates for the SDL2 viewport to work? If yes, how do I implement it? I've currently got a problem where if my viewport goes too much to the right or down, the entire window will become green, kinda like if it stopped rendering all my sprites. Here's a GIF to show you what I mean As you can see, whenever I go too much to the right or down the entire screen goes green. I thought this maybe was beause of me not using world coordinates, but I have no idea I'm just guessing stuff at this point... My current codes for moving the viewport, drawing it, and such looks like this Creating the viewport camera Camera Camera(Uint16 x, Uint16 y, Uint16 w, Uint16 h) Sets up the viewport positions and sizes viewport.x x viewport.y y viewport.w w viewport.h h Sets the viewport so that SDL uses it SDL RenderSetViewport(Window GetRenderer(), amp viewport) Drawing the viewport (gets called every frame) void Camera DrawCameraViewport() SDL RenderSetViewport(Window GetRenderer(), amp viewport) I set the cameras position during runtime like this void Camera SetCameraPosition(int x, int y) viewport.x x viewport.y y And here's how I set the cameras position using the above function Note Sorry, the line became giantic... camera gt SetCameraPosition( SpriteManager GetPlayerSprite() gt GetPosition().x Window GetWindowMiddlePoint().x SpriteManager GetPlayerSprite() gt GetMiddlePoint().x , SpriteManager GetPlayerSprite() gt GetPosition().y Window GetWindowMiddlePoint().y SpriteManager GetPlayerSprite() gt GetMiddlePoint().y) Question Am I implementing the viewport correctly?


Is there any way to convert .unr file? I'd like to examine a Harry Potter game for study purposes. All of resources are fine except map file. The maps are in a .unr file format. I know it is unreal map file. Is there any way to convert .unr file to .fbx, .obj, or pskx formats? I want to open map file to 3ds max or blender.


Difference between orthogonal map and isometric map I am laughing at myself ignorant on this. Google didn't produce an obvious answer. Could someone explain what orthogonal map and isometric map are, and how they are different?


Finding the scale of pixels in map with given dimensions For the game I am making, I have textures for planets. Each texture has a size of 2048 x 1024 pixels. I also know the size, thus the diameter, of each planet. Not every planet is the same size, you know. What is the size in kilometers of one pixel? I know it has to do with the circumference but I'm not sure this translates into a scale. For example, let's say a planet is 18,872 km in size, so it's a circumference of about 59258,08 km (diameter PI). Can anyone provide pointers in the right direction?


Can custom maps in Starcraft 2 automatically enable certain unit upgrades? If I create a custom map with the Starcraft 2 map editor, how can I specify that some unit upgrades are already researched? For example, if I want all the units to already have the weapons upgrade 1 at the beginning of the game, can I specify this in the editor? I've looked through the menus but didn't find anything that looked like it would relate to unit upgrades.


3d game terrain creation approach I want to create a terrain world map for my 3d game. I want a huge map. For example, ill make it in Blender or generate from a heightmap. Then I plan to divide it in chunks so I can load unload and show hide them when needed in the game. If I want to remake the map, then I will have to divide it in chunks again, and again spend time on placing world objects on the terrain. I'm not sure that is the best way. What approach is optimal here?


Level Map file creation and processing with OpenGL How do levels maps work in the game development world? Counter strike, which is a popular FPS that uses OpenGL as it's graphics library, has it's levels maps created as .bsp files. How do you create files like this, and use OpenGL to load them? Thanks!


Best way to let the player know there are multiple solutions to a problem?(and force them to play again) I am going to work on a map for my game that is in first person mode. This is the story(planned). He is on a sinking ship and he wants to escape before the ship sinks. He has a few ways of doing so, either with the on board seaplane or an emergency raft. Both methods will lead the player to different maps in the game. So here is the question How can I notify the player that there is another way of "winning" the map if he chooses one. I do not want to just pop out and say "hey you could have used the boat" or even include a progress map of some sorts, but I still want the player to visit the map again in the future to figure out the paths. Any suggestions would be awesome. The lighting would be dimmer as the scene is set at night. There will be blood, grease and other dirty stuff on the player's screen. The ship itself is most probably going to wobble around. edit Sorry that I didn't clarify, but I want to know methods to lure players to play the map again. Methods of letting the player know that there are different methods works, but I think that should not be the only method. I'll change the title.


How can I create a Killing Floor map? I'm trying to create a Killing Floor map and i have the latest Unreal Engine but i dont know how to export my map to Killing Floor. Where can i find the correct version of Unreal Editor ? How can i export my map with current version ?


Heightmap generation I want to implement something like this to create a heightmap 'Place a group of coordinates evenly across a map, and give them height values within a certain range. Repeatedly create coordinates between all of those coordinates, setting their height by deriving a value that was a mean value of all the surrounding coordinates.' However, I'm not sure how I would go about it I'm not sure how I could code the part where I place the coordinates in between the existing coordinates. Can anyone give any help advice?


Best way to solve tile drawing in 2D side scroller? What i still can't figure out is which would be the more sane way easier and faster way to draw the map on the screen.. I mean i will use many tiles for my maps in my side scroller.. But problem is should i make the maps in whole images like one .png file for each map (Example) or should i draw the tiles by code like a for loop in c .. Which way is most recomended or where can i read about which way is the best.


storing map data as file in 3d roguelike games I'm currently designing 3d roguelike game. I need to come up with a map storing system but I'm quite new to game programming so I don't really know how to design. The map will be relatively small, it's not open world. I think it would be just like 3d version of The Binding of Isaac with first person perspective. I want to store map data as a file(e.g txt) but I don't know how to order them and what is necessary to store. Answers with some examples would be very appreciated.


Fair spawning of players on a 2D grid As new players enter a game, they are given a location on a large grid. The first player is given the location in the center. Now, how should the second player be placed? Then, the third and so on? New players should be placed reasonably near some other players, but not so close as to cause bunching. My current thinking is to trace a clockwise spiral around the first player, gradually moving further and further out from that initial point. But I keep thinking this must have been done before and that a general solution must exist. This is for a strategy resource game (similar to CoC or Throne Wars etc). How do I do this?


Good map file structure? I need a map file structure for my game but does anyone know a good way to map it out? I was thinking something like this name MyMap add floor stone solid 20, 640 add playerspawn 20, 620


What are the most common ways of closing an open world? In many open world games, there are several ways to limit them. From original ones such as Desynchronisation(Assasins' Creed) to invisible walls. What are the most common ways to close open worlds?


Using a permutation table for simplex noise without storing it Generating Simplex noise requires a permutation table for randomisation (e.g. see this question or this example). In some applications, we need to persist the state of the permutation table. This can be done by creating the table, e.g. using def permutation table(seed) table size 2 10 arbitrary for this question l range(1, table size 1) random.seed(seed) ensures the same shuffle for a given seed random.shuffle(l) return l l see shared link why l l is a detail and storing it. Can we avoid storing the full table by generating the required elements every time they are required? Specifically, currently I store the table and call it using table i (table is a list). Can I avoid storing it by having a function that computes the element i, e.g. get table element(seed, i). I'm aware that cryptography already solved this problem using block cyphers, however, I found it too complex to go deep and implement a block cypher. Does anyone knows a simple implementation of a block cypher to this problem?


How to generate tile based natural looking map? I have a tile based map which I generate using interpolation of pixels on a reference bitmap into appropriate tiles depending on the color of the pixel. I'm trying to make the output look natural in which blocks of similar tiles look like they are forming a single entity as in the following image While my version only puts static sprites onto aligned cells, the second image takes forest tiles and smashes them together like a whole single forest. The same is done for the water area. Could someone explain or point me somewhere where I can learn how to make the result of the first image look like the second? Thank you Also, how are the seamless road connections done in the above image?


What is a good format for a 3d topview map? I am building a 3d topview game like GTA2. In this game the ground is mostly one level (except for tunnels and highways). Most of the ground is also city so the ground is usually covered by either roads or buildings. The buildings are simple 3d models which the player can walk around on. Most of the gameplay is 2d. How should I model the map? I have considered the following options Bitmaps, I think this gives problems when I want to add data smaller than a tile. Also the problem of bridges and tunnels seems hard to solve with this. Polygons, define all roads, terrain types, buildings with polygons and save that along with physics and texture information. What approach would you take or have you ever implemented this or know of an implementation?


Is there any way to convert .unr file? I'd like to examine a Harry Potter game for study purposes. All of resources are fine except map file. The maps are in a .unr file format. I know it is unreal map file. Is there any way to convert .unr file to .fbx, .obj, or pskx formats? I want to open map file to 3ds max or blender.


How to split login and game logic when writing servers? I'm building a poker like game server, I was going to have all logins and game logic to be handled on one server, but from my research on the web, I learn that this would not scale, and it would make sense to split the work into a login and game servers. But what I don't get is after I handled authentication in the login server, and have the client make a new connection to the game server, how would I know which client is which? Would I not have to re login again and thus defeat the purpose of having a server for login? Is there some way to pass a connection across processes and machines that I don't know about? Excuse my little knowledge of networking.


How should I configure firewall for online game server? I'm complete newbie on game server work. As I know, online (massively multiplay) game server should keep some TCP or UDP connection from the user. As I ( newbie) guess, maybe huge count of socket port should be opened. So how should I configure firewall for game server? Or should I use some other special method to security? Any advise will be appreciated.


how to check if a gameserver can handle clients before game release? we are developing an iOS based game with multiplayer support. so far everything seems real good but now we want to make sure if server could handle 10000 clients or not. any idea how can I make sure server will survive that much traffic?


How do I write a game server with single threaded networking? I want to write a game server with one thread for clients message handling and use something like epoll to accept network messages. All I O and database access will be processed in a thread pool and they are asynchronous and non blocking. Given such a scheme, how should I handle other events messages (physics, game logic, etc)? Can I implement methods to handle these messages as a blocking interface in the main thread? What simple, popular servers exist (using Cocos d Unity as client) that I could look at for an example of this?


How to prevent attackers from compromising multiplayer game servers? Consider a relatively small multiplayer game server, written by an individual or a small company. Some malicious user wants to boost their character stats by a factor of 100. What paths of attack might they have and what are the most important safeguards to prevent these attacks?


Where should I place input output console for server? I'm developing a simple 2d online game and now I'm designing my server. The server will be run on linux vps and I need a way to communicate with it (for example to close it, and as it will be run on vps, simply closing terminal won't work). So I think there are 2 options 1) Write 2 apllications server which doesn't say anything and doesn't accept console input and the second application is console which sends commands to server (like exit, get online players etc). 2) Have 2 threads on the server appplication one is the real server, the second thread will be used for cin and cout. However I'm not sure if this will work on vps... Or maybe there is better aproach? What is the usual way of doing this?


How do I resolve asynchronous client actions against an authoritative server state? I have a multiplayer card game which I am in the process of developing. The game is relatively simple players have a certain number of cards which they can activate, sell, or use in various other ways. The game isn't turn based. Instead, it is asynchronous so that players (A, B, C, and D) all make their choices at the same time. Certain actions will affect the game state. For example, removing a card from the game or adding a card to the game. Players should always be in sync with each other so that, for instance, Player A cannot use a card that Player B has just removed, as it is no longer present. Obviously there are situations in which Player A may remove a card at nearly the same time that Player B tries to interact with the same card. How would the server handle this sort of situation? My original thought is that each client could hash their game state and send it with their command to the server, for example Player A MYHASH Command Pick Up Card Z Player B MYHASH Command Remove Card Z The server would then action the first command and regenerate the hash. Upon trying to execute the second command it would notice the hash sent by Player B differs from the current hash, so the server would reject the request. In the above example Player A would notice nothing and the game would continue normally, but Player B would have to be informed that their action failed.


How to make hard to hack leaderboards Okay, someone tasked me to make a leaderboard for their game. However, the one I have right now is really insecure. All it does is check if someone is in the top 100, and if they are, post the score to the server, where the server will completely trust the client to give a real score. My question is How would I make it harder, or better, impossible, to send a fake high score, because right now they can just post a value to an easy to find endpoint. Clarifications The game is running in an interpreted environment, therefore obfuscation is not practical, and the game has a lot of input (an hour's worth at least), so sending that to the server is also impractical.


Choosing a server for a PVP game So I am starting a game with a friend as a small project, and we are considering what game servers would we need. Firstly, the game is a multiplayer(player vs player) game, for example, like an online chess game. However it is real time, so the latency cannot be too high. The players basically take turns, but in a real time fashion. The platform is going to be Android (and perhaps extend to iOS in the future) The server would need to synchronize the players' moves to each other devices. I don't really need anything large scale and I am thinking of using PHP since the volume of data isn't really that big, this is like a web based game with a requirement of a slightly lower latency. What would be the advantages and disadvantage of using Apache PHP for a game like this? If that seems to be a bad choice, I would be grateful if you can share your experience with me. Thank you. (We are both programmers and we are familiar with Java C Obj C Apache PHP Tomcat JSP Javascript)


Is it possible to rent a server for my own game? I'm an independent game developer and I don't yet have a lot of money to buy myself a very cool high speed and low latency internet connection along with a powerful server machine to place somewhere in the world to host my very own game's server application for my fans to play on. I know it's possible to rent a server for an existing popular game (for example, Team Fortress 2), but how about renting a server for my own game that I'm developing? Are there services specifically for that, or should I just rent some general purpose something and go from there? Such a server should be Easy to update With a low latency for a specific region (I'm planning on renting EU and US servers)


Can you recommend a game server for a facebook board game? I am seeking a game server that will scale well. All commercial and or free software alternatives are welcome. Game will be a boardgame that is similar to poker. Some technical details are listed below. There will be a table which consists of 4 people, to send them message I need a channel manager. A table will be ready to play for at least 5 minutes. There should be a reliable channel manager. People will wait for some time(i.e.) and if they are not playing they will be kicked by server, so there will be a reliable timed task queue to execute some tasks. It should be quick enough to response and show the changes to all 4 people on that table simultaneously.To achive this server should have a powerfull I O library. I think to use inmemory to have quick response times, but it comes with scalability problems. And some variables should be thread safe so a variable should be thread safe between multiple nodes. Flash(AS3) and Unity (.Net 2.0 C mono) client API's should be available for socket connection. PS I am using Reddwarf server, it lacks of documentation and multiple node.


When to read write to database with a game server My question is fairly simple but maybe hard to answer. I'm currently building my own game server and I've done to login server now. So, on to the actual game server. I have a question for this server though. Say, a thousand players are moving around on this server, how do I manage this with the database (MySQL) that should hold the player positions and such? I understand I can't query the database every time something small changes or a single player moves because that would be a huge load for that server. How is this done in real game servers? When do they read or write to the database?