Search Results

Search found 12338 results on 494 pages for 'game ai'.

Page 87/494 | < Previous Page | 83 84 85 86 87 88 89 90 91 92 93 94  | Next Page >

  • Android lifecycle of thread-based game

    - by ehehhh
    I ran into a bit of trouble while trying to get my game to work correctly after being put to the background by the user or a phone call for example. My app has a SurfaceView class called GameView, which has the onDraw() method to do all the necessary drawing for my game and two threads - one for calling the onDraw() and one for doing the necessary calculations for the game's logic. I succesfully implemented onPause() and onResume(). (I paused both threads when back button was pressed and resumed them after user cancelled in the AlertDialog.) Now I would like to have the game paused the same way when onStop() gets called. I put both threads on pause and saved my characters location in the savedInstanceState, but when I start my app again, no method gets called (I checked with Logcat). I believe onRestart() should be called first, then onStart() and then onResume(), but none of that happens. What am I doing wrong? (Didn't include any code, because it seems to be a problem of me not understanding the lifecycle, not a problem in code. If it seems necessary, I'll post the parts you request.)

    Read the article

  • Quick question regarding MVC framework for a java game

    - by Jason
    I have a question regarding the use of the MVC framework for a blackjack game im writing in java. As I understand, my model would be a class that stores the state of the game, and more specifically, each players hand. Within the model class, I would have an array of listeners, which would be notified each time the game state changes (ie a player has drawn a new card). These listeners would be my viewer, which is the class that handles the display of the game. This class would implement the ActionListener interface, and each time the model changes, it would call/"notify" my viewer's actionPerformed method. My question is as follows: I intend to have two JPanels, each devoted to displaying the respective player's hand. As a player draws a new card, a new ImageIcon would be added to the panel. My question is how would the viewer class know what card has been added to the player's hand? I suppose I could store the player's hand before a notify event, and then upon the notification event, compare the new state with the old, to find out what has changed. I'm a complete novice here, so I could be completely wrong, but it seems a bit tedious to do this. Is there a more efficient/common way of detecting what has changed in the model between the before and after state? Another solution would be to redraw the entire panel each time the notification occurs? Would this be a better idea?

    Read the article

  • How can I post scores to Facebook from a LibGDX android game?

    - by Vishal Kumar
    I am using LibGDX to create an android game. I am not making the HTML backend of the game. I just want it to be on the Android Google Play store. Is it possible to post the scores to Facebook? And if so, how can I do it. I searched and found the solutions only for web-based games. For LibGDX, there is a tutorial for Scoreloop. So, I am worried whether there is a way to do so. Any Suggestion will be welcome.

    Read the article

  • How to produce assets effectively on large Flash game projects?

    - by Antoine Lassauzay
    I have been working on Flash games professionally for two years now and somehow, having our artists producing assets the right way is one of our biggest challenge. More precisely, it is very hard to have them following any kind of structure and/or standards, nor taking into consideration performance. I would say also the most of our issues concerns UI and related animations. Our current workflow is (on a Facebook hidden object game) : Artists produce PSD and animate prototypes in Flash Artists re-organize their FLA files to be a bit more "programmer friendly" Programmers retouches assets until they have the right structure and export classes inside a SWC, from Flash Programmers try to improve performances, sometimes degrading the quality of game graphics Our main idea is to hire somebody dedicated to prepare assets for programmers but I am really looking forward to improving the pipeline. I was wondering if you guys have tips of any kind to improve this workflow, whether it be team organization, training, tools or tips with Flash. Any explanation on your asset pipeline is well appreciated too.

    Read the article

  • How do i start Game programming in windows phone xna?

    - by Ankit Rathod
    Hello, I am very much interested in Game programming in Xna. However during my college days i did not take Physics or Maths. Does that mean i can't create games in xna? I just know basics of trignometry. Can you all point me to few links where i can learn xna as well as the basic stuff of Maths that is bound to be required in most of the games? Are all game programmers excellent in Maths and Physics ? Thanks in advance :)

    Read the article

  • Best way to distribute graphics, audio and levels with an SDL game?

    - by Kristopher
    I'm working on finishing up a game written in C++ with SDL I've been working on for awhile, and I'm starting to ponder how I'm going to distribute it. It has hundreds of images that are loaded and used throughout the game, as well as a couple dozen .wav files for audio effects. What is the best way to distribute these? Should I just include the folders with all the files? Or is there a way I can package them into a single file, then open and extract them in my application? What's the best way to go about this?

    Read the article

  • Getting Started with 2d Game Dev (C++): DirectX or OpenGL?

    - by Dfowj
    So, i'm a student looking to get my foot in the door of game development and im looking to do something 2D, maybe a tetris/space invaders/something-with-a-little-mouse-interaction clone. I pointed my searches in the direction of C++ and 2d and was eventually lead to DirectX/OpenGL Now as i understand it, all these packages will do for me is draw stuff on a screen. And thats all i really care about at this point. Sound isn't necessary. Input can be handled with stdlib probably. So, for a beginner trying to create a basic game in C++, would you recommend DirectX or OpenGL? Why? What are some key feature differences between the two? Which is more usable?

    Read the article

  • What collision detection approach for top down car game?

    - by nathan
    I have a quite advanced top down car game and i use masks to detect collisions. I have the actual designed track (what the player see) with fancy graphics etc. and two other pictures i use as mask for my detection collisions. Each mask has only two colors, white and black and i check each frame if a pixel of the car collide with a black pixel of the masks. This approach works of course but it's not really flexible. Whenever i want to change the look of a track, i have to redraw the mask and it's a real pain. What is the general approach for this kind of game? How can i improve the flexibility of such a mask based approach?

    Read the article

  • Should I get my masters in Game Design and Development or Computer Science?

    - by Christopher Stephenson
    I am a recent grad with a B.S. in IT while I didn't minor in Game Desgin and development, I took few classes in it. During my job search I have seen that most gaming companies seems to want someone that majored in C.S, mathematics, or physics. During my undergrad I never had to take physics nor did I learn much about data structures and algorithms. These seem to be really important when searching for a job in game development. So I am thinking about going back to school to get my masters in either CS, or GDD. The problem though is which one? I am really not looking to create my own games, I just want to work on games.

    Read the article

  • Best resources to learn Game Development from a Java background?

    - by Julio
    Hi guys, I'm an enterprise Java programmer, however something I've been interested in and what got me into the whole programming thing was the idea of being able to create a game. Just wondering if anybody could offer any advice, or book recommendations. The side I am most interested in is game engine design and implementation. People may say "ahh but plenty exist why write your own" - its purely for learning purposes, seeing how things work and so on. So far I've taken a look at LWJGL, but achieved nothing too serious. Thanks.

    Read the article

  • Where is a good spot to start when writing a LWJGL game engine?

    - by Alcionic
    I'm starting work on a huge game and somewhere along my train of thought I decided it would be a good idea to write my own engine for the game. I was originally going to use JMonkeyEngine but there were some things about it that just didn't work well with me. I wanted full control over every aspect of the entire process. Where would a good place to start be when writing your own engine? I have no experience with LWJGL but I learn quick. Either advice or some place where there is good advice would be nice. Thanks!

    Read the article

  • Is there any advantage in using DX10/11 for a 2D game?

    - by David Gouveia
    I'm not entirely familiar with the feature set introduced by DX10/11 class hardware. I'm vaguely familiar with the new stages added to the programmable graphics pipeline, such as the geometry shader, the compute shader, and the new tesselation stages. I don't see how any of these make much of a difference for a 2D game though. Is there any compelling reason to make the switch to DX10/11 (or the OpenGL equivalents) for a 2D game, or would it be wiser to stick with DX9 considering that that a significant share of the market still runs on older technologies (e.g. the February 2012 Steam surveys lists around 17% of users as still using Windows XP)?

    Read the article

  • Best resources to learn Game Development from a Java background?

    - by Julio
    I'm an enterprise Java programmer, however something I've been interested in and what got me into the whole programming thing was the idea of being able to create a game. Just wondering if anybody could offer any advice, or book recommendations. The side I am most interested in is game engine design and implementation. People may say "ahh but plenty exist why write your own" - its purely for learning purposes, seeing how things work and so on. So far I've taken a look at LWJGL, but achieved nothing too serious. Thanks.

    Read the article

  • How to link subprograms to a main program's game loop?

    - by Jim
    I recently discovered Crobot which is (briefly) a game where each player codes a virtual robot in a pseudo-C language. Each robot is then put in an arena where it fights against other robots. A robots' source code has this shape : /* Beginning file robot.r */ main() { while (1) { /* Do whatever you want */ ... move(); ... fire(); } } /* End file robot.r */ You can see that : The code is totally independent from any library/include Some predefined functions are available (move, fire, etc…) The program has its own game loop, and consequently is not called every frame My question is roughly : how does it work ? It seems that each robot's code is compiled by the main program and then used in a way I cannot understand. I thought it could yields a thread for each robot, but I have not any proof of this and it seems a bit complicated to achieve it. Any idea how it could work, someone ?

    Read the article

  • Tips for communication between JS browser game and node.js server?

    - by Petteri Hietavirta
    I am tinkering around with some simple Canvas based cave flyer game and I would like to make it multiplayer eventually. The plan is to use Node.js on the server side. The data sent over would consists of position of each player, direction, velocity and such. The player movements are simple force physics, so I should be able to extrapolate movements before next update from server. Any tips or best practices on the communications side? I guess web sockets are the way to go. Should I send information in every pass of the game loop or with specified intervals? Also, I don't mind if it doesn't work with older browsers.

    Read the article

  • Need material for character anatomy in a 2D game. Spartan Like, See Picture

    - by Edwin Soho
    I'm creating my art for an 2d based IOS game. I know some basic anatomy as you can see by the picture but I have no idea how I will make draw the pics for animation of the character walking, attacking with his sword and protecting himself with shield. Is there any anatomy reference for 2d game out there, book or anything else? for your information, I did try to find but all of stuff I found are very amateur and incomplete The picture was my attempt of creating a example of the character walking, which I'm not happy with please help, thanks Update: Since I am in a hurry I decided I would copy the anatomy from other 2d games, it is not that clean but at least I wanna be able to start it. The question is still open.

    Read the article

  • How can i run my .LÖVE game directly from the lua interpreter?

    - by jonathan
    I've just started with LOVE and LUA , i'm interested in LOVE because i want to play around with something different from my dayjob(i'm a webdeveloper) and since it uses LUA and is interpreted , i though it would be a great way to try out the API. but i couldn't find how to run my .LÖVE game directly from the lua interpreter? i'm finding it bothersome to package the game each time i make a little test with the API. since i couldn't find the answer i'm asking, but maybe i'm serching for the wrong terms, if this it is a simple matter like "import the library" or set the global, i'll gladly remove my question.

    Read the article

  • Why was my Facebook game rejected with the note that "your app icon must not overlap with content in your cover image?"

    - by peterwilli
    My FB game just recently got rejected for two reasons. The first I fixed, but I just can't see to figure out what they mean by the second, and I was hoping someone else got the same issue and did know what they meant. The remaining error is: Cover Image Your app icon must not overlap with content in your cover image. Click on 'Web Preview' in the 'App Details' section to check for overlap prior to submitting your app. See more here. All I know is that the rejection has something to do with the cover image, not the icons or the screenshots. The web preview of my game looks like this now: Please let me know what to do to get approved.

    Read the article

  • Easiest Way To Implement "Slow Motion" and variable game speed in XNA?

    - by TerryB
    I have an XNA 4.0 game that I want to be able to switch into slow motion and back again to full speed every now and then. So if you kill an enemy the game switches into slow motion as they explode and then goes back to normal. What is the easiest way to do this in XNA 4.0 without having to alter all my existing code that relies on GameTime? I have some code that relies on the TotalGameTime, which will be wrong unless I get XNA to slow down. Is there anyway to avoid refactoring that code? Thanks!

    Read the article

  • Should actors in a game be responsible for drawing themselves?

    - by alex
    I am very new to game development, but not to programming. I am (again) playing around with a Pong type game using JavaScript's canvas element. I have created a Paddle object which has the following properties... width height x y colour I also have a Pong object which has properties such as... width height backgroundColour draw(). The draw() method currently is resetting the canvas and that is where a question came up. Should the Paddle object have a draw() method responsible for its drawing, or should the draw() of the Pong object be responsible for drawing its actors (I assume that is the correct term, please correct me if I'm incorrect). I figured that it would be advantagous for the Paddle to draw itself, as I instantiate two objects, Player and Enemy. If it were not in the Pong's draw(), I'd need to write similar code twice. What is the best practice here? Thanks.

    Read the article

  • How should I sort images in an isometric game so that they appear in the correct order?

    - by Andrew
    Hi! This seems like a rather simple problem but I am having a lot of difficulty with it. What should I do to properly sort images in an isometric game? In a normal 2d top-down game one could use the screen y axis to sort the images. In this example the trees are properly sorted but the isometric walls are not. Example image: sorted by screen y Wall2 is one pixel below wall1 therefore it is drawn after wall1. If I sort by the isometric y axis the walls appear in the correct order but the trees do not. Example image: sorted by isometric y

    Read the article

  • How should I sort images in an isometric game so that they appear in the correct order?

    - by Andrew
    This seems like a rather simple problem but I am having a lot of difficulty with it. What should I do to properly sort images in an isometric game? In a normal 2d top-down game one could use the screen y axis to sort the images. In this example the trees are properly sorted but the isometric walls are not. Example image: sorted by screen y Wall2 is one pixel below wall1 therefore it is drawn after wall1. If I sort by the isometric y axis the walls appear in the correct order but the trees do not. Example image: sorted by isometric y

    Read the article

  • From where does the game engines add location of an object?

    - by Player
    I have started making my first game( a pong game )with ruby (Gosu). I'm trying to detect the collision of two images using their location by comparing the location of the object (a ball) to another one(a player). For example: if (@player.x - @ball.x).abs <=184 && (@player.y - @ball.y).abs <= 40 @ball.vx = [email protected] @ball.vy = [email protected] But my problem is that with these numbers, the ball collides near the player sometimes, even though the dimensions of the player are correct. So my question is from where does the x values start to count? Is it from the center of gravity of the image or from the beginning of the image? (i.e When you add the image on a specific x,y,z what are these values compared to the image?

    Read the article

  • Where should i organize my matrices in a 3D Game engine?

    - by Need4Sleep
    I'm working with a group of people from around the world to create a game engine(and hopefully a game with it) within the next upcoming years. My first task was writing a camera class for the engine to use in order to add cameras to the scene, position and follow points in the scene. The problem i have is with using matrices for transformations in the class, should i keep matrices separate to each class? such as have the model matrix in the model class, camera matrix in the camera class, or have all matrices placed in one class/chuck? I could see pros and cons for each method, but i wanted to hear some input form a more professional standpoint.

    Read the article

  • how to modify shadow mapping in "3D Graphics with XNA Game Studio 4.0"?

    - by naprox
    So I've been following the tutorials from the book Sean James's "3D Graphics with XNA Game Studio 4.0", and have been doing fine until i reached the shadow mapping part. in this book it creates point lights with a Sphere model. my first Q is how to draw a directional Light with this frame work? secondly it can do shadow mapping just for one light, how can i do shadow mapping for all or parts of the lights in the game? i just want to know how to modify this codes to do the above tasks. I've followed tutorials on MSDN and some other sites and didn't got the answer. please help me, its so urgent. and if any one wants, the complete code is here: http://www.mediafire.com/?6ct11mc1g8f891h

    Read the article

< Previous Page | 83 84 85 86 87 88 89 90 91 92 93 94  | Next Page >