Which game logic should run when doing prediction for PNP state updates We are writing a multiplayer game, where each game client (player) is responsible for sending state updates regarding its "owned" objects to other players. Each message that arrives to other (remote) clients is processed as such Figure out when the message was sent. Create a diff between NOW and that time. Run game specific logic to bring the received state to "current" time. I am wondering which sort of logic should execute as part of step 3 ? Our game is composed of a physical update (position, speed, acceleration, etc) and many other components that can update an object's state and occur regularly (locally). There's a trade off here Getting the new state quickly or remaining "faithful" to the true state representation and executing the whole thing to predict the "true" state when receiving state updates from remote clients. Which one is recommended to be used? and why?


What's the performance benefit of saving all logged in characters in MMOs in regular intervals? The majority of MMORPGS have a Worldsave system that will save all the characters once every X hours. I guess the reason is performance. So why is this better, performance wise, than saving a character on disconnection?


Implementing Multiplayer entire world ticks or just changes? i'm working an a very simple multiplayer experience (for now node.js, later will probably remake all in c , but my question is more about theory). All guides and tutorial i saw about making something multiplayer Always speak about sending all the "world" information, once per tick, deciding optimal tickrate, making smooth movements on client side with interpolation or stuff like that. Honestly i thought of another way, and i really cant see why its never mentioned. My idea would be the following Client sends to server when input happens eg if you move with arrows, you send to the server a message only when your moving status changed. If you was moving right and then start moving upright, then you send a message about you changing your movement. Server recives the messages, sets variable on player object for its movement, and sends to all other clients information about the change. Also sends current time and current position in the server at the moment of movement change. Clients recive a movement status update, place the player object in recived coordinates moved by the new movement ping delay. That way position in all clients should Always be up to date with the server. Why should i send hundreds of positions to each client per each player every x milliseconds when i can just send the changes? I feel like its about polling vs interrupt... (yeah i know its not polling anyway, but the concept is sending the change vs keep sending everything)


Client Server RTS networking with lockstep and lag The peer to peer lockstep networking model would seem to indicate that everyone's input is delayed the same amount. And so this would indicate that everyone would feel the same lag in response to their input. But in Warcraft 3 from playing many custom games it is clear that the creator of a custom game has much faster response time to their input. How can this be given the lockstep model?


Secure login for a game that is open source I am making a game which i will be open sourcing. Its a simple arcade like game but requires a network connection because it is meant to be played with other people. The thing i am worrying about is how would i be sure that the client is the one that i put out for the end user to play with? Kind of a like of sv pure for Team Fortress 2. I was thinking of different ways to combat this such as the server requesting the client's version or even it's md5 hash but people with simple java knowledge could just force a method to always return what the server wants.


LAN game in Actionscript 3 I know this may be a somewhat dumb idea, but is there any "easy" resource that anyone can point me towards that shows how to set up a simple LAN connection in an Actionscript application? I only need to have two clients connected. Nothing extremely robust. This is not an AIR application. It's for a game idea that I have that will need two players essentially. It will be local, so having each other's IP addresses will be an option. So no need to find or detect any IP addresses. Thanks.


Should I consider a cloud based networking solution? In my spare time for the past few years, I have been working on both the front end and back end for a space based online game. This game is initially designed for the PC, and is hopefully able to host thousands of players in a massively playable universe. Along with the development of the game, I have been building the networking solution almost entirely from scratch. The architectural design of the networking solution is based on a fairly traditional master server sub server model. I recently was able to run some fairly decent scale tests on this model and was pleased to see that both my expectations and goals were met. Which leads me to my current fear. The basic idea behind the current solution is that the master server acts as a router. It knows about all of the currently active sub servers, including their load (cpu, memory, bandwidth etc) and what the sub server is assigned to handle. The master server has literally no other purpose. Each sub server is designed to handle one (or more) solar systems. The idea being as a player, you connect to the master server and tell it which solar system you want to go to. The master server looks to see if there is a sub server already assigned to this solar system and sends you there, otherwise it finds the sub server with the least load and assigns that sub server to the solar system before sending you there. The part that I am worried about is that this is pretty much as much as I can get out of this model. Once you have been sent to a solar system, you (and everyone else in that solar system) are on that sub server until you leave that solar system. Although I am happy with my testing so far, and that it looks to be able to handle around 300 fairly active peers, fairly comfortable on a well fitted server, I am worried if I ever end up in the situation where this isn't enough. I discussed this recently with a few acquaintances of mine. The discussion lead to a cloud based network maybe being a better solution than single server machines acting as sub servers. Atmittedly, cloud commputing is fairly unknown territory for me. With that being said I've spent some time looking into this and I am fairly confident with the basics, but I have the following questions I assume that if I were to re design the networking solution to work within a cloud based network, I would no longer need the master server sub server model, since I could build a single application that would handle all solar systems and peers, and that the cloud would scale based on the number of solar systems and peers? Any and all advice is welcome!


Using peer to peer for prediction in a client server network model By implementing peer to peer connections between clients in a client server network model I should be able to increase the prediction fidelity as this theoretically would provide the client with other clients commands for a given tick earlier than it would receive the servers game states for the same tick. One problem I can think of is that clients would have to be able to interpret other clients commands (usually they just have to listen for game states, not commands). This would be a little bit like an RTS model I guess. This should be solvable without any negative effects on gameplay. Another problem is that clients could cheat by sending fake data to their peers when it is beneficial to them. This can be mitigated by having the client aware of the real commands through the server and have them immediately stop listening to any clients that fed it false data. This should therefore be solvable with different degrees of negative effect on gameplay depending on the design of the game and how impactful a few ticks of wrong command info is at the worst possible moment. (Unfortunately, you can't have the server punish any client because it has no idea who's lying, it can only help clients themselves understand if they are being lied to by providing them with correct data). Am I correct in assuming that this would increase prediction fidelity or is there something I'm not accounting for? The idea is that this allows the client access to some information about the other clients faster than in a traditional non peer to peer model where it would base predictions solely on its own commands.


I know that my super simple multiplayer setup is probably not a good idea, but why? I'm making a simple little MOBA just for fun. I was making everything single player then I realized "oh crap I should probably add multiplayer, huh." I've never done anything with networking before, so learning how to integrate Lidgren into my game was fun and awesome. The thing is, I pretty much know the way I'm doing things is wrong, because it's not robust enough for mainstream games to use, as far as I know, but what's wrong with it? What I'm doing is, basically, whenever a player does an action, it sends a message to the server saying "hey, I just did this thing." The server and the client are both running the same simulation. The server then sends a message to all other clients telling them that that guy did that thing. For the most part, except in a few cases, when a player does a thing, the client assumes it's cool and goes ahead with it on its own. So when you right click somewhere to move there, that player's client just starts moving his guy there, and then sends a message to the server telling it about it. So basically Player 1 casts a spell to make him move 100 faster for six seconds Player 1's local client adds that buff to his Unit object Player 1's client sends a message to the server saying "hey I just cast this spell" The server makes sure he really did have enough mana to cast that spell, and if so, adds that buff to the server's copy of that Unit object The server sends a message to all other clients saying "hey this guy just cast this spell" Every other client receives the message and goes "ah okay cool," and adds that buff to their local Unit object for that player I've been skimming through stuff to see how big games do multiplayer, and it's kind of confusing for someone who's just starting to dabble in this stuff, but it looks like the Source engine sends a packet containing all of the changes to everything in the world every tick? Again, totally new to this stuff, but can you really push that much data that frequently? Sorry if this is a bit rambly, but basically, I was wondering why my simpler system isn't the right way to go, because if it was, other games would use it, right?


How ID's work in FPS games I am wondering how games generate IDs GUIDs for their entities (along these lines), and which entities specifically get them. To narrow the scope of the question down, I am just focusing on FPS games such as Halo. This was an earlier question that helps explain how state is synced across clients in an FPS The state that is synced when a window is broken in a FPS game The goal with that question was to learn what kinds of data is sent around to sync clients. The piece that is still missing for me is what entities in the game actually get an ID of some sort (either a GUID, or a scoped ID such as some incremented integer or something). Some of the game "entities" I am considering are Particles of light, individual pixels, physical forces, etc. (the lowest level vectors points for calculating light or physics stuff). Topology (mountains, roads, etc.). Landscape features (grass, bushes, trees, rocks, water, rain drops, etc.). City features (cars, signs, buildings, windows, shards of glass from a broken window, etc.). Tools items (weapons, potions, etc.). Other players. It seems that some of these "entities" you can interact with (e.g. destroying a car in GTA, or the other players in the game), some you can to some degree (i.e. bushes might sway when you walk by, but you can't shoot them for example), and some you cannot (like the sun in a skybox). I am thinking in terms of state syncing, it seems like there must be IDs somewhere in the picture so you can map a game entity from computer A to the same game entity in computer B. Even without syncing, it seems like you might want some sort of IDs on objects to allow for easier handling of events and tracking objects. But at the same time I don't really see "IDs" in simple "game engines" like these JavaScript game engines, so that is why I'm asking the question. The question is, for large games like Halo, what the entities are that have IDs (or some of the main ones), and if the IDs are GUIDs (or generally what kind of ID they are incremented integers, random numbers, UUIDs, etc.). Like I'm wondering, maybe bushes have IDs. Maybe the individual leaves on the bushes have IDs. Maybe every single triangle in the graphics has an ID. That's what I'm wondering. Maybe the shards of glass have IDs because you can pick them up. Maybe only the players have IDs for some reason. Etc. I am interested because (a) it seems like IDs are necessary in different ways (for state syncing, for tracking player behavior with different entity types to improve the game experience, etc.), and (b) there is a lot of variation in performance when it comes to using IDs. For example, I just tried generating 1 million particles like this and got these results crypto.getRandomValues 5.7 seconds to generate 1 million IDs. Math.random() 18ms to generate 1 million IDs. i 5ms to generate 1 million IDs. In addition, there is the space constraint, so by using i you can use fewer bits for the ID until it gets very large, but they don't work as GUIDs so you need to do extra work to create ID "scopes" or things like that. Anyways, I would like to figure out how to deal with IDs in games, and looking to FPS as an example to demonstrate where the IDs might be used. Any help would be appreciated. Thank you. If it is a complicated topic (I'm not sure), then just knowing roughly an outline of how it is typically done, or even a place to look for more information, would be helpful. Also, just saw how Unity is a good example of a Component Entity system, so maybe instead of FPS a better example is how generic game engines do it. Either way, whatever helps explain how it works.


In a 2D multiplayer game should I send the position of user to the server all the time? In a 2D game where the user moves with the keyboard arrows, should the user send all the time he moves his position (x, y)?. If the user has some speed, the user would send (x, y) like 50 times pixel by pixel in just a second.


TCP Slow Start in Network Games I'm getting latency issues in bandwidth intensive level transitions part of my game that are proportional to the distance to the server. I believe I'm hitting TCP Slow Start issues. It's also fine when I spam level transitions in quick succession but the problems re appears. Note that I'm not breaking the TCP connection. Effectively the transfer rate of my game is very bursty and remote users are experiencing a high latency (0.8 second) during these events. Some of the data I need to send during these bursts are dynamic so I can't pre exchange it. Is there anything I can do to mitigate the problem? Sending dummy data to keep the TCP window size is pretty much not a solution. All the data needs to be received in order so UDP isn't really appropriate here.


Is RPC Safe and what is security layer of RPC? We're creating a MMO and I wonder is RPC safe or not ? Isn't RPC easily hackable by injecting to client and what is the security layer of RPC on Unreal Engine ? For example a player is walking and sending that information (new position, rotation etc) to other players, can't that player change movement speed or position with injecting ? What is validating is that movement is valid or it was a hack ? I checked on Google but didn't get answer for my questions. Thanks o


How to properly protect a flash game? If I understand correctly, the main point of protecting a single player flash game is to keep it sitelocked. How to do this right and are there any other reasons to do this?


Water simulation in Isometric game I'm creating a game in Flash AS3 in which the player needs to modify land in order to direct the water in the right direction. However, water simulation is a new topic for me and I'm kinda stuck. It doesn't have to be like realistic water, with ripples and stuff, but it has to flow, and if there's enough water, it needs to rise. I've thought up two different types of water A Spring Infinite source of water. Used for simulating seas and stuff. Water block Just one unit of water. My current implementation shows how I'd like the water to spread, but it doesn't rise, and doesn't allow for finite water. Also, the spreading isn't accounting for any amount of water, it just duplicates instead of actually moving units of water. I'm curious to how you guys would solve this problem. Any examples pseudo code is always appreciated. Current version http dl.dropbox.com u 319897 ProjectWater.swf You can manipulate the land by pressing left mouse. And can simulate one step of water at a time by pressing A. Source of the water part http pastebin.com Js2kYt4y


Internationalization (i18n) in Flash games? Is there an easy way? I want to internationalize some texts in a flash (not flex) game I'm working on and I can not find an easy way to achieve that... I have found some libraries and other solutions, but I expected something a lot easier (it is really easy with other technologies). Do you have experience in this? How do you do it?


How to achieve smooth sprite movement with a scaled up canvas? I'm developing a simple 2d platformer using haxe amp openfl (currently targeting flash). To achieve the old school pixelation effect I draw 16x16 sprites over a 4x scaled up canvas. With this approach character movement is very jerky since it seems to consist of a sequence of 4px jumps. So my question is how to be smooth amp old school at the same time? Thank you for your time.


Are there any sample projects for Flashpunk? Are there any open source games using Flashpunk? The other big flash game library Flixel has a number of example projects, are there any equivalents for Flashpunk?


How does MMO flash games works? I want to know how does MMO flash games work, for example Dofus and Club Penguin. I want to know if by ony using Adobe Flash and ActionScript you can do MMO games, or if there is other way to work with ActionScript and Flash beyond Adobe Flash.


Pixel perfect collision against rotated sprite in Flixel I've got a roughly 500x50 graphic of a lockpick that I need to be able to rotate very finely while doing pixel perfect collision detection against the lock object. There's no way to do pixel perfect collision detection in Flixel, so I'm using the Power Tools' FlxCollision class to accomplish this. The problem is that this class only works with rotated sprites if they were loaded with loadRotatedGraphic. ...the problem with that is that it only allows you to rotate to discrete angles. You pass it how many angles you need to be able to rotate to and it, I think, pre prepares all the frames for you. And the reason that's a problem is because I need such fine rotation. I need at least 128 different angle values, but when I do that I get Error 2015 Invalid Bitmap, which I'm assuming is because the resulting 128 frames of a 500x50 lockpick results in a bitmap larger than AS3's limit. I can load the graphic using loadGraphic instead, which I think just calculates the rotated image real time, but then FlxCollision won't notice that it's been rotated. Another problem is that with the pre rotated graphics, you can't rotate about a specific point, and I need the lockpick to rotate around the tip of its handle. ...so how the heck do I do pixel perfect collision against a rotated sprite? I'm trying to mod FlxSprite so that FlxCollision will see the rotated sprites even when they're calculated in real time, and to do this I Ctrl F'd through the class looking for appearances of "angle", the variable that you set to rotate a sprite, but all I can find is some obscure calculation in it's used to compute a frame number, and I can't find a single call to any function that looks like it's doing real time bitmap rotating. So, I was able to solve this problem. All FlxSprites hold the bitmap for their currently visible frame in an internal variable called framePixels. If you load a graphic using loadGraphic, then you can do real time rotation in this case, the draw() function rotate s framePixels "at the last minute", right before rendering it. Meaning the rotated bitmap is not stored, and FlxCollision has no way of seeing it. FlxCollision runs its collision checks against the unrotated bitmap. So this is what need to be done Get the sprite to store its rotated graphic somewhere rather than just sending it to the renderer and then abandoning it. Get FlxCollision to use that stored rotated graphic rather than framePixels. This is summarized in the following diagram. Flixel's default logic is in black, my changes are in red. I applied all of this in a sub class of FlxSprite that I called PerfectCollisionSprite. Here's my code.


Change the tilemap shown on stage in Flixel I am building a simple platformer using Flixel, beginning with the source code from Flixel creator's EZPlatformer . I would like to adjust the level's tilemap when the player sprite enters overlaps with a sprite representing a door. I use Flixel's built in function to track if the player overlaps the door sprite. exits is a class level variable public var exits FlxGroup I call this function in the Update event to check for overlap FlxG.overlap(exits,player,UpdateScreen) I successfully catch when they overlap, however when I try and load the new tilemap, the old one continues to show. I use this function to attempt to update the tilemap on the screen public function ChangeScreen() void load the screen and locations of sprites(e.g. player, exits) based on current screen switch(currentScreen) case 1 load tilemap level new FlxTilemap() level.loadMap(FlxTilemap.arrayToCSV(data1,40),FlxTilemap.ImgAuto,0,0,FlxTilemap.AUTO) add(level) break case 2 load new tilemap level new FlxTilemap() level.loadMap(FlxTilemap.arrayToCSV(data2,40),FlxTilemap.ImgAuto,0,0,FlxTilemap.AUTO) add(level) break I thought that I would need to first call remove on level to take it off the stage, and then call add on it, however, when I do that, the tilemap does not show up at all. What is the correct way to do this?


AS3 Starling in Fullscreen Mode cuts off most of the screen I have a mixed mode (classic Flash Renderer Starling) AIR AS3 project that I'm switching to fullscreen with stage.align StageAlign.TOP LEFT stage.scaleMode StageScaleMode.SHOW ALL Swtich to Fullscreen with stage.displayState StageDisplayState.FULL SCREEN INTERACTIVE When I do this, I have a callback on the Event.RESIZE event to resize my Starling instance to fullscreen private function resizeStarling(e Event) void var size Point new Point() if(this.stage.displayState StageDisplayState.FULL SCREEN INTERACTIVE) size.x Capabilities.screenResolutionX size.y Capabilities.screenResolutionY else size.x WIDTH size.y HEIGHT RectangleUtil.fit( new Rectangle(0, 0, stage.stageWidth, stage.stageHeight), new Rectangle(0, 0, size.x, size.y), ScaleMode.SHOW ALL, false, Starling.current.viewPort) The set to FULL SCREEN INTERACTIVE turns all my normal flash Stage object based UI and visuals to full screen mode. However, while the Starling graphics are correctly upscaled, they only occupy the upper left corner of the screen, and the remaining three quadrants are cut off. I haven't validated yet, but I suspect that the segment being displayed is the same dimensions as the original windowed stage size. Any ideas on what I'm forgetting to do to achieve fullscreen Starling displays that are actually fullscreen? This is on OSX.


As3 Character movement in diffrent directions with labels? I hope you can help me with the following problem I made a character in Illustrator. The player sees the character from above. When you press the left arrow key character.gotoAndStop('left') the character moves to the left. (Same goes for the right direction with label 'right' When you release the left or right arrow key (upKey) the character goes back to the label 'up'. I'm trying to accomplish the following When the character is facing down ('down'). the left key should go to the ("facingdownleft") label and on release back to the label ('down'). (Same for the right direction) stage.addEventListener(KeyboardEvent.KEY DOWN, downKey) function downKey(event KeyboardEvent) if(event.keyCode 39) isRight true character.gotoAndStop('right') if(event.keyCode 37) isLeft true character.gotoAndStop('left') if(event.keyCode 38) isUp true character.gotoAndStop('up') if(event.keyCode 40) isDown true facingdown true character.gotoAndPlay('down') if( facingdown true amp amp isLeft true) character.gotoAndPlay('downleft') stage.addEventListener(KeyboardEvent.KEY UP, upKey) function upKey(event KeyboardEvent) if(event.keyCode 39) isRight false character.gotoAndPlay('up') if(event.keyCode 37) isLeft false character.gotoAndPlay('up') if(event.keyCode 38) isUp false if(event.keyCode 40) isDown false I made a boolean for facingdown and an if statement for downleft if( facingdown true amp amp isLeft true) character.gotoAndPlay('downleft') But before I make numerous amounts of if statements again, I would like to know if I'm on the right track and if you can help me accomplish this? Thank you so much in advance and feel free to ask questions.


Flash server, protocol protection I am making a flash game that will interact heavily with the server. For quite some time already I am using 'request hashing' technique to make sure that request data hasn't been tampered with. This works pretty well. However, in this game I'd like to go a little bit further and completely hide the protocol from the observer (right now it's plain JSON). I imagine that I could zip and encrypt data (using one of symmetric algorithms). That would make it pretty unreadable by human, right (also smaller)? And SWF encryption obfuscation should protect the encryption key (it is being done anyway). As a side benefit that will also protect dynamically loaded resources from directly saving them to disk (or copying from the cache). Questions are there tools that allow you to simply dump the SWF with all its content, received and decrypted? If yes, this will render 'the side benefit' invalid. do you think it's worth it to burn all that CPU power? To support my point, I will say that I like to inspect data being exchanged between client and server. And occasionally I find a bug or two which I can use to my benefit. But then there was a game that was sending and receiving some binary data. Being a lazy attacker, I decided not to analyze further. Otherwise, who knows what I could find ) Comments, ideas, criticism, suggestions? )


Using timer to reverse enemy movement in Flash game made with Flixel I am creating a 2d flash game using Flixel 2.5 in Flash Builder. I am trying to reverse enemy movement on an interval so that they will move back and forth over a set space. I felt that a timer would be best for this situation. The enemy class extends FlxSprite. I have three class level variables to help with managing the sprite's direction private var movementTimer Timer private var movementTimerEvent TimerEvent private var forward Boolean public var directionSet int 0 In the constructor, I instantiate the timer like this create timer for movement movementTimer new Timer(3000) set listener for movement movementTimer.addEventListener(TimerEvent.TIMER,SetDirection) start timer movementTimer.start() set initial direction forward true The function called on the timer interval is as follows Reverse direction of this sprite public function SetDirection() void directionSet increment direction set for debug purposes FlxG.log("direction set") FlxG.log( directionSet) if(this. forward) this. forward false set the direction the sprite is facing this. facing RIGHT else this. forward true set the direction the sprite is facing this. facing LEFT Then, the update function evaluates the forward flag to determine direction of movement Update this sprite override public function update() void super.update() if(this. forward) this.acceleration.x this.maxVelocity.x .5 else this.acceleration.x this.maxVelocity.x .5 However, my sprite is not reversing direction, it just continues forward. What am I missing? EDIT I added additional variables and calls to FlxG.log for debugging purposes, and it seems that SetDirection is never called, but I am not sure why.


Sprites are sometimes blurry in Flash I am playing around with drawing an SVG sprite (imported in through Embed ). Depending on the coordinates of the image, sometimes it appears more crisp than others. The following image shows how at different locations is it rendered differently (Image link You may have to download and zoom in with an image editor to see it) You'll notice that the middle sprite is more blurry than the ones on the sides. Does anyone know why this is? Any help would be appreciated.


Affect movieclip scale from a .as doc to another I've been working on a game following a tutorial on the internet, the game is an avoider where you have the Avatar, that has to avoid the objects that fall. The way it is made is I have a DocumentClass which addChild's the screen you should be seeing and removeChild's the screen that you were. For example first it loads the menuScreen, then when you press play unloads menu and loads playscreen. When you die it loads the gameoverScreen and loads the playscreen. And from the gameOverScreen you can press the SHOP button to go to the shop. From here on I'm on my own and not following any tutorials. The shop has a button that is supposed to alter the Avatar's X and Y scale to 0.5, but the problem is how do I make that work? I tried creating a sharedObject.data.avatarSize, on the store's size button the code would be something like sharedObject.data.avatarSize 0.5 And on the AvoiderGame.as, which is the most of the actual game, on the part where the avatar is created I tried putting this after it's creation scaleX.avatar sharedObject.data.avatarSize scaleY.avatar sharedObject.data.avatarSize This did not work since it gives me the error 1009 saying can't access something that is null. I tried this before "using" the sharedObject if( sharedObject.data.avatarSize null ) sharedObject.data.avatarSize 1 But it did not work... So now I'm not sure on what to do. I know we should reduce global variables as much as we can but how do I do it? EDIT Also, if it helps, I'm using Flash CS5 and working with AS3.0 and if you don't know about flash, you can also tell me how you would do it on any other language and I would try to convert it to flash.


Large Sprite Performance I've got a large Sprite generated using a set of vertices(x,y coordinates) and a bitmap pattern (using moveTo, lineTo, beginBitmapFill, endFill ...etc). It's about 15000 pixels wide and between 1500 2000 pixels high depending on the level it's the terrain for a 2D game. My question is what is the best way to display move it on the stage performance wise? Currently I'm just adding it to the stage as is...I get decent frame rate memory cpu usage but I want to optimize it for slower PCs. Any ideas? I've been reading a little about blitting but I'm not sure how to implement it in my case. Thanks.


How should I do my collision response? I'm making a small lockpicking simulator. Obviously I'll need the pick to not pass through the lock, and I'll need the pins to move when you tap or push them with the pick. Here's what I have so far, just to give you an idea. http megaswf.com serve 2433982 As you can see, the collision detection is pixel perfect. I've looked into a couple of different ways of doing collision response, but it seems like such a vast and complicated field. Any time I come up with a possible solution I start noticing flaws like what would happen if more than two objects collided and so on. I've looked into physics engines like Box2D, but it seems like such overkill considering the, I think, simple nature of the game I'm trying to make. I don't like the idea of using a huge library that I don't even begin to understand just because I can't figure out how to do collision response. But I just don't know where to begin. Maybe I will have to use a library. If anyone with experience could, based on that demo and what I'm trying to do, suggest a course of action, I'd really appreciate it.


Fixed timestep with interpolation in AS3 I'm trying to implement Glenn Fiedler's popular fixed timestep system as documented here http gafferongames.com game physics fix your timestep In Flash. I'm fairly sure that I've got it set up correctly, along with state interpolation. The result is that if my character is supposed to move at 6 pixels per frame, 35 frames per second 210 pixels a second, it does exactly that, even if the framerate climbs or falls. The problem is it looks awful. The movement is very stuttery and just doesn't look good. I find that the amount of time in between ENTER FRAME events, which I'm adding on to my accumulator, averages out to 28.5ms (1000 35) just as it should, but individual frame times vary wildly, sometimes an ENTER FRAME event will come 16ms after the last, sometimes 42ms. This means that at each graphical redraw the character graphic moves by a different amount, because a different amount of time has passed since the last draw. In theory it should look smooth, but it doesn't at all. In contrast, if I just use the ultra simple system of moving the character 6px every frame, it looks completely smooth, even with these large variances in frame times. How can this be possible? I'm using getTimer() to measure these time differences, are they even reliable?


flash hitTestObject() mafunction? Is there a way that even though two objects that have different y co ordinate collide? In my game, I wanted to make my object rotate as explained in previousquestion. When I added the code, the object now dissapears from the scene even though it's x and y co ordinate are in the scene. I traced(in the function that kills the characer if it touches it. i.e hitt) the x and y value of the object and found that it is still there on the scene. The code is ground.addEventListener(Event.ENTER FRAME, hitt) function hitt(event Event) if (green.hitTestObject(ground) blue.hitTestObject(ground) brown.hitTestObject(ground) black.hitTestObject(ground)) dead true else if (kill.hitTestObject(black) kill.hitTestObject(green) kill.hitTestObject(blue) kill.hitTestObject(brown)) dead true trace("here",kill.y,green.y,green.x) The output is SWF hello.swf 519178 bytes after decompression here 608.95 401 62.55 I don't know what's going on? Please Help..!!


Is flash game development not considered 'proper' game development? I've come across this a couple of times. That flash game development is not 'proper' game development when compared to XNA or even Unity. Mentioned here Need guidelines for studying Game Development Also here in some comments Where to start with game development? This judgement also befalls java, according to some. Is it because in flash its so easy to draw graphics and to import and add on to the stage any element we want and also because flash needs a 'container program' to run and others don't? But flash is by far way easier to 'distribute' than any other of those mentioned above. Maybe except for iphone or android games.


Need help in determing what, if any, tools can be used to create a free Flash game Yes I proudly and sadly declare that I am a complete nincompoop when it comes to Flash, and I have been fishing around the big wide web for information. The reason for this is that I have been contracted to create a game(s) for a website the usual flash based games caveat. Please I do not mean things like by those gaming generator websites, I mean small yet professional games but the caveat, as always, is that impossible dream it needs to be done all for free. The budget...well imagine it as not there. Annoyingly is that I am a game designer yes, but with a ridiculously tight deadline I haven't got much time to re learn (ah the heady days of programming at uni) everything by the end of March, so I'd like to ask some people who know their stuff rather than keep looking at a gazillion different things. This is my understanding with the flash sdk you can create a game, albeit you need to be pretty programming savvy. FlashDevelop helps there yet I am not entirely sure how. Yet even FD says to use Flash for the animation graphics. Yes its undeniably powerful but as I said there is the unattainable demand of no money. The million dollar question what, if any, tools can I use to create a free flash game?


Tile based maps in AS3 I want to make a tile based platformer in AS3. I want my game to read an external maps file (in xml or json or somethimg similar) to draw a tile based map. I've seen loads of tutorials for this in AS2 and other languages, and the few I've found in AS3 are either incomplete or filled with extra unnecessary features. I just want to be able to draw a basic map from sprites in Flash. Any links or information to point me in the right direction would be appreciated.


How to add a ramp in a flash game? I am a huge novice and this isn't really a programming question, but here I go, say I want to make a game that involves rolling up a ramp like this one to move upwards, similar to how it would work in an old Sonic the Hedgehog game or something, how would I go about doing that, where could I find a good recourse to learn this?


Required Security Precautions for Flash AS3 Multiplayer Game I have created a couple of games in Flash AS3 and am playing with programming a flash based multiplayer (possibly mmo?) game where the application will communicate with a server over a socket connection. Obviously I need some form of authentication (username and password) but what other security precautions do I need to explore to prevent cheating?


What is the standard way of delivering HTML5 games to portals and such? Let me explain what I mean by "standard way of delivering"... Think about Flash games sites. Flash games can be delivered as a single file, either hosted by the site, or, I guess, provided by someone else. HTML5 games, on the other hand, don't have something so standard. Usually, they have their own page, and portals just link to that page. I think that it greatly hinders the purpose of that portal, because, well, you want people to stay on your site and look for other games. Now, I think that a some kind of iframe way of delivering games would help solve this problem greatly. I saw some games doing that, and they were often included on tutorial sites to show a live example, which is obviously a great thing. So, is there a standard at all? Any suggestions? Can you create a game that just preloads itself in an iframe (I heard something about a "single document" or something)?


Are there any command line swf packing tools? I want to packing image files(png, jpg) into swf, then game can load files easily. But I want to do this by a Makefile, not FLASH CS. Do you know any command line swf tool set can do that? And can I packing XML files into it as well?


Beginner flash game development Start with framework or from scratch? I want to write some simple flash games (as a hobby). I have a lot of programming experience, but no experience with Flash ActionScript. My question is As a beginner, is it a good idea to start with a framework like Flixel, FlashPunk or PushButton or would it be better to write my first games from scratch? Also, if you vote for using a framework, which one would you recommend? What are the differences? And another question What about Flex, would you recommend using it?


How can I save a global high score for all players in AS3? I am developing a game in which I want to make a scoring system where the global high score is stored and shared by all players. I am using Flash and ActionScript 3. Until now I've used SharedObject.getLocal("savename") for saving score individualy but I cant figure out the way to store a common high score for all players.


Movie clip in a button changes on hover I have a button for my game which has a MovieClip in it. It consists of an image of a lock and an image of an item, representing the item being locked and unlocked. I make the button become slightly smaller when the mouse is over it to create the effect of a button slightly down. For some reason, however, this makes the MovieClip in the button go to the next frame. I have no Actionscript code in the button or any frame except stop() on the first frame of the MovieClip, so I really don't understand why this would happen. It only goes to the next frame when I hover my mouse over the button and then quickly goes back to the first frame (since there's no stop() in the second frame). After experimenting with stop() in both frames of the movie clip, it does indeed only happen when my mouse enters the button. Leaving the button doesn't do anything and the button left alone doesn't do anything. It just changes the frame when I hover my cursor over it. There's absolutely no script involved aside from stop() in the first frame of the movie clip in the button. What could be the cause of this problem?


Camera and enemy behaviour in AS3 platformer beginner in AS3 here. I am working on a platformer game based on the code of a provided example exercise. I have the following problem I have an enemy who shoots bullets. The enemy is the parent, and the bullet are the child. When I move to the next scene (level), the bullets are still there, but invisible, even using the removeEventListener to shut down the bullet hit check. Here is the code of the child "disparoEnemigo mov" addEventListener(Event.ENTER FRAME, fl MoveEnemyShot) function fl MoveEnemyShot(event Event) try if (enemy shot.y lt 300) if (enemy shot.hitTestObject(Object(this.parent).mario)) variablesGlobales.variables().vidas 1 Object(root).texto.text variablesGlobales.variables().vidas.toString() trace("vidas " variablesGlobales.variables().vidas) if (variablesGlobales.variables().vidas lt 1) MovieClip(this.parent).gotoAndStop(2) this.parent.removeChild(this) removeEventListener(Event.ENTER FRAME, fl MoveEnemyShot) else enemy shot.y 3 else trace("LLEGADA") removeEventListener(Event.ENTER FRAME, fl MoveEnemyShot) this.parent.removeChild(this) catch (error Error) removeEventListener(Event.ENTER FRAME, fl MoveEnemyShot) import flash.events.Event import flash.media.SoundMixer addEventListener(Event.ENTER FRAME, fl EnterFrameHandler) function fl EnterFrameHandler(event Event) void try if (this.hitTestObject(Object(this.parent).mario)) SoundMixer.stopAll() var sound gameOver new gameOver() sound.play() Object(this.parent).mario.y 1000 Object(this.parent).mario.x 15 trace("Mario dies") var cartel StageLose new StageLose() stage.addChild(cartel) cartel.x 85 Object(this.parent).mario.y 1000 catch(error Error) removeEventListener (Event.ENTER FRAME, fl EnterFrameHandler) And this is the code of the parent, "enemigo mov" var leftPressed Boolean true var rightPressed Boolean false stage.addEventListener(Event.ENTER FRAME, fl MoveEnemy) function fl MoveEnemy(event Event) try if (leftPressed) enemy1.x 0 if (enemy1.x lt 120) leftPressed false rightPressed true else if (rightPressed) enemy1.x 1 if (enemy1.x gt 120) rightPressed false leftPressed true var number Number Math.random() if (number lt 0.05) amp amp variablesGlobales.variables().coleccionEnemigos.indexOf(this) ! 1) trace("creation") var disparo disparoEnemigo mov new disparoEnemigo mov() this.parent.addChild(disparo) disparo.x enemy1.x 115 disparo.y enemy1.y 115 disparo.z 50 trace(disparo.x " " disparo.y) catch(error Error) removeEventListener(Event.ENTER FRAME, fl MoveEnemy) In both codes, "mario" is the player character. What I need to do is to stop the bullet creation of ""disparoEnemigo mov" when we move to the next scene. Shouldn't the "removeEventListener(Event.ENTER FRAME, fl MoveEnemy)" line stop the bullets to check if there is any collision with the player? Any help or resource will be helpful. Thank you so much!


Use of FlxG.camera.follow to follow a character vertically I am developing a prototype for a game in Flixel in which a character floats upward continually to traverse the level. I would like to have a "tall" layout for levels and set the FlxG.camera to follow the character as he floats upward. My issue is in understanding the proper use of FlxG.camera. I have my game constructor coded as follows package import flash.display.Sprite import org.flixel. SWF(width "640",height "480",backgroundColor " 000000") public class MyGame extends FlxGame public function MyGame() super(320,240,PlayState,2) forceDebugger true In the override of create() in the PlayState.as file I attempt to set the camera to follow the player as follows public var TheClimber BalloonHero override public function create() void set background color FlxG.bgColor FlxG.BLUE Set data for player TheClimber new BalloonHero(FlxG.width 2 5,480) Add camera and set it to follow The Climber which will automatically set the boundaries of the world. FlxG.camera.setBounds(0,1280,640,1280,true) FlxG.camera.follow(TheClimber,FlxCamera.STYLE PLATFORMER) add player to the game add(TheClimber) I assumed this would set the camera bounds to twice the height of the SWF background(i.e. the FlxG height) and then scroll the background along with the specified FlxObject(TheClimber in this case) until it had reached the height of the game. However, I must be going about it incorrectly because when the zoom is 2 and the game height 720 the camera starts at the top of the screen with the player character not visible at the bottom of the game height. Is there a way to start with the camera game focused on the bottom of the game object(FlxG.height) ? Or am I going about this the wrong way and have other issues with the way I am using the camera? Thanks in advance.


Examples of good Javascript HTML5 based games Now that Flash is largely being replaced with HTML5 elements (video, audio, canvas, etc.) are there any good examples of web based games built on completely open standards (meaning Javascript, HTML and CSS)? I see a lot of examples of pure HTML5 implementations of what was once only in Flash (like stuff here http www.html5rocks.com ) but not many games, a domain which still seem dominated by Flash. I'm curious what's possible and what the limitations are.


Rotation of objects from different axes in Flash AS3 In my game, I have made 4 lines with different colors to form a square but the colored lines are different objects. I want to rotate the lines in a way that the lines will still form a square. Eg But I'm only able to rotate them on the central axis, so, it forms a cross The code for leftPressed is if(leftPressed) black.rotation 90 blue.rotation 90 yellow.rotation 90 red.rotation 90 So, I need to know how to rotate objects on different axes.


Splitting a large number of FLAs into multiple gifs I currently have a large number (300 or so) FLAs that I wish to convert to GIFs for a HTML5 game I'm creating. Each one of these FLAs contains multiple animations in the timeline, and they all have the same basic structure (Animation one in frames 1 25, animation 2 in frames 26 34, etc.) Is there a way I could automate splitting them up and converting them into the GIFs? I am on a Mac, but do have access to a Windows machine, so any solution will work, basically. I don't have the Windows version of Flash though, so that is annoying. Thanks in advance, and if this the wrong StackExchange to ask in, then I apologise in advance.


Stage3D Camera pans the whole screen I am trying to create a 2D Stage3D game where you can move the camera around the level in an RTS style. I thought about using Orthographic Matrix3D functions for this but when I try to scroll the whole "stage" also scrolls. This is the Camera code public function Camera2D(width int, height int, zoom Number 1) resize(width, height) zoom zoom public function resize(width Number, height Number) void width width height height projectionMatrix makeMatrix(0, width, 0, height) recalculate true protected function makeMatrix(left Number, right Number, top Number, bottom Number, zNear Number 0, zFar Number 1) Matrix3D return new Matrix3D(Vector. lt Number gt ( 2 (right left), 0, 0, 0, 0, 2 (top bottom), 0, 0, 0, 0, 1 (zFar zNear), 0, 0, 0, zNear (zNear zFar), 1 )) public function get viewMatrix() Matrix3D if ( recalculate) recalculate false viewMatrix.identity() viewMatrix.appendTranslation( width 2 x, height 2 y, 0) viewMatrix.appendScale( zoom, zoom, 1) renderMatrix.identity() renderMatrix.append( viewMatrix) renderMatrix.append( projectionMatrix) return renderMatrix And the camera is send directly to the GPU with c3d.setProgramConstantsFromMatrix(Context3DProgramType.VERTEX, 0, cameraMatrix, true) And these are the shaders Vertex Shader m44 op, va0, vc0 mov v0, va1.xy mov v0.z, va0.z Fragment Shader tex ft0, v0, fs0 lt 2d,linear,nomip gt mov oc, ft1 Here is a example and here are two screenshots to show what I mean How do I only let the inside of the stage3D scroll and not the whole stage?


Can a texture's UV coordinates be animated (scrolled) when part of a SpriteSheet? Alright so my question is about texture manipulation in Flash Stage3D Context3D using AGAL for the shader language. But I'm pretty sure this could be applicable in other situations involving GPU programming. So the goal is, if I wish to have a "scrolling" animation on a certain tile (like a tile of water), can I still have that texture packed along with all the rest of my sprite assets? Or does it have to be alone to avoid bleeding nearby assets? From what I can understand, when the FragmentShader samples the portion of the texture offsetted during a scroll animation, any coordinates outside the desired texture will reveal incorrect nearby textures. Some example to clarify Fluid motion (lava, water waves, acid bubbles) Background motion (cloud, trees, houses) Directional indicators (lines on a conveyor belt, race circuit dash regions) Do I need to use some extra operations to wrap the texture if it tries to sample beyond a certain point? How could those constraints be defined transferred to the FragmentShader? UPDATE To clarify, I would like to scroll only on 1 single tile that would be part of a SpriteSheet TextureAtlas (meaning, mixed with other existing sprites part of a game project). Imagine you had something like this (but better artwork, of course) So a 256 x 256 Texture with a "Wavy Water" tile in the top left corner (128 x 128 in dimensions). How would you write a shader that can scroll through ONLY the water portion to give a sense of motion without running over the adjacent textures (ex faces and cars). How would you handle situations where the Quad is much larger than the texture and could repeat many times as well in combination to being able to scroll it?


How can I develop Flash games without expensive software? I've been playing with writing flash games in my spare time, but up to this point, I've just been using a trial version of Adobe Flash Professional. I'm aware of FlashDevelop, but their documentation is basically non existent when it comes to the workflow of developing purely with FlashDevelop. Does anyone know of any good tutorials for developing Flash games purely with FlashDevelop? Alternatively, does anyone have any other free cheap software recommendations to use in place of Flash Professional?


Should all stats only exist on MySQL database for my Flash browser RPG? I'm creating a browser RPG in Flash which will have some multiplayer elements and in app purchases so security is a high concern. Would it be better to have all game stats like health and such exist only in the MySQL database and retrieve them every time I need them? The game is turn based, but that would still require very frequent connections to the database. I could use local copies to cut down on the number of connections, but I imagine that would make it much easier for people to cheat.


Host Migration (P2P) with RTMFP and AS3 I was wondering if this is a possibility with RTMFP since it acts like UDP P2P.. Host Migration Player A starts and host a game.. Player B and C connects.. Player A quits.. Player B is now assigned as new host server Game not interrupted or disconnected. Maybe some basic example on how this is done with RTMFP AS3?


Make colour change depending on time I'm making a Flash game (ActionScript 3) and for dynamics I'd like to make the background change colour depending on the clients' time of day. I have a rough idea on how I want to do this, At sunrise, I want the background to be yellow orange In the middle of the day, I want the background to be cyan clear sky colour At sunset, a reddish orange During the night, a navy blue. I will be using this method to change the colour of the symbol, which is at default a dark grey colour. (unless someone points out a better way to do this). This means I have access to the red, blue and green components of the background. On implementing the system itself I suppose I could simply get the client time and do if (hour gt 9) and (hour lt 18) colour SKY BLUE and similar for the other times of day, but I'd like it to tween slowly between colours as time progresses. For example, if 6AM is yellow orange and 9AM is blue, 7 30AM would be yellow moving towards blue. I have a feeling I need to come up with an algorithm to link time to the RGB components of the colour, but I've always been terrible at maths and I can't think of how to do this, so that's why I'm asking. Please tell me how I would do this, both concept outlining and sample code, or even just tips are welcome. )


Change the tilemap shown on stage in Flixel I am building a simple platformer using Flixel, beginning with the source code from Flixel creator's EZPlatformer . I would like to adjust the level's tilemap when the player sprite enters overlaps with a sprite representing a door. I use Flixel's built in function to track if the player overlaps the door sprite. exits is a class level variable public var exits FlxGroup I call this function in the Update event to check for overlap FlxG.overlap(exits,player,UpdateScreen) I successfully catch when they overlap, however when I try and load the new tilemap, the old one continues to show. I use this function to attempt to update the tilemap on the screen public function ChangeScreen() void load the screen and locations of sprites(e.g. player, exits) based on current screen switch(currentScreen) case 1 load tilemap level new FlxTilemap() level.loadMap(FlxTilemap.arrayToCSV(data1,40),FlxTilemap.ImgAuto,0,0,FlxTilemap.AUTO) add(level) break case 2 load new tilemap level new FlxTilemap() level.loadMap(FlxTilemap.arrayToCSV(data2,40),FlxTilemap.ImgAuto,0,0,FlxTilemap.AUTO) add(level) break I thought that I would need to first call remove on level to take it off the stage, and then call add on it, however, when I do that, the tilemap does not show up at all. What is the correct way to do this?


How can I manage an animated UI from ActionScript? I'm trying to code a game of Poker in AS3, using Flash Professional CS5 (although I try to keep as little code as possible in the .fla). When a player bets, for example, I need to be able to show an animation of some chips sliding into the center of the screen. After that happens, the AI decides what to do, and another animation of their chips occurs. Then a menu pops up so the player can choose their own next action. And so on. I started writing a UIBet interface with bet(amount) and raise(amount) methods and so on, that you would implement with a class extending MovieClip and fill in the methods with gotoAndPlays to various animations. But if I just have code that calls these graphics object like so playerUIBet.bet() aiUIBet.bet() menu.prompt() Then, if I understand Flash correctly, what'll happen is that the code will finish executing, and then all of those animations will happen simultaneously. How can I get these animations to happen sequentially? What if I want to insert pauses between them? Some kind of solution like this? What's the best way to do this in AS3?


Level Design Char Traveling to and from a Site I'm developing a 2d platformer game where your character can travel to and from sites as he pleases. To travel to and from these sites the character must travel along a path between his current location and his destination (see illustration below). And of course the idea is that you can travel through the level backwards if you wish to return to Site One. But as you probably realize, doing this may provoke some serious problems, and will put limitations on the level design (no cliffs or long drops because then your character wouldn't be able to overcome them on the way back). I've come up with multiple ways to overcome this (such as designing two levels for the same path etc), but I was wondering if anyone else has any creative work arounds for this problem. Any help and advice is appreciated.


Fixed timestep with interpolation in AS3 I'm trying to implement Glenn Fiedler's popular fixed timestep system as documented here http gafferongames.com game physics fix your timestep In Flash. I'm fairly sure that I've got it set up correctly, along with state interpolation. The result is that if my character is supposed to move at 6 pixels per frame, 35 frames per second 210 pixels a second, it does exactly that, even if the framerate climbs or falls. The problem is it looks awful. The movement is very stuttery and just doesn't look good. I find that the amount of time in between ENTER FRAME events, which I'm adding on to my accumulator, averages out to 28.5ms (1000 35) just as it should, but individual frame times vary wildly, sometimes an ENTER FRAME event will come 16ms after the last, sometimes 42ms. This means that at each graphical redraw the character graphic moves by a different amount, because a different amount of time has passed since the last draw. In theory it should look smooth, but it doesn't at all. In contrast, if I just use the ultra simple system of moving the character 6px every frame, it looks completely smooth, even with these large variances in frame times. How can this be possible? I'm using getTimer() to measure these time differences, are they even reliable?


Water simulation in Isometric game I'm creating a game in Flash AS3 in which the player needs to modify land in order to direct the water in the right direction. However, water simulation is a new topic for me and I'm kinda stuck. It doesn't have to be like realistic water, with ripples and stuff, but it has to flow, and if there's enough water, it needs to rise. I've thought up two different types of water A Spring Infinite source of water. Used for simulating seas and stuff. Water block Just one unit of water. My current implementation shows how I'd like the water to spread, but it doesn't rise, and doesn't allow for finite water. Also, the spreading isn't accounting for any amount of water, it just duplicates instead of actually moving units of water. I'm curious to how you guys would solve this problem. Any examples pseudo code is always appreciated. Current version http dl.dropbox.com u 319897 ProjectWater.swf You can manipulate the land by pressing left mouse. And can simulate one step of water at a time by pressing A. Source of the water part http pastebin.com Js2kYt4y


How to build a bones animation engine? I want to develop a flash game. It would draw a stick man, and edit his pose. I think what I need to learn are bones animation and physics engine. Can anyone introduce some good resources to learn both?


Improving shading of procedurally generated pixel art sprites I've been working on a sprite generator and I'm having a hard time figuring out how to add shading automatically. Here are some examples of the generated sprites Currently what I'm doing is checking where a flat color meets a dark boundary, and then applying either a highlight or a shadow depending on the direction. This is of course really boring. I've tried searching for other methods, but all I could find were AI examples. Does anyone know of any particularity simple yet clever ways of adding shading automatically? I've thought of expanding the check up to 5 cells, and using a set of pre determined patterns to generate the shading, but I'm just not too sure


Tiled map editor and objects Ive been searching for an easy way to group multiple sprites of a spritesheet into a single entity. Im using tiled editor as written at the title. Some objects might be larger than the tile size and i need a way to let my game know that in order to manipulate these objects. I dont want to create new tilesets with different sizes for all objects. Is this possible in this app and if not do you know another that can handle this?


How to set a static size for an object in GameMaker? I have many sprites with different sizes, and I have an object in which I set those sprites, but this object gets resized by the currently displayed sprite. How can I set a fixed size for the object so that it can no longer change size? Thanks for any help.


libgdx sprite position relative to body Apologies if this is a reiteration, as I couldn't find another discussion of this over the past couple days. Issue I'm using libgdx and box2d, and I'm currently updating the sprite's position to the body's current position every render call. Using a debugRenderer to see the bodies, I see that there is fairly noticeable lag between the movement position of the body and the sprite that is being moved relative to it. Question Is this lag normal, possibly to perform collisions ahead of time? If not, should I be manipulating relating the positions differently? Thanks in advance! Solution This was a coding error on my part. Pointed out by a good reply below, I was updating the position of the sprite relative to the body and then stepping the physics. Thus never actually setting the sprite to the body's CURRENT position. Thanks!


Use an external sprite or image file in flixel game in flashbuilder Is there any way to use an external image sprite file for the graphic of a FlxSprite instance? Say I declare my player FlxSprite as follows player new FlxSprite(FlxG.width 2 5) player.makeGraphic(10,12,0xffaa1111) How could I instead instantiate the FlxSprite using my own spritesheet or image? I have seen others do it in the Flixel demos , and in the featured games.


Separate objects for hitbox and sprite? I am making a technically top down game with a shifted perspective. It shows more of the characters side, not just above their head. I think most "top down" games have a similar art style. Due to this, only the bottom of the character sprite should collide and interact with game objects. Should I use two separate objects for the hitbox and the sprite? It seems inefficient to do this. Is there some other solution? For reference, I am using python3 and the pygame library. I am using the sprite class from pygame. My player class inherits from the sprite class and is comprised of a surface object for the sprite image, and a rectangle object for the coordinates and length width. Using a separate object for the hitbox and sprite would require to classes for this.


How to decide sprite size for isometric tile textures? When I draw these textures on screen, I put them in a sprite and specify a width and height to draw the sprites in like this new Sprite( width 10, height 10, texture greenTileTexture ) This draws the sprite at size 10x10 on screen. Let's say I want to have tile size of 10. I use this This is the size of the textures as in png. let textureWidth greenTileTexture.width let textureHeight greenTileTexture.height let textureRatio textureWidth textureHeight This is the size that draws on screen. let spriteWidth 10 let spriteHeight 10 textureRatio Now for the 3x2 tile I don't know what the width should be since it takes more tiles. I want to draw isometric tiles with arbitrary tile sizes. For example above picture there are 1x1 and 3x2 sized tiles. The textures have arbitrary height because of decoration. a is the tile's height b is texture's height c is tile's width. I can't figure out what the sprite size should be when I lay these out on screen. Maybe I should have exact tile sizes cover the whole texture without decorations (a b). But still what the sprite size should be?


pygame avoiding sprite 'jitters' on rotating the image Is there a common trick for getting around sprites that are changing directions 'too quickly' and causing their sprite to display erratically? In this project, the player moves in 8 directions by determining the abs() distance between the mouse's X and Y coordinates and its own obj.rect.center. If the absolute value is less than obj.speed, it simply moves to that point. If it is greater, it moves the distance its speed allows it to move in that direction. When it's time to draw the sprite, PyGame rotates it in accordance to obj.direction by using a dict called SPINNER with stored default values to pass to pygame.transform.rotate. def draw(obj) drawImg pygame.rotate.transform(obj.img, SPINNER obj.direction ) drawCtr drawImg.get rect(center obj.rect.center) DISPLAYSURF.blit(drawImg, drawCtr) This is fine for the foolish AI characters which typically make very few course corrections however, small movements of the mouse can cause the player's obj.direction to update very quickly, which looks chaotic. Is there a simple way to curb this behavior? My first guess is to bog down the player object with values that retain its previous state and then determine the amount of rotation to apply, but I have a feeling the better solution is to assign that responsibility to the 'view' and not the 'model'. I'm not sticking to any hard and fast rules regarding MVC, but I am trying to engage in enough separation of concerns that 'view like methods' don't make 'controller like' changes to 'model like' objects, if that makes sense.


PYGAME Sprite movement seize to function when entire X and Y span is reviewed I've created an sprite class that has a detection radius checking if the player enters the zone. If yes, the sprite moves towards the player. It works perfectly fine when the sprite checks for three directions (X is greater, X is lower, Y is greater lower), in other words, the sprite only moves up and down if all four directions are enabled.. Here is my code for the move function def move(self) target x, target y self.target.pos if self.mob wc 1 lt 24 if self.pos x lt target x self.vel vec(self.speed, 0) self.image self.game.orc mob walkRight self.mob wc 6 self.mob wc 1 elif self.pos x gt target x self.vel vec( self.speed, 0) self.image self.game.orc mob walkLeft self.mob wc 6 self.mob wc 1 if self.pos y gt target y self.vel vec(0, self.speed) self.mob wc 1 elif self.pos y lt target y lt if this condition is disabled self.vel vec(0, self.speed) The sprites move perfectly upwards self.mob wc 1 towards the player, shifting between moving On X and moving on Y. else However, if it is enabled, the self.mob wc 0 sprites ONLY move on the Y field Here is my code for the update function def update(self) self.rect self.image.get rect() self.rect.center self.pos self.pos self.vel self.game.dt self.pos x, self.pos y self.pos target dist self.target.pos self.pos if target dist.length squared() lt self.detect radi 2 self.move() else self.vel vec(0,0) self.image self.game.orc mob img For the way they move i followed this post. I am aware my build differs due to the use of vectors, which is something that i'm suspecting may be the cause of the issue. If anyone have any idea or tips to why this issue may occur, please tell me cause i've been sitting trying to fix this for 3 hours now..


How can I get the width and height of a picture? I'm trying to make a script on RPG Maker XP that needs the width and height of an image to do some calculations. I tried picture.bitmap.widthand picture.bitmap.height but it returned the width and height of the image that is being shown in the screen. For instance, if the image is 800 pixels height, and the image takes 400 pixels in the screen, picture.bitmap.height will only return 400. This is the code I'm using picture Sprite.new picture.bitmap RPG Cache.picture("picture") pictureWidth picture.bitmap.width pictureHeight picture.bitmap.height


How to make a map surface object I'm making a 2d tile based game. In pygame I could create a map like this screen pygame.display(resolution) map pygame.Surface(width, height) for tile in all tiles map.blit(tile) screen.blit(map) The strength of this is that I can scroll the map by changing the map surface x and y. Also all the in game coordinates are conveniently set in relation to the map rather than the screen. However I can no longer use pygame, and I'm trying to switch to pyglet instead. As far as I can tell pyglet doesn't have an equivalent surface class built in, and therefore I need to build my own, this is what I need help with. I've used pygame.Surface extensively without really understanding how it works (python programmers these days huh). So I'm hoping you can offer some insight on how to get started. I know it needs a width and height, as well as some kind of list of the sprites which have been 'blitted' to it, and that moving the surface itself moves all the contained sprites, so surfaces blitted to it are somehow anchored to the surface rather than the screen. How is this stuff done in pygame, and how do we create a pyglet friendly version?


Concerns about how to efficiently implement sprite atlas I currently transform (translate, rotate, scale) a bunch of vertices in my own Java code, then populate an mPositions array and an mTextureCoordinates array, which draws a bunch of different textured sprites to the screen in one GL draw command. Works great. However, I now wish to move the transformation process away from native Java code and over to the vertex shader, and so I will need to pass into the shader transformation matrices which encode the translation, rotation, and scaling operations for each sprite. Given my current approach the naive and obvious choice is to introduce another array mTransformations, passed into the shader via a GLES20.glVertexAttribPointer command, which contains a matrix for each and every vertex. But this way seems a little wasteful for two reasons I will have to add the same transformation matrix 6 times per sprite to the mTransformations array since each square sprite is made of 2 triangles (3 3 vertices) Since I'm now going to use the shader to perform the transformations, the 6 canonical coordinates of each square sprite (two triangles) will be the same for every sprite. In effect I'd have to populate mPositions with the same coordinates over and over for each sprite. Is there a more efficient way to do achieve what I want?


How to handle 2d avatar creation I am new to game design and i am creating a MMORPG that allows players to create 2d avatars that can be customized. If i had lets say a male character model (no equipment no armor). How would i handle body variation for this male model? If this has been answered please provide link. I know layering customizing for equipment and armor has but not morphing the character sprite itself.


How to create custom methods for sprite groups in pygame? I want to use sprite groups in my game using pygame and the default draw isn't enough. I have tried some tutorials but I failed. So, being more specific I want to create custom methods for sprite groups in pygame such as .handle event (this method can exist at all sprites or not).


Common practice when handling sprite animation Let's say I'm using the following sprite as a sample to try LibGDX Animation and TextureRegion. http www.smackjeeves.com images uploaded comics 7 8 78bc6b62fEySW.gif As you can see, the provided image above has different width amp height per image. The width when Zero performs a slash is different when Zero stands. Is it a good practice to create a padding margin for every image so they have similar width amp height. Or should I just have all the sprite cramped like that and try to handle it in the backend? Thanks


pixel art tree using 3 4 perspective Is there a correct way to calculate the exact proportions for drawing a tree sprite for an RPG. These are the types of trees I am aiming to create(sorry for the huge picture, I dont how to scale it down) The tutorial here, http cyangmou.deviantart.com art Pixel Art Tutorial 3 The perfect crate 311089437, perfectly describes how to create an object using the 3 4 perspective but when I apply this method when drawing a tree it doesn't quite work. Is there a different method that I could use for creating non rectangle shaped objects like a tree or other strangely shaped objects, or am I going about it wrong? Thank you in advance D.


Limiting the speed of a dragged sprite in Cocos2dx I am trying to drag a row of sprites using ccTouchesMoved. By that I mean that there is a row of sprites (they are colored squares) lined up next to each other and if I grab one with a touch the rest follow it. If a sprite moves off screen I want to append it to the rest of the sprites in formation. However, if the sprite formation moves too fast it creates a slight gap between it and the appended sprites. How do I go about limiting the speed that I can drag the sprite with ccTouchesMoved? This is the only solution I could think of to my problem. If anyone has another suggestion to prevent this sprite gap from happening I would appreciate it. In ccTouchesBegan I loop through the sprites, mark the one that is touched(used for another part of game), and save the distance between the touch point and every other sprite. touch (CCTouch )(touches gt anyObject()) location touch gt getLocation() for (int i 0 i lt grid gt getGridSizeY() i ) for (int j 0 j lt grid gt getGridSizeX() j ) button grid gt button(i, j) button gt setDistanceX(location.x button gt getPositionX()) button gt setDistanceY(location.y button gt getPositionY()) if (button gt boundingBox().containsPoint(location)) button gt setTouched(true) Then in ccTouchesMoved I loop through all the sprites again and set them to always be the same saved distance from the touch point. touch (CCTouch )(touches gt anyObject()) location touch gt getLocation() for (int i 0 i lt grid gt getGridSizeY() i ) for (int j 0 j lt grid gt getGridSizeX() j ) button grid gt button(i, j) button gt setPositionX(touchLocation.x button gt getDistanceX()) button gt setPositionY(touchLocation.y button gt getDistanceY()) This is the update method code only for a sprite moving off the left side of the screen. No point in writing all the sides until I get one side to work for (int i 0 i lt grid gt getGridSizeY() i ) for (int j 0 j lt grid gt getGridSizeX() j ) button grid gt button(i, j) Replaces button if it goes off left side of grid if (button gt getPositionX() lt grid gt button(0, 0) gt getPositionX() button gt boundingBox().size.height 2) button gt setPositionX(grid gt button(grid gt getGridSizeY() 1, 0) gt getCoord().x button gt boundingBox().size.height 2) button gt setDistanceX(location.x button gt getPositionX())


How can I make tiny sprites larger? I used a 16x16 sprite pack to make a 640x640 map in pygame The problem is that everything is extremely tiny. How could I go about making the expected "JRPG" look, like this for instance I have tried so far to double the size of the map tiles using pygame.transform.scale(tile,(32,32)) but that makes everything look terrible Here is how I am rendering the map import pygame import pytmx from pytmx.util pygame import class tileRender def init (self,filename) tm pytmx.load pygame(filename) self.width tm.width tm.tilewidth self.height tm.height tm.tileheight self.tmxdata tm def render(self,surface) ti self.tmxdata.get tile image by gid for layer in self.tmxdata.visible layers if isinstance(layer,pytmx.TiledTileLayer) for x,y,gid in layer tile ti(gid) tile pygame.transform.scale(tile,(32,32)) if tile surface.blit(tile,(x self.tmxdata.tilewidth, y self.tmxdata.tileheight)) def makemap(self) temp surface pygame.Surface((self.width,self.height)) self.render(temp surface) return temp surface Is there a way of "zooming in" on the sprites in order to get the expected look?


What approaches are there to re designing 8 16 bit sprites for HD? I'm new to game development, and my skills with Photoshop are not that great. I was planning to try to convert a old game to HD, but for this I need HD sprites. What is a good way to approach converting 8 16 bit sprites into something like HD? I mean something like this


Rotate sprite direction Cocos2d I want that my sprite go always forward, and you can only control his direction moving right and left (on 360 degrees). I don't know why, but the movement it's senseless. The constants to move and rotate const int POD DEGRE MOVE 5 const int POD STEP MOVE 3 The sprite initalization dragonSprite gt setPosition(Point(visibleSize.width 2, dragonSprite gt getContentSize().height 0.75)) addChild( dragonSprite, 2) The event key listener void GameScene onKeyPressed(EventKeyboard KeyCode keyCode, Event event) pressedKey keyCode switch ( pressedKey) case EventKeyboard KeyCode KEY LEFT ARROW giro POD DEGRE MOVE isMoving true break case EventKeyboard KeyCode KEY RIGHT ARROW giro POD DEGRE MOVE isMoving true break void GameScene onKeyReleased(EventKeyboard KeyCode keyCode, Event event) if ( pressedKey keyCode) pressedKey EventKeyboard KeyCode KEY NONE isMoving false giro 0 And the calculations of the new direction void GameScene update(float dt) dragonSprite gt setRotation( dragonSprite gt getRotation() giro) podVector Vec2(cos( dragonSprite gt getRotation()) POD STEP MOVE, sin( dragonSprite gt getRotation()) POD STEP MOVE) Vec2 newPos Vec2( dragonSprite gt getPosition().x podVector.x, dragonSprite gt getPosition().y podVector.y) dragonSprite gt setPosition(newPos) Another problem is that the sprite at the start moves to the right (because Cos(0) 1), so I rotate the image of the sprite 90 degrees to the right, to then rotate it again at the initialization 90 to the left so the sprite is in the right position and his start angle is 90 (sin(90) 1), but the angle is not 90, and it moves as he wishes. The last problem I have with this is that when I press a key (right or left), the sprite stops, rotates, and starts again (a direction that is not the direction where the sprite is aiming, that's the main problem). The sprite shouldn't stop while you are moving it. Can anyone help me?


Use spritesheet frames as particles? I want to use frames from a spritesheet as particles for my emitter. I load my spritesheet with game.load.spritesheet('particles sheet', 'http stuff.lck.io luckyslot sprite sheet.png', 50, 50, 6) var emitter game.add.emitter(game.world.centerX, canvas height, 80) And i need some code to load the right frame at random emitter.makeParticles('particles sheet') Any idea?


How to make a sprite above my character appear on the minimap attached to the floor? I have a project where I made 2 minimaps. One of minimaps is linked to the character of my project and the other to the floor As I already said in the title of the question, my character has a sprite above the head (red arrow) that appears on the minimap attached to it, but does not appear on the minimap attached to the floor. Image I looked at the rendering options and many others, but I could not get the sprite to show up. How do I get the sprite to appear on the floor minimap? EDIT 1 (Showing how I made the minimap) I used a SpringArm And a SceneCaptureComponent2D The PaperSprite is not the children of the SpringArm and stands a little below the SceneCaptureComponent2D The minimap is made from a RenderTarget. From this RenderTarget a material is created Widget Blueprint


How to determine the best approximate direction I want to determine which sprite to use when one agent is "facing" another agent. My game is 2d, and uses 8 directional movement. Deciding which sprite to use for movement is easy enough since there are only 8 options when moving form one square to another. def direction(self, start, end) method for determining facing direction s width int(start 0 ) s height int(start 1 ) e width int(end 0 ) e height int(end 1 ) check directions if s height lt e height and s width e width return 'down' elif s height lt e height and s width gt e width return 'downright' elif s height e height and s width gt e width return 'left' elif s height gt e height and s width gt e width return 'upleft' elif s height gt e height and s width e width return 'up' elif s height gt e height and s width lt e width return 'upright' elif s height e height and s width lt e width return 'right' elif s height lt e height and s width lt e width return 'downleft' It's verbose, but gets the job done. start is the agents current coordinate position, and as you might guess end is the next step in the list of waypoints which makes up an agents path. The problem is that using the same function for determining which sprite should be used when attacking another agent does not look very good at all. For example, if the target is down, but only one pixel to the right, we would want to show the 'down' sprite, but this function returns 'downright' instead. How can we change it to appropriately return the fitting sprite?


Alternative Font loaders in Monogame Framework While working on projects of mine, I have been finding that it is a huge pain to switch operating systems just to create a simple spritefont when using Monogame. I saw that the Nuclex Framework can load fonts which are clearer sharper, and they can be used in a Monogame project as well. They load fonts using the FreeType library, which is very multiplatform and is used widely. Is there a fairly simple way to use the FreeType library or another library to render text suitable for use in a Monogame project, as an xnb file?


MonoGame sprites not consistently drawing Please don't mark this as a duplicate of my previous question which was asked anonymously. this is a reattempt because i cannot edit the first attempt. What I have so far is randomly generated tile set with items on SOME tiles one creature spawner that spawns up to 5 creatures which can be controlled by the player the ability for creatures to pick up items and bring them back to the spawn and store them for later use What I am noticing is when i launch the game, it doesnt always show all the sprites. Sometimes the spawner is missing, or the creatures, or the GUI. ANd when things DO appear, if i tell the creatures to pick up anything, other items on the ground randomly appear and disappear. even the spawn sometimes disappears! what I do notice is that when i have multiple creatures, some will disappear when crossing invisible lines but not all of them. i forced two creatures to go east at the same speed and time, and one vanished and the other didnt. If you have any ideas as to what might be causing this, please let me know. if you have any questions, i'll try to edit to appease you. thanks for reading! I have my draw method like this GraphicsDevice.Clear(Color.CornflowerBlue) TODO Add your drawing code here spriteBatch.Begin(SpriteSortMode.BackToFront, null, null, null, null, null, camera.GetTransformation()) worldEntity.Draw(spriteBatch) guiManager.DrawGUI(spriteBatch) spriteBatch.End() base.Draw(gameTime) for the world entity... its draw method systematically goes through each tile in the world and calls its draw method. the tile draws itself using Vector2 topLeftOfSprite new Vector2(this.X, this.Y) Color tintColor Color.White spriteBatch.Draw(tileTexture, topLeftOfSprite, tintColor) and then proceeds to call the draw method of any items on it. creatures and items have very similar draw methods. the gui also draws itself in a similar fashion. what i DO notice is that ive NEVER seen ground tiles vanish, only the items on them or creatures in the world. Could it be their Z isn't set appropriately?


How to access sprite sheet via row and column I'm currently designing a 2D game engine in C , just had a quick question. I have a SpriteSheet class that splits up a sprite into several different sprites (like a tileset for a example) and stores them in a list. Which is great, because now I can access sprites via it's corresponding index in the sheet. However, I would really like to add a feature that will let me access a sprite by specifying the row and column it resides in (in the original sprite). I just don't know the equation to find where the sprite is in the list. Here is what I have so far public Sprite this int index get return this.sprites index public Sprite this int row, int column get Get the width and height of each individual sprite in the sheet. int cellWidth this 0 .Width int cellHeight this 0 .Height Figure out and how many rows and columns are in the entire sprite sheet int rows this.sprite.Width cellWidth int columns this.sprite.Height cellHeight Here is where I want to return the sprite located at the row and column specified. return this.sprites what do i put in here? Also, I don't know if it will help but here is the method I use to fill the list with sprites private void CreateSheet(Sprite sprite, int xOffset, int yOffset) for (int y 0 y lt sprite.Height y yOffset) for (int x 0 x lt sprite.Width x xOffset) this.sprites.Add(sprite.Clone(new Rectangle(x, y, xOffset, yOffset)))


How to remove the old sprites in pygame and show them at a different location I am trying to show the motion of some basketballs towards walle using the pygae sprites. The idea is that I don't know how to remove the old ones so they won't show. Is there a move method so that it would know it has to draw it again at the specified location? I created a sprite class. Then I have a Character class that uses the sprite class and threads to calculate the intermediary coordinates for them. But I don't want them to show on the screen forever, like the pictures show. Thanks! import pygame class CharacterSprite(pygame.sprite.Sprite) def init (self, location, image, surface) pygame.sprite.Sprite. init (self) self.image pygame.image.load(image).convert alpha() self.rect self.image.get rect() self.rect.center location self.surface surface def draw(self) self.surface.blit(self.image, self.rect) def update(self, location) self.rect.center location self.draw() import threading import pygame import os from random import randint from Sprites.CharacterSprite import CharacterSprite LOCK threading.Lock() class StudentCharacter(threading.Thread) NRSTEPS 3 YPOS 440 TEACHERPOS 40 IMAGE PATH os.path.join('images', 'ball.png') def init (self, screen, xpos, interval) threading.Thread. init (self) self.screen, self.xpos, self.ypos, self.interval screen, xpos, self.YPOS, interval self.draw(self.xpos, self.ypos) self.configure() def draw(self, x, y) self.circle CharacterSprite( x, y , self.IMAGE PATH, self.screen) self.circle.draw() def configure(self) (left, right) self.interval self.target randint(left, right) xdif self.target self.xpos ydif self.TEACHERPOS self.ypos self.normal 'x' int(xdif self.NRSTEPS), 'y' int(ydif self.NRSTEPS) print self.target, self.normal 'x' , self.normal 'y' def update(self) self.circle.update( self.xpos, self.ypos ) def run(self) i 0 while i lt self.NRSTEPS LOCK.acquire() pygame.time.wait(100) self.xpos self.normal 'x' self.ypos self.normal 'y' self.update() print self.xpos, self.ypos pygame.display.update() i 1 LOCK.release() print "Done"


Problem with preloading plist file in Cocos2d x I am using Cocos2d x engine with 3.2 version. In my splash screen I am prefeching a plist by below line SpriteFrameCache getInstance() gt addSpriteFramesWithFile("ui.plist") Now inside game when I am creating a sprite I am getting an assert fail error Sprite ss Sprite createWithSpriteFrameName("pause.png") Assert failed Invalid spriteFrameName pause.png Also when the splash screen is removed, I am getting the below line in console cocos2d TextureCache removing unused texture D cocos2dx projects ABCD Resources mid ui.png Is there anything I need to add or something? I was doing the same thing for 2.x and was working but not in 3.2 EDIT In 3.x if you are calling this line Director getInstance() gt purgeCachedData() , remember that it will delete all textures from the cache memory. So handle all sprite sheets manually.


Are metal slug art assets free use? I'm making a mobile game and I've gotten by with completely free art assets so far, but I have an explosion from metal slug. I love it and it's perfect, but I don't want to get sued. I've seen metal slug art assets posted around the internet on various clip art websites, but haven't found any statements outright saying they're free to use in one's own commercial application. Could someone show me a link saying whether or not metal slug assets are free to use?


how to re use a sprite in cocos2d x some times it takes time to create the sprite structures in the scene, I might need to setup structures inside this sprite to meet requirement, thus I would hope to reuse such structures with the game again and again. I tried that, remove the child from parent, detach it from parent , clean parent with the sprite. but when I try to add the sprite to another scene, it's just wont pass the assertion that the sprite already have parent did I miss some step ? add an example I have a sprite A which involves of quite a few steps to construct, so I used it in scene A layer A, and then I want to use it in scene A layer B, scene B layer A1 etc..... generally speaking I don't want to reconstruct the sprte again.


Finding relative x and y value on a sprite Gamemaker I'm having a little conundrum that may just result from a lack of knowledge of Gamemaker's functionality. I've attached two images to aid explanation. I have a sprite of a turret (with a gun barrel), attached to a turret object, and at certain points in gameplay this object will spawn another object on top of it (let's call it the 'bullet object'). I would like the bullet object to spawn at the x and y coordinates at the end of the gun barrel. This would be easy to find as a pair of coordinates if the sprite was always stationary, in this configuration. Alas, it is not. It rotates like billy oh. This means that the x and y coordinates at the end of the gun barrel are constantly different. How do I find this constantly changing x and y coordinate? I imagine (though am most likely wrong) that there the initial x and y coordinates of the sprite are saved and can be found even if rotated is there a function that does this? Or do I need to write a script and then call it every time I want to spawn the bullet object? Thanks for your help.


Slicing irregular spritesheet (automatically?) If found a cool sprite sheet on the internet but its irregular. Is there any way besides manually cutting sprites to extract the separate pngs? I need to pack them then again into the Texture Atlas under proper names. Maybe theres some smart online tool that uses deep learning or something like that?


Spriter model not touching ground in? I was attempting to make a game in Construct 2 by using my Spriter Models plugin. However, when I imported the model, rescaled it amp changed a few things, I got this As seen in the picture, the Spriter model is not touching the platform ground. Do you know of any ways I could have the model touch the ground? Thanks in advance, Jamie Ps. Here is the link to the files, just in case you guys might wanna have a look at it https drive.google.com folderview?id 0B11opD9YgSqWbVhaNEVTcGhIRTA amp usp sharing Pps. You will need the Spriter plugin for Construct 2 to open the project file. The Spriter model files will need Spriter to open it.


What is the difference between sprites and tiles? I'm making a game, where it came to adding a tile class, but i already have a sprite one, which does the same at first glance. Can you explain the difference with a couple of examples?


Where to hire 2D sprite artists? I'm looking for high quality original 2D sprite collections which are animated where appropriate. (IE not simply collections I can buy, we want original work). I've had a look online but am struggling to find out where I can hire such people! Where do I find such people? How much should I expect to pay?


The right way to add images to Monogame Windows I'm starting out with MonoGame. For now, I'm only targeting Windows (desktop not Windows 8 specifically). I've used a couple of XNA products in the past (raw XNA, FlatRedBall, SilverSprite), so I may have a misunderstanding about how I should add images to my content. How do I add images to my project? Currently, I created a new Monogame project, added a folder called "Content," and added images under there the only caveat is that I need to set the Copy to Output Directory action to one of the Copy ones. It seems strange, because my "raw" XNA project just last week had a Content project in it (XNA Framework Content Pipeline, according to VS2010), which compiled my images to XNB (I think). It seems like Monogame doesn't use the same content pipeline, but I'm not sure. Edit My question is not about "how do I get the XNA content pipeline to work with Monogame." My question is "why would I want to use the XNA content pipeline in Monogame?" Because there are (at least) two solutions (that I see today) Add the images to the Monogame project and set the Copy to Output Directory options to copy. Add a XNA content pipeline project and add my images to that instead reference it from my MOnogame project. Which solution should I use, and why? I currently have a working version with the first option.


separate fixed size animation sheet into texture atlas I'd like to separate a 64px x 512px spritesheet into eight 64px 64px images in Adobe photoshop cs 5 so I can use a Texture Packer image atlas rather than a fixed spritesheet. Is this possible? If so, how?


Efficient way to draw multiple separated quads Let's assume I want to draw several separated (possibly textured) quads in Direct3D 9, each consisting of two triangles How should I draw these for maximum performance, i.e. which of the following ways is better in terms of speed? Describe each quad by 4 vertices, use D3DPT TRIANGLESTRIP and call IDirect3DDevice9 DrawPrimitive for each individual quad, since they are not connected. Describe each quad by 6 vertices, use D3DPT TRIANGLELIST and call IDirect3DDevice9 DrawPrimitive just once. The first method uses less memory, while the second one requires only one draw call. However, the second way seems to be feasible only if all the quads have the same texture, since otherwise a switch would be required.


SNES development why bitplanes get scrambled? I am following this tutorial https georgjz.github.io snesaa04 . I am stuck on trying to draw a sprite. Where the end result should be this My end result is this As I have not been able to find samples of tile and palette files, I am not sure if I have done everything right. Sprites.vra 0b 2e 2a 3f 1e 1f 0f 3f 2e 3f 1c 1f 0c ff f3 fe 2f 00 3f 00 1f 00 3c 00 38 00 10 00 00 00 00 00 SpriteColors.pal fe 3f 3e 77 f8 5d 0f 49 ff 7f f8 6f 8a 6b 49 62 64 39 e0 2c 60 18 98 04 9f 0e 3e 09 2c 00 00 00 As the tutorial proposes, I use cc65 as a compiler. The files are included like this .segment quot SPRITEDATA quot SpriteData .incbin quot Sprites.vra quot ColorData .incbin quot SpriteColors.pal quot As I could not get bsnes working, I am using Snes9X. As this failed, I tried to draw a plane with just one color as well to figure out the logic. I did not manage, as the colors were always scrambled. Questions How should the tile bitplane and palette files look like? What is the checksum error my emulator throws? As a last note please be patient if this is basic stuff. I am ex web dev and a retro game hobbyist, and assembly code is completely foreign world to me.


Loss in quality on downsized sprites in Game Maker I'm having an issue with sprites quality in Game Maker. I have some sprites used for UI with an original size of 2048 512. I need to resize them in game to 512 128. But when I do, I got a loss in quality. This is the original picture, resized to 512 128 with a third party software This is the sprite, as it appears in Game Maker room editor (and in game) once resized to 512 128 Are there general guidelines for this kind of situation? By the way, it's on Windows. Though I tried launching the game on an Android device and the result was the same.


Why are 16 16 pixel tiles so common? Is there any good reason for tiles (e.g. Minecraft's) to be 16 16? I have a feeling it has something to do with binary because 16 is 10000 in binary, but that might be a coincidence. I want to know is because I want to make a game with terrain generation, and I want to know how big my tiles should be, or if it doesn't really matter.


How player(sprite) in the phaser will opposite or reverse while going left and right? I am developing a game where my player has to look to see forward when I am pressing right arrow key. But how can I make it look reverse after pressing left arrow? I can create a sprite of reverse look but how can load that while pressing left and at the same time forward player should be destroyed?


pygame avoiding sprite 'jitters' on rotating the image Is there a common trick for getting around sprites that are changing directions 'too quickly' and causing their sprite to display erratically? In this project, the player moves in 8 directions by determining the abs() distance between the mouse's X and Y coordinates and its own obj.rect.center. If the absolute value is less than obj.speed, it simply moves to that point. If it is greater, it moves the distance its speed allows it to move in that direction. When it's time to draw the sprite, PyGame rotates it in accordance to obj.direction by using a dict called SPINNER with stored default values to pass to pygame.transform.rotate. def draw(obj) drawImg pygame.rotate.transform(obj.img, SPINNER obj.direction ) drawCtr drawImg.get rect(center obj.rect.center) DISPLAYSURF.blit(drawImg, drawCtr) This is fine for the foolish AI characters which typically make very few course corrections however, small movements of the mouse can cause the player's obj.direction to update very quickly, which looks chaotic. Is there a simple way to curb this behavior? My first guess is to bog down the player object with values that retain its previous state and then determine the amount of rotation to apply, but I have a feeling the better solution is to assign that responsibility to the 'view' and not the 'model'. I'm not sticking to any hard and fast rules regarding MVC, but I am trying to engage in enough separation of concerns that 'view like methods' don't make 'controller like' changes to 'model like' objects, if that makes sense.