How public should you make your betas? I am approaching the point where I can release a playable beta of a very complex game I am making in Flash AS3. It is fairly involved and the deepest game Ive made so far. I plan on hosting it on my personal site but I want to try and get good feedback on the game elements so far. Is it worth it to expose this beta to as many places as possible before the release? What are good communities to do this? Please note this will be freeware in its final release


Hide movieclip parts that are out of bounds I'm making a game where one takes a picture of their face to use on a character. I have them zoom in on the picture, but the bitmapdata extends out of its movieclip. How do I assign bounds to my bitmapdata?


How to implement line of sight restriction in actionscript? I have a problem with a game i am programming. I am making some sort of security game and i would like to have some visual line of sight. The problem is that i can't restrict my line of sight so my cops can't see through the walls. Below you find the design, in which they can look through windows, but not walls. Further below you find an illustration of what my problem is exactly. this is what it looks like now. As you can see, the cops can see through walls. This is the map i would want to use to restrict the line of sight. So the way i am programming the line of sight now is just by calculating some points and drawing the sight accordingly, as shown below. Note that i also check for a hittest using bitmapdata to check whether or not my player has been spotted by any of the cops. private function setSight(e Event null) Boolean g copCanvas.graphics g.clear() for each(var cop Cop in copCanvas.getChildren()) var angle Number cop.angle var radians Number ( angle Math.PI) 180 var radius Number 50 var x1 Number cop.x (cop.width 2) var y1 Number cop.y (cop.height 2) var baseX Number x1 (Math.cos( radians) radius) var baseY Number y1 (Math.sin( radians) radius) var x2 Number baseX (25 Math.sin( radians)) var y2 Number baseY (25 Math.cos( radians)) var x3 Number baseX (25 Math.sin( radians)) var y3 Number baseY (25 Math.cos( radians)) g.beginFill(0xff0000, 0.3) g.moveTo( x1, y1) g.lineTo( x2, y2) g.lineTo( x3, y3) g.endFill() var cops BitmapData new BitmapData(width, height, true, 0) cops.draw(copCanvas) var bmpd BitmapData new BitmapData(10, 10, true, 0) bmpd.draw(me) if( cops.hitTest(new Point(0, 0), 10, bmpd, new Point(me.x, me.y), 255)) gameover.alpha 1 setTimeout(function() void gameover.alpha 0 , 5000) stop() return true return false So now my question is Is there someone who knows how to restrict the view so that the cops can't look through the walls? Thanks a lot in advance. ps i have already looked at this tutorial by emanuele feronato, but i can't use the code to restric the visual line of sight.


Flash Origin Problem with Movie Clips I'm working on a game that uses Flash for the user interface. I'm running into an odd issue with the origin of a library movie clip. Here are the steps to reproduce Create a new MovieClip and construct a single rectangle with both a fill and a stroke. Set position of rectangle to (0,0) and notice that the origin is at the center of the border stroke surrounding the rectangle. Change position of rectangle accordingly so that the origin is truly the top left (so if the stroke surrounding the rectangle was set to 10, adjust the position of the rectangle to 5,5. Enable 9 slice for movie clip so that when you scale the rectangle it doesn't scale or distort the stroke surrounding the rectangle. Drag an instance of the movie clip to the stage and use the free transform tool to scale it to the width of the stage. It should visibly be as wide as the stage. Run the flash file and verify that the width during execution is not as wide as it was in design view. So in a nutshell it seems that when you use the free transform tool, it distorts the origin even though 9 slice is enabled and it shouldn't (I would think). I understand that Flash denotes the center of a stroke to be the starting point and not the edge, which is why I adjusted the origin accordingly while editing the movie clip. What I really need here is pixel perfect positioning for vector based components. I should be able to drag and drop a library movieclip that provides a window with a fancy border around it and scale it to whatever size I need, and place it where I need it to be without any odd positioning problems. Here are some screenshots of the problem ( i.imgur.com 8WU2F.png ) is a shot of my window with 9 slice enabled. You can see that the origin is correct being the top left of the window graphic. ( i.imgur.com ciK8l.png ) is a shot of my window after using free transform to scale it to the width of the stage. It's pretty much perfect in design view ( i.imgur.com QFUiJ.png ) is a shot of the flash application running. Notice that the window is no longer the width of the stage? I don't get it. It makes it very difficult to position because in order to get this to look right while executing, I have to make the window wider than the stage in design mode. Any help is greatly appreciated. I'm sure it's something silly. This is pretty much bread and butter stuff that's been around since the early days of flash.


Flash Game not working on Android I am not sure if I will be able to provide enough information for someone to answer this question, but any ideas might help. I am creating a tower defense game in Flash and I eventually want to make it run on Android. Just for testing purposes, I have been running it on Android's browser and different Android .swf player apps. Recently, the game stopped working correctly. When it gets to the second wave of enemies, they get about four tiles in and stop moving. I can get them to start moving again by constantly clicking on parts of the screen. It's almost like the game loop has quit updating. Trying to solve the problem, I have updated the gameloop from Flash's standard events to a NativeSignal event (didn't solve the problem but the game runs much faster overall). The game works fine on my PC, I can't figure out the Android problem though. Any ideas or help would be appreciated. I didn't want to supply code since I wouldn't know where to start that would be helpful.


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)?


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? )


Game networking topology dealing with host leaving I am working on a P2P game in Flash and I'm wondering what network topology would be most robust for dealing with people randomly joining leaving. I was thinking the first user to join could be the host, but if the host leaves the whole session would be killed. I am looking for a way to deal with this with no (or little) disruption.


How do I make 3d Sprites like Myth did 20 years ago? The game that Bungie cut it's AAA chops on Myth The Fallen Lords. about 20 years old now. https en.wikipedia.org wiki Myth The Fallen Lords For the time, it had a pretty revolutionary way of doing lots of "3d" characters, hundreds, on screen and interactive at a time. to accomplish this, basically they use sprites for each character choosing and skewing each sprite based on the camera perspective to make it appear 3d. I would really love to read and learn more about how this technique worked, as I think it can still be applicable to modern indie games, but I've never seen this technique used since. Does anyone know where I could read more on this? here is a youtube of the game being played, showing the characters https youtu.be PySrgfe6pr4?t 6m2s


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?


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?


What exactly are sprites and entities and what are the differences between the two? Well I was looking at a few game based tutorials, as well as articles. I found out about two terms Entities and Sprites. Now they seem related but different, what is each and how are they the same and or different? I have some basic ideas already An entity is an item thing object person any object that can be interacted with in the world. A sprite is like an entity, but usually for NPCs players monsters. Or a sprite can be the name of a picture assigned to a specific entity. Do I have the right idea or are sprites and entities something completely different?


how to change floor sprite in unreal engine I have started a 2D side scrolling game in Unreal Engine from the menu when you start a new game. The basic environment loads up and it works but I don't know how to change the floor sprites and player sprites. Please Help.


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?


Sprite cut in half after placed on Scene I have noticed a very odd behaviour in Unity 5.2.1. When I drag and drop a Sprite into the Scene, it's cut in half like this I tried with PNG and PSD formats but it didn't help. Although when I flipped an image horizontaly in PS and then imported it, it worked. Is this a Unity bug? Edit It happens only when I set Max Size to 512 or more, but still why?


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.


Which isometric angles can be mirrored (and otherwise transformed) for optimization? I am working on a basic isometric game, and am struggling to find the correct mirrors. Mirror can be any form of transform. I have managed to get SE out of SW, by scaling the sprite on X axis by 1. Same applies for NE angle. Something is bugging me, that I should be able to also mirror N to S, but I cannot manage to pull this one off. Am I just too sleepy and trying to do the impossible, or a basic 1 scale on Y axis is not enough? What are the common used mirror table for optimizing 8 angle (N, NE, E, SE, S, SW, W, NW) isometric sprites?


Drawing Sprites with Artemis I am trying to trace the StarWarrior code (the Artemis tutorial). I cannot figure out how these sprites are being drawn. This is the code where the player's ship is initialized lt summary gt The initialize player ship. lt summary gt private void InitializePlayerShip() Entity entity this.entityWorld.CreateEntity() entity.Group "SHIPS" entity.AddComponentFromPool lt TransformComponent gt () entity.AddComponent(new SpatialFormComponent("PlayerShip")) entity.AddComponent(new HealthComponent(30)) entity.GetComponent lt TransformComponent gt ().X this.GraphicsDevice.Viewport.Width 0.5f entity.GetComponent lt TransformComponent gt ().Y this.GraphicsDevice.Viewport.Height 50 entity.Tag "PLAYER" Which line of code actually leads to the ship being drawn? The drawing takes place in PlayerShip.cs. Here is a commented version of the code with what I think is happening lt summary gt The initialize player ship. lt summary gt private void InitializePlayerShip() Entity entity this.entityWorld.CreateEntity() declare and initialize entity entity.Group "SHIPS" Unused label entity.AddComponentFromPool lt TransformComponent gt () Add the component to store X and Y entity.AddComponent(new SpatialFormComponent("PlayerShip")) Add a component which is just a String (perhaps this has something to do with PlayerShip.cs?) entity.AddComponent(new HealthComponent(30)) Add a health component with 30 hp entity.GetComponent lt TransformComponent gt ().X this.GraphicsDevice.Viewport.Width 0.5f Initialize the TransformComponent's X entity.GetComponent lt TransformComponent gt ().Y this.GraphicsDevice.Viewport.Height 50 Initialize the TransformComponent's Y entity.Tag "PLAYER" Unused label So how is the actual sprite being drawn? Because, I am not seeing it. ( If it is being drawn by entityWorld.Draw() in the Draw() method, then which line(s) of code put it in the world to be drawn? Or what is actually happening in entityWorld.Draw()? I believe the RenderSystem is the one that is doing the drawing, but I don't get how it is being called. I am sorry for the uninformed question, but I have made no progress after about 12 hours, and I desperately need some guidance!


MonoGame renders texture in an almost compressed looking way I was working on a game in MonoGame, which I have been doing for quite some time now. As I was implementing UI, I was noticing some sort of weird scanlines. Investigating further, to my surprise my whole scene was covered in it! Notice how the texture when zoomed in has almost a JPEG squared compressed feel too it. I have no idea what is causing this. We were using a RenderTargetTexture instead of the backbuffer, so figured I try it without, but the same happens. I checked if we were doing any weird Matrix transformations, we did not, in fact, I disabled them just to test it out. After that I thought "half pixel offset" (even though it should not really apply anymore post DX9), but also that did not solve a thing. Last but not least I thought maybe a MipMapping issue, but that would be weird since the exact same thing happens with the normal backbuffer. My Question Does anyone here recognize this "effect", and have any clue what might be causing it? I'm basically just rendering a 1920x1080 image to a 1920x1080 backbuffer, but I can assure its not the image. When I for example draw a cursor and make it follow the mouse, the points where pixels "go missing", even the cursor texture deforms. Might not be as clear in this picture, but notice how both the cursor and the orange curve basically "skip" a row of pixels, when I move the cursor to another location, it turns back to normal.


How can I render images to multiple windows without creating double textures in SDL2? Simply put What is the simplest way to render an image to two different sdl2 windows? I'm pretty new to SLD2, but I have a nice little level editor working. I then decided to move the area with edit tools to a separate window. I immediately got the following error Texture was not created with this renderer. Alas, it looks like each window needs to have its own SDL Renderer, and each renderer needs to create its own textures for the images I want to display. IMG LoadTexture() needs a renderer and will only render the resulting texture to that renderer. SDL CreateRenderer() then needs a window as a parameter and doesn't seem to be able to ever render to another output window. So does this really mean I have to create separate textures of each of my images for each and every renderer window? Or is there a way to load graphics into textures that can be used by any renderer, or on any window?


How does Texture Mapping work? I read the answers from What exactly is UV and UVW Mapping? and How does UVW texture mapping work?, which are quite nice, but am still not 100 sure, if I understand correctly. Lets start with a 2D example. So, say I have a triangle (obviously described by 3 vertices). Now my question is, how do I convert a (x,y) coordinate to the (u,v) coordinate of my texture? Since x,y could be any value between 0,n with n being all real numbers, considering that it is in object space. But my texture coordinates are between 0,1 . How do I know how to map lets say (3,4) to (u,v)? If I know how to map the object coordinates to the texture coordinate it is easy to interpolate the values, I assume (either using bilinear interpolation or barycentric interpolation). And then how would this work for 3D? Lets say in this case we would have a pyramide with 5 vertices (4 bottom, 1 tip). I guess the procedure would be similar, with the exception that I know have an additional depth value. But how does the mapping of a 2D texture work on a 3D object, when I don't have nice flat surfaces like on a pyramide, but instead have a circular surface, like a tea pot? I hope I'm clear in my questions. I'm still little confused myself. I just don't quite get the mathematical background of texture mapping. It would be enough, if you could point me to some website with good explanation, maybe with clear graphics and step by step description. Thanks for your time!


Where can I learn about Substance maps for 3ds Max 2012? A new feature in 3ds max 2012 is Substance procedural textures. Are there any good online libraries or resources for substance maps?


Basic terrain shader without using external texture I have this (Right now I have the height map in a x x size 2D array and a 1D vector too.) What I am trying to achieve is something like this Without using any textures, only plain colors. So basically smooth transitions and some shadow (using shaders). My vertex shader looks like this version 330 layout (location 0) in vec3 Position layout (location 1) in vec3 Normal layout (location 2) in vec3 Color out vec3 fragmentNormal out vec4 ex color,pos out vec3 N out vec3 v void main () pos vec4(Position,1) ex color vec4(Color,1) fragmentNormal Normal v vec3(gl ModelViewMatrix pos) N normalize(gl NormalMatrix Normal) gl Position gl ModelViewProjectionMatrix vec4(Position,1) I have normals for all the vertices. Color is set simply in the c code based on height. Here is the fragment shader in vec3 N in vec3 v in vec4 ex color void main(void) vec3 L normalize(gl LightSource 0 .position.xyz v) vec4 Idiff gl FrontLightProduct 0 .diffuse max(dot(N,L), 0.0) Idiff clamp(Idiff, 0.0, 1.0) gl FragColor Idiff ex color So I guess my problem is what formula should I use to mix the colors. I think I don't need to set the colors in the c code but in the shaders. Update Here is the wireframe of the terrain. Update2 Based on Babis' answer the result is So the gradient is not quot projected quot onto the surface as I would like to do. What could cause this? Maybe my qustion wasn't clear.


Is it possible to use unnormalized texture coordinates from a GLES2 GLSL fragment shader? I want to look up a texel from my GLES2 GLSL fragment shader using un normalized texture coordinates (0 w, 0 h instead of 0 1, 0 1). The reason is that this texture is used as a look up table and I get precision problems with normalized coordinates. I see that GL TEXTURE RECTANGLE is not supported wihtout extensions and neither is texelFetch(), so I have ruled out those options. Thanks!


Total Texture memory size iOS OpenGL ES My team is running into an issue where the amount of texture memory allocated via the glTexImage2D is high enough that it crashes the app ( at about 400 MB for iPhone 5). We're taking steps to minimize the texture allocation ( via compression, using fewer bits channel and doing procedural shaders for VFX etc). Since the app crashed on glTexImage2D, I felt like, it's running out of texture memory (as against virtual memory). Is there any documentation guideline on the recommended texture memory usage by an app (not just optimize your texture memory) . AFAIK on iOS devices ( and many Android devices) there's no dedicated VRAM and our app process is still well within the virtual memory limit. Is this some how related to the size of physical RAM ? My searches so far has resulted only in info on max texture size and tricks for optimizing texture usage and such. Any information is appreciated.


OpenGL ES 2.0. Sprite Sheet Animation I've found a bunch of tutorials on how to make this work on Open GL 1 amp 1.1 but I can't find it for 2.0. I would work it out by loading the texture and use a matrix on the vertex shader to move through the sprite sheet. I'm looking for the most efficient way to do it. I've read that when you do the thing I'm proposing you are constantly changing the VBO's and that that is not good. Edit Been doing some research myself. Came upon this two Updating Texture and referring to the one before PBO's. I can't use PBO's since i'm using ES version of OpenGL so I suppose the best way is to make FBO's but, what I still don't get, is if I should create a Sprite atlas batch and make a FBO loadtexture for each frame of if I should load every frame into the buffer and change just de texture directions.


How can I determine the extreme color values in a texture? I am looking for a way to determine the most extreme color values for all of the texels in a texture. So for a texture consisting only of black and white texels, the extreme values should be (0,0,0) and (1,1,1) expressed in RGB format. For a color gradient from red to green I should get the values (1,0,0) and (0,1,0). Now obviously I could do this on the CPU by iterating over all the pixels texels of the texture and keeping track of the color values found to be most apart from each other, but this is probably relatively slow, so I am looking for a way to do this using the GPU shaders. Is this possible using shaders? I am not experienced with GPGPU, so a solution in HLSL GLSL would be preferred. Or maybe there is a fast algorithm I could use on the CPU?


How to use large texture atlases in my shaders on mobile devices This is a frustrating discovery. I have ported my desktop game to mobile and discovered that floating point precision in my shaders is not good. I have large animations which I store per frame on a texture atlas. I try to keep as many non unique frames in their own sections and piece them together e.g. a sword that doesn't animate for 4 frames is a node that attaches to the hand piece. This preserves memory. However the texture atlases are so big that, when I use shaders, it breaks the animation completely. Here's an example of one of the shaders that wraps the animated backgrounds (scrolling clouds) precision highp float precision highp int precision highp sampler2D varying vec2 vTexCoord varying vec4 vColor uniform sampler2D texture this script animates and wraps an animated background from one atlas uniform float x frame start x uniform float y frame start y uniform float w frame width uniform float h frame height uniform float offsetx wrap by x amount uniform float offsety wrap by y amount void main() vec2 origin vec2(x, y) vec2 size vec2(w, h) Get the texture coordinate vec2 texCoord vTexCoord Make its lower left be at (0,0) and it's upper right be at (1,1) texCoord (texCoord origin) size Apply the offest texCoord texCoord vec2(offsetx,offsety) Apply the wrapping texCoord fract(texCoord) Convert back to texture atlas coordinates texCoord (texCoord size) origin gl FragColor texture2D(texture, texCoord) vColor For most backgrounds, the animations are small and don't cause problems. But some backgrounds are large and their texture atlas is large. The floating point precision breaks down and the animation tears. I don't have much mobile experience. How can I use large textures atlases for animations without the x y coordinates breaking due to loss of floating point precision?


How can I mod Minecraft 1.7.9? I've looked up a lot of tutorials on YouTube and all of them only work for versions of Minecraft prior to 1.7.9. I first got a Minecraft Coder Pack (MCP) off of this website, but then realized that only decompiles Minecraft 1.6.4. Then I found a more recent MCP (that's not on the website for some reason) and it is version 9.03, downloaded here. This decompiles Minecraft version 1.7.2 (when I followed this video's instructions, I run the decompile.bat file and it says Json file not found in C Users mike AppData Roaming .minecraft versions 1.7.2 1.7.2.json). Basically I can't decompile Minecraft 1.7.9, but I can decompile older versions. However, I don't have any older versions downloaded onto my computer. I have only 1.7.9. Then I tried using Forge, but realized that most videos were using versions of Minecraft prior to 1.6.4, meaning they use the bin folder that does not exist anymore. Even after trying to figure that out as well, the decompiling would never work. I tried to do what this video did, but couldn't replicate it. Then I finally looked at this video about using Forge and I could replicate it, but this didn't decompile Minecraft. It just set up a workspace in Eclipse that I'm not sure how to use. TL DR I can decompile Minecraft 1.6.4 and 1.7.2 but I can't decompile version 1.7.9. Should I download an older version of Minecraft, wait for an MCP for 1.7.9, or something else? Is there something I'm missing, where I actually can decompile and mod Minecraft 1.7.9?


Is there a way to drain durability from an item instead of a sword, for instance? I am modding Minecraft 1.8 using Eclipse with Forge, and I just wondered, is there a way to drain durability from a battery, for instance, instead of a piece of armor when hit. I have tried things like getting an item from the player's inventory and attempting to reduce its durability, so that would be a possibility, however, I was unable to find a way to do so?


How to get an AbstractClientPlayer for all players? I'm working on an minecraft forge mod (1.8.8). I have en custom (ownable) entity and want to set its texture to the texture of its owner, because it's a mini version of the owner. I found out that i can get the texture of players with AbstractClientPlayer getLocationSkin(), but i can't figure out how to access either EntityOtherPlayerMP or EntityPlayerSP, which implement AbstractClientPlayer, in my custom renderer. Is there a way to get all AbstractClientPlayer, regardless of SP or MP? I can access the GameProfile and i have the EntityPlayer of the owner.


Where do I store (or how do I refer to) textures for custom blocks? I'm making my first foray into Minecraft modding on Ubuntu using Minecraft Forge. I'm finding it a little hard to get started as many of the tutorials seem to refer to older versions of Minecraft (e.g. that use the BaseMod base class, which now appears to be deprecated). I've created a simple block type package net.minecraft.block import net.minecraft.block. import net.minecraft.block.material. public class RolyBlock extends Block public RolyBlock(int par1, Material par2Material) super(par1, par2Material) and added the following static initialiser to the Block class public static final Block rolyBlock new RolyBlock(174, Material.rock) .setHardness(1.5F) .setResistance(10) .setStepSound(soundStoneFootstep) .setUnlocalizedName("rolyBlock") .setCreativeTab(CreativeTabs.tabBlock) .setTextureName("roly block") I created a 256x256 PNG file called roly block and placed it in Forge's MCP folder, in the same location as the other textures. However, when I start Minecraft (v. 1.6.5) via Eclipse, it is unable to locate the texture 2014 03 14 11 38 34 SEVERE Minecraft Client Using missing texture, unable to load minecraft textures blocks roly block.png I suspect this is because I put the texture in the directory forge mcp temp src minecraft assets minecraft textures (where I found the other textures) where this temp folder is presumably a decompiled version of the Minecraft 1.6.5 .jar file. I can't actually remember how I ended up with this folder, though. My question is how do I add a new texture to my Eclipse mod development environment? Must I rebuild a .jar each time, and if so how? Or can I have Minecraft load textures from a directory? (I'm a complete Minecraft newbie, so there are many things about the configuration dev environment for Minecraft that are confusing me. For example if I run recompile.py from Forge's MCP folder, I get a swathe of errors relating to IconRegister not being found.)


How do I make the player invulnerable using Fabric modding? I am making a Minecraft mod using the fabric mod loader and I want to make the player invulnerable for a duration when they eat a certain food item. I don't know how to manipulate anything concerning entities or players so I am asking for some guidance.


How to morph a player character into another entity in MC JAVA 1.16 1.17? I want to add morphs into my game. Is there any command code resource I can use to make someone morph into an entity?


Why Minecraft has such a terrible backward compatibility? For every release of Minecraft, even a minor release, is almost guaranteed to break some plugins or mod. Why is this so? I am asking this so that we could avoid the same architecture problem as Minecraft. I mean, why can't the upgrades also support previous version of minecraft? Minecraft requires an EXACT version number match in order to connect. I am pretty sure the protocol can be designed so that clients should ignore unsupported commands. For example, if there is new block introduced and the client doesn't understand it, they can just fall back to default dummy block so that players can still play but start seeing dummy wireframe block or so. Once they start seeing too much of wireframe blocks they know they should upgrade.


How can I read a portion of one Minecraft world file and write it into another? I'm looking to read block data from one Minecraft world and write the data into certain places in another. I have a Minecraft world, let's say "TemplateWorld", and a 2D list of Point objects. I'm developing an application that should use the x and y values of these Points as x and z reference coordinates from which to read constant sized areas of blocks from the TemplateWorld. It should then write these blocks into another Minecraft world at constant y coordinates, with x amp z coordinates determined based on each Point's index in the 2D list. The issue is that, while I've found a decent amount of information online regarding Minecraft world formats, I haven't found what I really need more of a breakdown by hex address of where what everything is. For example, I could have the TemplateWorld actually be a .schematic file rather than a world I just need to be able to read the bytes of the file, know that the actual block data starts always at a certain address (or after a certain instance of FF, etc.), and how it's stored. Once I know that, it's easy as pie to just read the bytes and store them.


Why aren't ModLoader's decompiled files showing up? I want to start making a Minecraft 1.6.4 mod, but have this trouble with ModLoader I've run the decompile.bat batch file, but when opening the eclipse folder, the bin folder is empty. The batch file ran fine with no errors, and src minecraft net minecraft contains many decompiled java files, but no modloader files like BaseMod.java. If I open this folder with Eclipse, the package explorer menu stays empty. What's happening here?


Is there a way to create a cellular automaton mod for Minecraft? I basically want to create a mod for Minecraft that does the following if(a sand block is next to lava block) change the sand block to a glass block Is it possible to create a mod like this without editing multiple Java classes?


Projectile Rotation During Flight (Tank Game) I have a tank firing projectiles into the air. I want the projectiles to be rotated relative to their position along their flight path. See the diagram I drew in the image below. At any given point I know the x and y of the projectile, z represents initial velocity, theta is also known.


UE4 Event Tick and getting Forward Vector I'm trying to make a game where my character rotates towards cursor (that works). He can choose between a few weapons (also works). One of the weapons works like a machine gun. My idea was to make a simple solution with Event tick gt gate (opened by pulling LBM and closed by releasing it) gt gate (closed after firing and opened after some delay) gt spawning projectile which leads to a sequence that closes opens the second gate. It doesn't work perfectly. The projectile spawns with the right scale and location, but the rotation is always pointing straight forward. If the exactly same blueprint is attached to anything else (straight up to the LMB pull or a timer), it works perfectly. However, doing the LMB pull defeats the whole purpose, as it's not a machine gun any more, and timer... is less then perfect I believe. I liked my solution using gates but it just doesn't want to work. For example, this bit works with no problem (even though the spawning and rotation code is literally copy pasted) Does anyone have an idea on how to fix this?


Rotate final image with projection matrix I'm trying to use space in my shadow (depth) maps in a more efficient way. If I could freely rotate the final image I get with projection matrix I could save a lot of pixels, but I don't know if it is possible to do so. Is it?


How do I determine the forward right direction when I have the "up" vector? Unity I am trying to fix a gameobject for e.g. a cube (which i am using as a sensor) on my character. I need the cube to rotate (with orientation control from the inspector I have a public quaternion rotation variable set). I have identified 3 vertices using ray cast to fix my sensor onto the character. I already have determined the normal of these vertices which will be the "up" direction of the cube. I am wondering how I can determine the forward right vector to use in the LookRotation() function. I need to basically be able to rotate the cube ON the character even as the character moves on animation. This is my code, and as of now there is no rotation happening. I'm sure I am missing something and would really appreciate help. I really hope this is enough explanation. using System.Collections using System.Collections.Generic using UnityEngine public class orientation MonoBehaviour importing from Vertex Finder Script to use InterpolatedNormalInWorldSpace value private VertexFinder script public Transform target to edit orientation of sensor in Unity Inspector public Quaternion rotation edit Start is called before the first frame update void Start() script GetComponent lt VertexFinder gt () Quaternion TurretLookRotation(Vector3 approximateForward, Vector3 exactUp) Quaternion rotateZToUp Quaternion.LookRotation(exactUp, approximateForward) Quaternion rotateYToZ Quaternion.Euler(90f, 0f, 0f) return rotateZToUp rotateYToZ Update is called once per frame void Update() Vector3 relativePos target.position transform.position aligning axes of sensor to z axis and y axis respectively Quaternion rotation1 TurretLookRotation(relativePos, script.interpolatedNormalInWorldSpace) setting rotation of sensor to values entered in Inspector with respect to the above aligned axes transform.rotation rotation1 rotation edit


How do I get a relative rotation between two positions? For example, I have two objects a amp b. a's position is 12, 16, 2 and b's position is 14, 16, 3 I need to know how to find a relative rotation between them. By relative rotation I mean this a's pitch and yaw so a is looking at b. I have no helping methods like lookingAt() etc. I only know a's x,y,z,yaw,pitch and b's x,y,z. Any help?


XNA Rotating a Rectangle? I am in the process of making a giant shooter game and I have got to the point where I needed to use rectangles to detect bullets and giants hitting the player. I did that however, if you look at this image It shows the giant and the players rectangle, as you can see they are not rotating with the player, any idea how to fix this? Also yes I know they are no the same size as the sprites, that is because I set the size as they were to big before. Thanks for any help )


THREE.JS why is the rotation only applied on the last axis used? my function function rotateAroundWorldAxis2(object, radians1, radians2) object.rotWorldMatrix.makeRotationX(radians1).makeRotationZ(radians2) object.rotWorldMatrix old code for Three.JS pre r54 rotWorldMatrix.multiply(object.matrix) new code for Three.JS r55 object.rotWorldMatrix.multiply(object.matrix) pre multiply object.matrix.copy( object.rotWorldMatrix ) old code for Three.js pre r49 object.rotation.getRotationFromMatrix(object.matrix, object.scale) old code for Three.js pre r59 object.rotation.setEulerFromRotationMatrix(object.matrix) code for r59 object.rotation.setFromRotationMatrix(object.matrix) my object was initialized like this object.rotWorldMatrix new THREE.Matrix4()


Get 3D quad rotation matrix from points I have 4 3D points which represent a even quad in space. (So 3 points are sufficient) I need to get all the individual transformations (translation, rotation, dimensions) so that I can build that quad in my CSS 3D engine. So the default normal vector for a quad is 0, 0, 1 . What I have so far 4 points p0, p1, p2, p3 normal normal cross(p1 p0, p2 p0) axis and angle axis cross( 0, 0, 1 , normal) angle arccos(dot( 0, 0, 1 , normal)) rotation matrix rotationMatrix matrix4.fromAxisAngle(axis, angle) width and height width sqrt((p2.x p1.x) 2, (p2.y p1.y) 2, (p2.z p1.z) 2) height sqrt((p1.x p0.x) 2, (p1.y p0.y) 2, (p1.z p0.z) 2) translation x (p0.x p1.x p2.x p3.x) 4 y (p0.y p1.y p2.y p3.y) 4 z (p0.z p1.z p2.z p3.z) 4 It almost works, but some rotations are wrong or more specifically one rotation axis is missing. This is logical because the rotation is only build from the normal. So how can I get the full rotation? Here you see that the top and bottom quads are just rotated around the x axis but the y axis rotation is missing


Camera movement in Super Hexagon I do realize there is no camera in OpenGL ES 2, but from my understanding you can simulate one using view and projection matrices. I'm using Android, by the way. Here's a video of the game, in case you are not familiar with it https www.youtube.com watch?v 5mDjFdetU28 I am trying to understand how the world camera is rotated and tilted. Is that done purely by rotating and tilting the view matrix? So you'd have a tilt and rotationSpeed fields that you'd use each frame in something like rotate(viewMatrix, angle rotationSpeed) followed by rotate(viewMatrix, tilt)? How would you achieve a similar effect?


cocos3d versus Unity for simple IOS 3D games? Wondering if anyone here happens to have experience in doing some simple 3D based games apps for IOS, using cocos3d amp Unity and could give some pointers....questions I have are GENERAL 1) It seems currently cocos3d has the most traction in terms of a free 3D games engine for IOS development? 2) If one wanted to step up from the free IOS games engine, to a commercial one it would seem Unity is a popular choice, however you would then not really be doing apple objective c development, but rather unity development and pushing a button to pop out an IOS deployable artifact correct? FOR MY SPECIFIC REQUIREMENT If I was interested in doing the following develop a relatively simple 3D application for iPhone iPad have a small 'world' such as a room with a few basic items in it (table, cupboard) ability to 'drop' a basket ball in the room and have it bounce around based on a physics engine amp perhaps some user input (not sure what, lets say control wind direction) monitor it and react accordingly e.g. say if it goes into a net which is in the room then add a point to the scoreboard At a high level how would one do this using Unity versus using cocos3d, for example 3) Which would be quicker to develop such a basic iPhone iPad game simulation out of Unity cocos3d? 4) Would 'building your world room' approach be different? Like in Unity would you build tables cupboards within a Unity IDE which would make it very quick, whereas with cocos3d would you have to do this programmatically? 5) Would the programming aspect of letting the ball go and monitoring it be different between the two? Or would you roughly in both cases just be setting up world, release ball in certain position, and then engaging physics engine? 6) Any advice guidance re which tool approach to use? (Unity versus cocos3d) 7) Re using cocos3d for my requirement, what additional tools would you recommend above beyond XCode? (e.g. just perhaps some sort of 3D design tool to help model the room and import save somehow for us in cocos3d) Basically I'm a hobbyist iOS developer who wants to do some 3d, so the concept of using a free open source approach such as cocos3d sounds great as (a) it's free, (b) keep using existing skill set re objective c etc, BUT the biggest unknown to me is whether by chosing cocos3d would I be giving myself say 20 hours of work to develop a 3d app animation that could be developed in 1 hour in one of these commercial product (e.g. Unity)?


Game state from Web to iPhone version? I'm currently in the planning stages for an Web and iPhone game. I'm developing it with Adobe AS3 Air. I was wondering if it's possible for people to be able to play the Web version, save their state of play and then pickup again where they left of on the iPhone version? (and visa versa) how that would be achieved? the Web version will probably be on Facebook, so could I link both versions through their FB UID?


Game server for an android iOS turn based board game I am currently programming an iPhone game and I would like to create an online multiplayer mode. In the future, this app will be port to Android devices, so I was wondering how to create the game server? First at all, which language should I choose? How to make a server able to communicate both with programs written in objective c and Java? Then, how to effectively do it? Is it good if I open a socket by client (there'll be 2)? What kind of information should I send to the server? to the clients?


Connect 4 Iphone game I'm new to game development and development in general, I want to make a Connect 4 game. I have made a few simple game tutorials and I decided I wanted to make my own game now. I figured a connect 4 game should be a simple start for me, can anyone help me out how to go about with this please? Should I use Cocos2d or write it in ObjC? Thanks David H.


Help implementing virtual d pad Short Version I am trying to move a player around on a tilemap, keeping it centered on its tile, while smoothly controlling it with SneakyInput virtual Joystick. My movement is jumpy and hard to control. What's a good way to implement this? Long Version I'm trying to get a tilemap based RPG "layer" working on top of cocos2d iphone. I'm using SneakyInput as the input right now, but I've run into a bit of a snag. Initially, I followed Steffen Itterheim's book and Ray Wenderlich's tutorial, and I got jumpy movement working. My player now moves from tile to tile, without any animation whatsoever. So, I took it a step further. I changed my player.position to a CCMoveTo action. Combined with CCfollow, my player moves pretty smoothly. Here's the problem, though Between each CCMoveTo, the movement stops, so there's a bit of a jumpiness introduced between movements. To deal with that, I changed my CCmoveTo into a CCMoveBy, and instead of running it once, I decided to have it CCRepeatForever. My plan was to stop the repeating action whenever the player changed directions or released the d pad. However, when the movement stops, the player is not necessarily centered along the tiles, as it should be. To correctly position the player, I use a CCMoveTo and get the closest position that would put the player back into the proper position. This reintroduces an earlier problem of jumpiness between actions. What is the correct way to implement a smooth joystick while smoothly animating the player and keeping it on the "grid" of tiles? Edit It turns out that this was caused by a "Bug Fix" in the cocos2d engine.


How can I scroll sprites when swiping using Cocos2D? I'm adding 3 sprites (layers) to CCParallaxNode BGLayer CCSprite spriteWithFile "Layer.png" backgroundNode addChild BGLayer z 2 parallaxRatio layer1Speed positionOffset ccp(screenSize.width 2,screenSize.height 2) How can I create the scroll when swiping?


iPhone image asset recommended resolution dpi format I'm learning iPhone development and a friend will be doing the graphics animation. I'll be using cocos2d most likely (if that matters). My friend wants to get started on the graphics, and I don't know what image resolution or dpi or formats are recommended. This probably depends on if something is a background vs. a small character. Also, I know I read something about using 2x in image file names to support high res iphone screens. Does cocos2d prefer a different way? Or is this not something to worry about at this point? What should I know before they start working on the graphics?


Game uses gamecenter in iphone can I design a fallback for 3G and prior devices? If I develop a game using gamecenter, does itunes connect lock me in to only supporting 3GS and above with iOS 4.0 and above, or will it still allow sales of my game on older devices (as long as I build in fallback so it never calls gamecenter framework)?


cocos2d exclude GUI layer transformation I have a game layer that should be pannable and pinchable and a GUI layer as an overlay that's excluded from the transformations. I added the pinch and pan gesture recognizer to the view and set the view.transform like so view.transform CGAffineTransformConcat(panTransformation, pinchTranslation) But it actually scales moves the GUI layer, ofcourse, as it is a layer added to that view aswell. Sure I could do the transformations the layer itself, but the touch coordinates are scaled aswell, and calculating where the user actually tapped based on scale and translation looks like a big overhead to me. Can I somehow add a separate view and make a GUI layer it's child? Or in any other way add GUI layer that's excluded from the transformations ?


Is creating a separate thread for each game session a bad idea? I'm currently working on iocp game server. My game is just like diablo3 basically. 1 4 players join a separate session. I did basic iocp preparations and now I'm working on game session class. The reason why I'm stuck right now is that I'm not sure if I should create a separate thread for each game session. This concept is the first idea that I came up with but I can't come up with other ideas to avoid creating so many threads for sessions when there are so many game sessions. So here's my question. Should I create a separate game logic loop(thread) for each game session? Because that sounds so inefficient when it comes to the situation where only one player joins each session. If there are some other ways to design the server, please let me know what I should look for to study. Thanks for your help in advance and sorry for my bad English.


What type of loop code on game engines? Recently I worked on a game on Spritekit Engine. My question is not about spritekit, but generaly about game engines. When I write a loop code and run it (eg while i lt 100000) my CPU usage goes to 100 , but when I run the test game there is no changes specially on CPU usage ,why is this so? (We know game engines runs in a loop that includes logic and graphic commands )


Implement an upper FPS limit in the gameloop I implemented my game loop as described in deWiTTER's article, using the last approach with an unlimited FPS and a constant game speed. My problem is, that the unlimited FPS cranks up my CPU usage to nearly 100 . I understand that this is desired (as the hardware does as much as it can), but for my game, it's not really necessary (it's pretty simple). So I'd like to limit the FPS to some upper bound. Consider my game loop private static final int UPDATES PER SECOND 25 private static final int WAIT TICKS 1000 UPDATES PER SECOND private static final int MAX FRAMESKIP 5 long next update System.currentTimeMillis() int frames skipped float interpolation Start the loop while (isRunning) Update game frames skipped 0 while (System.currentTimeMillis() gt next update amp amp frames skipped lt MAX FRAMESKIP) Update input, move objects, do collision detection... Schedule next update next update WAIT TICKS frames skipped Calculate interpolation for smooth animation between states interpolation ((float)(System.currentTimeMillis() WAIT TICKS next update)) ((float)WAIT TICKS) Render events repaint(interpolation) How would I implement a maximum FPS? If i implement the repaint the way I implemented the update (or use a sleep instead of "do nothing cycles"), then the FPS is locked, right? That is not what I want. I want the game to be able to work with lower FPS (just as it does now), but limit the FPS to a maximum of, say 250.


Speed, delta time and movement player.vx scroll speed dt Update positions player.x player.vx player.y player.vy I have a delta time in miliseconds, and I was wondering how I can use it properly. I tried the above, but that makes the player go fast when the computer is fast, and the player go slow when the computer is slow. The same thing happens with jumping. The player can jump really high when the computer is faster. This is sort of unfair, I think, because. Should I be doing this someway else? Thanks.


Game loops using Hard realtime systems vs Soft realtime systems I have read the article here about realtime systems and am looking for examples specific to game loops. Am I correct in saying Hard realtime systems will lag and slow down gameplay causing slow motion if processing of AI, collision detection, or user input is delayed past the rendering deadline set by the realtime system. Example, must render every 1 30 sec but processing caused delay to 1 20 sec. Soft realtime systems will render at 30 FPS regardless of the other subsystems processing but if there is a delay in AI, collision detection, or user inputs, the game will be presented in stop motion instead of slow motion every 1 30 sec.


How should I structure my menu game loop? I'm trying to decide on how to structure my main game loop every example I've seen of the game loop looks a bit like this while (true) UpdateGame() DrawGame() i.e. it ignores the menu. Should my game loop look like this if (ShowMenu() Play) PlayGame() PlayGame() while (true) UpdateGame() DrawGame() ShowMenu() while (true) HandleUserInput() DrawMenu() (I.e. the menu and game have separate loops), or should I structure my loop as such while (true) switch (state) case Menu MenuLoop() break case Game GameLoop() break GameLoop() HandleUserInput() DrawMenu() MenuLoop() HandleUserInput() DrawMenu() I.e. one big outermost loop. (or does it not really matter?) For what its worth I'm using SDL C (although I'd like to think that the question is language agnostic)


Should I bother with SDL WaitEvent? When I wrote my first application in SDL, it looked like this while (!quit) SDL PollEvent( amp event) switch (event) ... But then one time I left my app running while I went to do something else, and when I came back my laptop was boiling hot. I checked the system monitor and one of my cores was maxed out by my program! So I did some research, and now my loop looks like this while (!quit) SDL WaitEvent( amp event) switch (event) ... Great, so now my program doesn't max the CPU. But now I need to introduce rendering, and the problem is, currently this loop runs one iteration per event. If input and other events don't occur, my program won't render the next frame, no matter where the rendering code goes in the loop. So that's no good. I could have threads, but that seems like a lot of extra complexity when I could just do while (!quit) SDL PollEvent( amp event) switch (event) ... SDL Delay(10) This won't melt the CPU, and I can render at about 100 frames per second. My questions are Which approach quot should quot I use? I don't see any reason to not just use (3). What's the point of SDL WaitEvent, if you can't use it the moment you want to do anything other than handle events in your game loop? I assume SDL WaitEvent does something like approach (3) under the hood, so even though ostensibly approach (3) should introduce more latency, in practice it won't. Is this correct? How low should the integer passed to SDL Delay be to get a responsive app?


Why does my sprite player move faster when I move the mouse? I'm trying to develop a simple game made with Pygame (Python library). I have a sprite object which's the player and I move it using arrow keys. If I don't move the mouse, the sprite moves normally, but when I move the mouse, the sprite moves faster (like x2 or x3). The player object is inside the charsGroup var. I've run the game in W7 and in Ubuntu. Same thing happens in both OS. I have more entities which move like NPCs and bullets but they don't get affected, just the player. Given this, I think that the problem maybe has a direct connection with the player moving system (arrow keys). Here is the update() method of the player object def update(self) for event in pygame.event.get() key pygame.key.get pressed() mouseX, mouseY pygame.mouse.get pos() if event.type pygame.MOUSEBUTTONDOWN self.bulletsGroup.add(Bullet(pygame.image.load("bullet.png"), self.rect.x (self.image.get width() 2), self.rect.y (self.image.get height() 2), mouseX, mouseY, 50, 50)) if key pygame.K RIGHT if not self.checkCollision() self.rect.x 10 else self.rect.x 10 if key pygame.K LEFT if not self.checkCollision() self.rect.x 10 else self.rect.x 10 if key pygame.K UP if not self.checkCollision() self.rect.y 10 else self.rect.y 10 if key pygame.K DOWN if not self.checkCollision() self.rect.y 10 else self.rect.y 10 And here is the while loop while True if PLAYER.healthBase lt 0 GAMEOVER True if not GAMEOVER mapTilesGroup.draw(SCREEN) charsGroup.update() charsGroup.draw(SCREEN) npcsGroup.update() npcsGroup.draw(SCREEN) drawBullets() for event in pygame.event.get() if event.type pygame.QUIT pygame.quit() sys.exit() if GAMEOVER myfont pygame.font.SysFont("monospace", 30) label myfont.render("GAME OVER!", 1, (255, 255, 0)) SCREEN.blit(label, (400, 300)) freq.tick(0) pygame.display.flip() I don't know what more you can need to help me, but anything you need (more info or code) just ask for it!


Delta times and frame lag in the game loop Let's say we have a standard gameloop like this, in pseudocode while (true) dt GetDeltaTime() Update(dt) Render() Here Update(dt) either uses a true variable timestep, or it determines how many cycles of a fixed timestep physics loop to execute based on dt. Now say we have the common case where we have mostly constant framerate except for infrequent single frame hiccups, so let's say we have dt values like 1 60, 1 60, 1 60, 1 6, 1 60, 1 60, ... By the time our GetDeltaTime() detects the larger timestep in the fourth frame, we have already rendered and presented the fourth frame! So one frame will already have been rendered with a wrong (too small) timestep no matter what we do. So if we now use the larger dt 1 6 to render the fifth frame, my understanding is that we artificially create a second frame where a wrong timestep is used, this time a too large one. I wonder if this problem is acknowledged anywhere. Wouldn't it be better, say, to use the averaged dt over the previous few frames to combat this? Here are some pictures to illustrate what I mean. I use the example of an object moving along a fixed axis with a constant speed, and using a variable timestepping scheme. The problem is essentially the same with fixed timesteps, though. The plots have time on the x axis, and the object position on the y axis. Let's say the object moving at 1 unit s, and framerate is 1 Hz. This is the ideal situation. Now let's say we have a frame where the time interval is 2 instead of 1. With a classical dt based scheme, we get this So we have one frame where the velocity is perceived too low, and one where it is perceived too high and which corrects for the velocity in the previous frame. What if we instead, say, always use a constant (or very slowly changing) dt? We get this The perceived velocity seems smoother using this approach to me. Of course, the object position is now not the "true" one, but I think humans perceive abrupt changes in velocity more clearly than such small positional offsets. Thoughts? UPDATE At least Ogre can do this http ogre.sourcearchive.com documentation 1.6.4.dfsg1 1 classOgre 1 1Root 1f045bf046a75d65e6ddc71f4ebe0b2c.html So I guess I just got downvoted for people not understanding my question, which is rather frustrating.


Closest circle intersection within a triangle (Context I use a Delaunay triangulation for pathfinding, and have circular points of interest, of varying sizes, being randomly placed around the map. Units need to be able to determine the closest such point of interest to path to, using a Dijkstra search across the triangulation.) Given a triangle, and a set of circles which overlap or intersect it, I'm trying to find the closest circle to a given point within the triangle. My first thought was to just take the distance from the point to each circle center, minus the radius. But there are some cases where that does not give the correct result. See the following image Measuring from point P within the triangle, to circles A and B. Using only the radius of each circle, as with d1 and d2, would result in circle A being considered closest. However, the closest edge of circle A used to measure d1 is outside of the triangle. Staying within the triangle, the closest edge from point P to circle A would be d3, which is much further away than d2, indicating that circle B is actually closest within the triangle. Is there a method for determining this difference, finding d3 for circles where d1 would be outside the triangle? How do you determine the intersection point between circle A and the triangle?


How to know if two surface are in the same direction? In my code I creat a Mesh that are composed by multiple tile. those tile can have edge that are shared, and I need to know if the normal of the tile that have shared edge have the same direction, because I calculat the normal of the edge to smooth the light. before I used the Vector.Dot() , but I've sometimes two tile that have a curve that make impossible to use this function as you can see in the 4th image. and the only information that i have in the calcul is the 2 normal of the tile. img 1 diferent direction img 2 diferent direction img 3 same direction img 4 same direction img 5 same direction


exact point on a rotating sphere I have a sphere that represents the Earth textured with real pictures. It's rotating around the x axis, and when user click down it has to show me the exact place he clicked on. For example if he clicked on Singapore the system should be able to understand that user clicked on the sphere (OK, I'll do it with unProject) understand where user clicked on the sphere (ray sphere collision?) and take into account the rotation transform sphere coordinate to some coordinate system good for some web api service ask to api (OK, this is the simpler thing for me ) some advice?


How can I determine the first visible tile in an isometric perspective? I am trying to render the visible portion of a diamond shaped isometric map. The "world" coordinate system is a 2D Cartesian system, with the coordinates increasing diagonally (in terms of the view coordinate system) along the axes. The "view" coordinates are simply mouse offsets relative to the upper left corner of the view. My rendering algorithm works by drawing diagonal spans, starting from the upper right corner of the view and moving diagonally to the right and down, advancing to the next row when it reaches the right view edge. When the rendering loop reaches the lower left corner, it stops. There are functions to convert a point from view coordinates to world coordinates and then to map coordinates. Everything works when rendering from tile 0,0, but as the view scrolls around the rendering needs to start from a different tile. I can't figure out how to determine which tile is closest to the upper right corner. At the moment I am simply converting the coordinates of the upper right corner to map coordinates. This works as long as the view origin (upper right corner) is inside the world, but when approaching the edges of the map the starting tile coordinate obviously become invalid. I guess this boils down to asking "how can I find the intersection between the world X axis and the view X axis?"


Find projecting triangle for UV mapping in RuneScape model format I am using an old Runescape model format, also used by Thief and Quake. In this format, instead of specifying UV coordinates for each vertex ABC, we specify a second trio of vertices PMN. Those vertices are then used to project UV texture coordinates onto ABC. Some previous Q amp A explains this projection algorithm and how to reverse it. I have a mesh with UVs that I want to save in this format. To do that, I want to find a trio of vertices PMN for each triangle ABC that reproduce the correct UVs. These PMN vertices are chosen from the collection of vertices already in my mesh. I could search every possible ordered triangle in my mesh, but that scales as O(n 3) and would be impractical for meshes with high vertex counts. How can I more efficiently find a PMN triangle that produces my desired UV coordinates on each triangle ABC?


Find extreme points of a rotated ellipse function on a given axis How to find the points where it is most extreme on the X and Y axis? For example lets say I have an equation that describes an ellipse that is rotated (x RadiusX Rx y RadiusX Ux) 2 (x RadiusY Ry y RadiusY Uy) 2 RadiusY 2 How can I find the points where it will be most extreme on each axis Please keep in mind the values for variables RadiusX, RadiusY, Rx, Ry, Ux, Uy are known. An example with values ((x 1 0.70711) (y 1 0.70711)) 2 ((x 1.414213 0.70711) (y 1.414213 0.70711)) 2 1.414213 1.414213


How can I find the largest sphere that fits inside a frustum? How do you find the largest sphere that you can draw in perspective? Viewed from the top, it'd be this Added on the frustum on the right, I've marked four points I think we know something about. We can unproject all eight corners of the frusum, and the centres of the near and far ends. So we know point 1, 3 and 4. We also know that point 2 is the same distance from 3 as 4 is from 3. So then we can compute the nearest point on the line 1 to 4 to point 2 in order to get the centre? But the actual math and code escapes me. I want to draw models (which are approximately spherical and which I have a miniball bounding sphere for) as large as possible. Update I've tried to implement the incircle on two planes approach as suggested by bobobobo and Nathan Reed function getFrustumsInsphere(viewport,invMvpMatrix) var midX viewport 0 viewport 2 2, midY viewport 1 viewport 3 2, centre unproject(midX,midY,null,null,viewport,invMvpMatrix), incircle function(a,b) var c ray ray closest point 3(a,b) a a 1 far clip plane b b 1 far clip plane c c 1 camera var A vec3 length(vec3 sub(b,c)), B vec3 length(vec3 sub(a,c)), C vec3 length(vec3 sub(a,b)), P 1 (A B C), x ((A a 0 ) (B a 1 ) (C a 2 )) P, y ((A b 0 ) (B b 1 ) (C b 2 )) P, z ((A c 0 ) (B c 1 ) (C c 2 )) P c x,y,z now the centre of the incircle c.push(vec3 length(vec3 sub(centre 1 ,c))) add its radius return c , left unproject(viewport 0 ,midY,null,null,viewport,invMvpMatrix), right unproject(viewport 2 ,midY,null,null,viewport,invMvpMatrix), horiz incircle(left,right), top unproject(midX,viewport 1 ,null,null,viewport,invMvpMatrix), bottom unproject(midX,viewport 3 ,null,null,viewport,invMvpMatrix), vert incircle(top,bottom) return horiz 3 lt vert 3 ? horiz vert I admit I'm winging it I'm trying to adapt 2D code by extending it into 3 dimensions. It doesn't compute the insphere correctly the centre point of the sphere seems to be on the line between the camera and the top left each time, and its too big (or too close). Is there any obvious mistakes in my code? Does the approach, if fixed, work?


a flexible data structure for geometries What data structure would you use to represent meshes that are to be altered (e.g. adding or removing new faces, vertices and edges), and that have to be "studied" in different ways (e.g. finding all the triangles intersecting a certain ray, or finding all the triangles "visible" from a given point in the space)? I need to consider multiple aspects of the mesh their geometry, their topology and spatial information. The meshes are rather big, say 500k triangles, so I am going to use the GPU when computations are heavy. I tried using arrays with vertices and arrays with indices, but I do not love adding and removing vertices from them. Also, using arrays totally ignore spatial and topological information, which I may need studying the mesh. So, I thought about using custom double linked list data structures, but I believe doing so will require me to copy the data to array buffers before going on the GPU. I also thought about using BST, but not sure it fits. Any help is appreciated. If I have been too fuzzy and you require other information feel free to ask.


How can you tell if you are a large player on a large map or a small player on a small map? If everything is scaled by a constant factor, can you tell that the world is smaller or larger? I think you could look down at the ground and see that it's "closer". But how do you know what should be the correct distance? What visual clues give it away? Edit The player controller has an FPS camera!


Calculating angle a segment forms with a ray I am given a point C and a ray r starting there. I know the coordinates (xc, yc) of the point C and the angle theta the ray r forms with the horizontal, theta in ( pi, pi . I am also given another point P of which I know the coordinates (xp, yp) how do I calculate the angle alpha that the segment CP forms with the ray r, alpha in ( pi, pi ? Some examples follow I can use the the atan2 function.


Passing an UAV to a Pixel Shader in DirectX11 I have a compute shader which task is to take an input image and then blur it using a Gaussian filter approach. The input and output for the compute shader looks like this Input and output resources Texture2D lt float4 gt InputMap register(t0) RWTexture2D lt float4 gt OutputMap register(u0) The necessary steps for the compute shader setup is shown below Load SRV with the image first DX ThrowIfFailed(CreateWICTextureFromFileEx(D3DHelper GetDevice(), L"Images floor.jpg", 0, D3D11 USAGE DEFAULT, D3D11 BIND UNORDERED ACCESS D3D11 BIND SHADER RESOURCE, 0, 0, 0, m resource.GetAddressOf(), m blurTexture.GetAddressOf())) Create UAV D3D11 UNORDERED ACCESS VIEW DESC descView memset( amp descView, 0, sizeof(descView)) descView.Format DXGI FORMAT UNKNOWN descView.ViewDimension D3D11 UAV DIMENSION TEXTURE2D descView.Texture2D.MipSlice 0 DX ThrowIfFailed(D3DHelper GetDevice() gt CreateUnorderedAccessView(m resource.Get(), amp descView, m UAV.GetAddressOf())) Blur image with compute shader Shader SetComputeShader("Blur", m blurTexture, m UAV, 16, 16, 1) Shader UnbindComputeShader() Now if we imagine that the work of the compute shader is done correctly, the last step would then be to bind the SRV UAV containing the blurred image to the pixel shader stage for the object which will use the texture. However, this texture seems to end up completely black after the compute shader pass if I do the following binding D3DHelper GetDeviceContext() gt PSSetShaderResources(0, 1, m blurTexture.GetAddressOf()) I believe there are a few more steps missing since I need to get the data from the UAV and not the SRV since the UAV contains the output image. What would be the correct approach?


FormatMessage not working for HRESULTs returned by Direct3D 11 I am using Windows 7 x64 and Visual Studio 17 (v15.9.7). Say I try to create a swap chain using IDXGIFactory2 CreateSwapChainForHwnd and pass in DXGI SCALING NONE. I will get the following message in debug output (if I have enabled Direct3D debugging) DXGI ERROR IDXGIFactory CreateSwapChain DXGI SCALING NONE is only supported on Win8 and beyond. DXGI SWAP CHAIN DESC SwapChainType ... HWND, BufferDesc DXGI MODE DESC1 Width 816, Height 488, RefreshRate DXGI RATIONAL Numerator 0, Denominator 1 , Format B8G8R8A8 UNORM, ScanlineOrdering ... UNSPECIFIED, Scaling ... UNSPECIFIED, Stereo FALSE , SampleDesc DXGI SAMPLE DESC Count 1, Quality 0 , BufferUsage 0x20, BufferCount 2, OutputWindow 0x0000000000290738, Scaling ... NONE, Windowed TRUE, SwapEffect ... FLIP SEQUENTIAL, AlphaMode ... UNSPECIFIED, Flags 0x0 MISCELLANEOUS ERROR 175 The function returns 0x887a0001 in form of a HRESULT. If I put err,hr in the watch window, I get a nice error message there ERROR MOD NOT FOUND The specified module could not be found. However, if I pass this HRESULT to FormatMessage, it just puts NULL in the output and returns 0. err,hr helpfully informs me that the new error is ERROR MR MID NOT FOUND The system cannot find message text for message number 0x 1 in the message file for 2. My questions are Why is FormatMessage not giving me right error string (the one starting with ERROR MOD NOT FOUND...)? Where is Visual Studio getting these pretty error strings from? Can I get them too? Who do I pay? PS. I am using the Windows 10 SDK version of DX11, not the older DirectX SDK version. Thus, I can't really link to dxerr.lib either. This is the code that is used to print the error message LPTSTR error text NULL FormatMessage(FORMAT MESSAGE FROM SYSTEM FORMAT MESSAGE ALLOCATE BUFFER FORMAT MESSAGE IGNORE INSERTS, NULL, hr, MAKELANGID(LANG NEUTRAL, SUBLANG DEFAULT), (LPTSTR) amp error text, 0, NULL)


Is object space the same as local space? I was in directx 11 and was wondering is local space the same as object space and if not, what is object space?


Fast fullscreen quad rendering in Direct3D 11? For the last few weeks, I've been trying to port a DX9 implementation of HDR rendering (tone mapping, bloom, stars, etc.) over to DX11. I believe I've got all features working but I'm not getting good enough performance. I'd like to be able to render the whole effect in under 4ms on a fairly low powered GPU, but using D3D11 Queries I'm noticing that it takes 0.5ms to just render a fullscreen quad with a solid color, and 1.0ms to render a fullscreen texture! And because tone mapping is the only part of the effect that uses a fullscreen texture, this makes it the most expensive! I'm already doing some optimisations with my limited graphics knowledge, I've disabled blending and depth testing, I make sure that the texture sampler uses sensible filtering settings, and I'm pretty sure that the effects of any state changes are negligible. I've heard that rendering 1 oversized triangle instead of 2 can yield some improvements, but I'm not sure if that will help me in this situation. Basically, does anyone have any suggestions to speed up rendering of a textured quad?


Manually writing a dx11 tessellation shader I am looking for resources on what are the steps of manually implementing tessellation (I happen to be using Unity CG, but any help is appreciated). Today it seems that it is all the rage to hide most of the gpu code far away and use rather rigid simplifications such as unity's SURFace shaders. And it seems useless unless you're doing supeficial stuff. A little background I have procedurally generated meshes (using marching cubes) which have quality normals but no UVs and no Tangents. I have successfully written a custom vertex and fragment shader to do triplanar texture and bumpmap projection as well as some custom stuff (custom lighting, procedurally warping the texture for variation etc). I am using the GPU Gems book as reference. Now I need to implement tessellation, but It seems I must calculate the tangents at runtime by swizzling normals (ctrl f this in gems lt normal.z, normal.y, normal.x gt ) before the tessellator gets them (during some sort of per triangle geometry pass, which comes before vert and frag). And I also need to keep my custom vert frag setup (with my custom parameters textures being passed between them) so apparently I cannot use surface shaders. Can anyone provide some guidence?


The steps in implementing B zier triangle patches What are the steps in creating a B zier triangle patches. What steps would you do in order to create this in directx 11? Say I just input 3 vertices and create a simple triangle. Is this enough? Or should I create a triangle with 9 vertices, all of them in different heights so it would make a bumpy triangle, then I apply berstein's formulas and make them smooth. so I get like a smooth triangle, not all bumpy. A triangle like My book says Research and implement B zier triangle patches. Luna, Frank D. (2012 05 21). Introduction to 3D Game Programming with DirectX 11 (Kindle Location 11901). Mercury Learning and Information. Kindle Edition. So what are the steps you would do in order to accomplish it? Please no "coulds"


Making a parenting system Each Entity can have one parent and any number of children. They have a position vector and a quaternion orientation. I know that I can make objects look like they're in a hierarchy by multiplying parent transforms all the way to the root, but how to I get the canonical coordinates out of those transformations? I need to have the real position of every Entity in the world in order to update their bounding meshes. I would like to keep my drawing code for everything as just this XMMATRIX transform XMMatrixRotationQuaternion(orientation) transform XMMatrixMultiply(transform, XMMatrixTranslation(position)) transform XMMatrixMultiply(world, transform) model gt Draw(context, states, transform, view, projection) Eg. without relying on visual tricks to get the hierarchy looking right, so no multiplications with parent transforms while rendering. How do I properly change a child's position and orientation with respect to the parent?


Implementing a Deferred Renderer (Basic Understanding) I am trying to implement a Deferred Renderer in Direct3D11. I am fairly new to this. I already bought a book Practical Rendering amp Computation with Direct3D 11. However, this book doesnt answer many of my questions. The Book just says "Call one of the Draw Commands to execute the Pipeline" In the context of a deferred Renderer I would like to know How I can actually render the different GBuffers, merge them and put actual Lighting to my scene. Let's say my GBuffers should represent Diffuse, Specular and Normals. I understand that Vertex Shaders have Constant Buffers that represent my Camera through Matrices. Vertices get Transformed in shaders into ViewSpace. How Do I get my Diffuse Specular Normal information out of that? Do I have to execute the Rendering Pipeline for every GBuffer? Technically do I just need to transform my vertices once in a VS and just execute my different GBuffer PS? The Context Object offers functions like "OMSetRenderTarget". The OutputMerger however is the last stage of the Pipeline, not the first... The Book itself just calls "Present(0,0)" exactly once and doesnt explain how you actually put things together. Sorry, quite a lot of different questions (


Single pass separable gaussian blur problem I created a single pass gaussian blur using HLSL compute shader. I also want it to be separable, which means, that first I perform blur along the horizontal direction, write out the result to the texture, then perform the vertical blur with the horizontally blurred data. I do this by creating DeviceMemoryBarriers before and after writing out the blur results to the globallycoherent Texture2D. This is my shader Texture2D lt float4 gt input register(t0) globallycoherent RWTexture2D lt float4 gt input output register(u0) Note Shader requires feature Typed UAV additional format loads! numthreads(16, 16, 1) void main(uint3 DTid SV DispatchThreadID) Query the texture dimensions (width, height) uint2 dim input output.GetDimensions(dim.x, dim.y) Determine if the thread is alive (it is alive when the dispatchthreadID can directly index a pixel) if (DTid.x lt dim.x amp amp DTid.y lt dim.y) Do bilinear downsampling first and write it out input output DTid.xy input.SampleLevel(sampler linear clamp, ((float2)DTid 0.5f) (float2)dim, 0) DeviceMemoryBarrier() uint i 0 float4 sum 0 Gather samples in the X (horizontal) direction unroll for (i 0 i lt 9 i) sum input output DTid.xy uint2(gaussianOffsets i , 0) gaussianWeightsNormalized i Write out the result of the horizontal blur DeviceMemoryBarrier() input output DTid.xy sum DeviceMemoryBarrier() sum 0 Gather samples in the Y (vertical) direction unroll for (i 0 i lt 9 i) sum input output DTid.xy uint2(0, gaussianOffsets i ) gaussianWeightsNormalized i Write out the result of the vertical blur DeviceMemoryBarrier() input output DTid.xy sum The problem is that the result flickers a bit, and has some errors in the image, too. Seems a bit like a thread group can't see writes by other groups. But there is a globallycoherent modifier before the RWTexture2D which should flush the entire resource so that writes are visible in every thread group (MSDN). Indeed, if I remove that modifier, then the flickering becomes a whole lot worse than if I leave it there. Here is a screenshot of the problem (Notice the lines on the windmill, and it also flickers on the whole image from time to time which is not visible on a still shot) Anyone here has an idea what I can do about it? (PS. the blur is performed when creating mipmaps, so I very much want to avoid multiple passes because it is already one pass for each mip)


Tessellation Texture Coordinates Firstly some info I'm using DirectX 11 , C and I'm a fairly good programmer but new to tessellation and not a master graphics programmer. I'm currently implementing a tessellation system for a terrain model, but i have reached a snag. My current system produces a terrain model from a height map complete with multiple texture coordinates, normals, binormals and tangents for rendering. Now when i was using a simple vertex and pixel shader combination everything worked perfectly but since moving to include a hull and domain shader I'm slightly confused and getting strange results. My terrain is a high detail model but the textured results are very large patches of solid colour. My current setup passes the model data into the vertex shader then through the hull into the domain and then finally into the pixel shader for use in rendering. My only thought is that in my hull shader i pass the information into the domain shader per patch and this is producing the large areas of solid colour because each patch has identical information. Lighting and normal data are also slightly off but not as visibly as texturing. Below is a copy of my hull shader that does not work correctly because i think the way that i am passing the data through is incorrect. If anyone can help me out but suggesting an alternative way to get the required data into the pixel shader? or by showing me the correct way to handle the data in the hull shader id be very thankful! cbuffer TessellationBuffer float tessellationAmount float3 padding struct HullInputType float3 position POSITION float2 tex TEXCOORD0 float3 normal NORMAL float3 tangent TANGENT float3 binormal BINORMAL float2 tex2 TEXCOORD1 struct ConstantOutputType float edges 3 SV TessFactor float inside SV InsideTessFactor struct HullOutputType float3 position POSITION float2 tex TEXCOORD0 float3 normal NORMAL float3 tangent TANGENT float3 binormal BINORMAL float2 tex2 TEXCOORD1 float4 depthPosition TEXCOORD2 ConstantOutputType ColorPatchConstantFunction(InputPatch lt HullInputType, 3 gt inputPatch, uint patchId SV PrimitiveID) ConstantOutputType output output.edges 0 tessellationAmount output.edges 1 tessellationAmount output.edges 2 tessellationAmount output.inside tessellationAmount return output domain("tri") partitioning("integer") outputtopology("triangle cw") outputcontrolpoints(3) patchconstantfunc("ColorPatchConstantFunction") HullOutputType ColorHullShader(InputPatch lt HullInputType, 3 gt patch, uint pointId SV OutputControlPointID, uint patchId SV PrimitiveID) HullOutputType output output.position patch pointId .position output.tex patch pointId .tex output.tex2 patch pointId .tex2 output.normal patch pointId .normal output.tangent patch pointId .tangent output.binormal patch pointId .binormal return output Edited to include the domain shader domain("tri") PixelInputType ColorDomainShader(ConstantOutputType input, float3 uvwCoord SV DomainLocation, const OutputPatch lt HullOutputType, 3 gt patch) float3 vertexPosition PixelInputType output Determine the position of the new vertex. vertexPosition uvwCoord.x patch 0 .position uvwCoord.y patch 1 .position uvwCoord.z patch 2 .position output.position mul(float4(vertexPosition, 1.0f), worldMatrix) output.position mul(output.position, viewMatrix) output.position mul(output.position, projectionMatrix) output.depthPosition output.position output.tex patch 0 .tex output.tex2 patch 0 .tex2 output.normal patch 0 .normal output.tangent patch 0 .tangent output.binormal patch 0 .binormal return output


What is a good approach for making a relationship between the HUD and Environment? What is an elegant common way to build a relationship between the game scene environment world and the HUD that usually sits on top of it? I have thought about this for a while, and though there are ways to accomplish this that are easy to implement, they always seem to expose too much unrelated information between the two, or end up being too coupled. An example of this that I have used in the past would be to simply pass reference from the HUD to the Environment and vice versa (which is obviously not a good apporach for many reasons, especially when aiming for low coupling). What I want to end up with is a clean, uncoupled way to do things like From the HUD reference and manipulate objects within the environment, change the state of the Environment itself. From the environment update the HUD to reflect the current state of the environment. Maybe passing reference between the two is the way to go about this, but I feel like there's some pattern that I am missing for this type of task. Any insights into past experience and implementations concerning this type of problem would be very helpful.


How can I output multiple sprite sheets from a single .fla? I have to produce out three sprite sheets of differing sizes. To do so, I have three different .fla source files. Obviously maintaining three files takes more time than maintaining one is there some way that I can use one .fla and produce three differently sized sprite sheets?


Using Actionscript 3's Graphics API in Flixel My question sounds pretty simple but awfully, I couldn't find much information on the internet. How can I draw a circle in my FlxSprite? I couldn't find much information about drawing geometric objects or the usage of classic graphics API in Flixel.


Drawing simulator Tracking mouse movement I was wondering what would be the logic behind coding a drawing simulator like the one on this website https www.mdbg.net chindict chindict.php?page chardict amp cdcanoce 0 amp cdqchi The paintbrush tool when you click it, once you start drawing strokes that a similar to what a character is, it will automatically bring out a list of characters that leads toward what you are drawing. Once you are finished, the correct character will show up. To my idea, I think that a set of coordinates are set already and once the mouse coordinates passes through these points, then from there it will detect and provide all the possibilities and narrows it even further. I think this is very complex but what would be the right path correct way to go about programming this concept?


Perfect fit for isometric tiles in AS3 with BitmapData I'm creating a game which uses 320x160 sized isometric tiles. I've got an editor that allows me to take loaded in tiles and plot them. The map size is 8x8, and instead of placing down 64 movieclips, and then moving them around, I thought I'd use the bitmapData.draw function to plot these mc's directly to a bitmap (as I'm not doing anything with them after they are put down anyway). That works fine apart from there's a small line appearing between the tiles, along the edges. I think this has something to do with anti aliasing, because when I export the tile as a .png with no smooth, and use that tile in my editor, there's no faint line between the tiles, but that also makes the tile overall look pixely, so I'm at a bit of a loss. I want the edges to fit perfectly together so need to be pixel perfect, but I want the interior of the tiles to be smoothed, any ideas? unless there's a way to solve this with the bitmapData approach in itself? The only thing I can think of right now is to make the tiles slightly bigger than they need to be so they overlap slightly, but that's a bit of a fudge, which I want to avoid if possible.


Animating Tile with Blitting taking up Memory I am trying to animate a specific tile in my 2d Array, using blitting. The animation consists of three different 16x16 sprites in a tilesheet. Now that works perfect with the code below. BUT it's causing memory leakage. Every second the FlashPlayer is taking up 140 kb more in memory. What part of the following code could possibly cause the leak The variable Rectangle finds where on the 2d array we should clear the pixels Fillrect follows up by setting alpha 0 at that spot before we copy in nxt Sprite Tiletype is a variable that holds what kind of tile the next tile in animation is (from tileSheet) drawTile() gets Sprite from tilesheet and copyPixels it into right position on canvas public function animateSprite() void tileGround.bitmapData.lock() if(anmArray 0 .tileType gt 42) anmArray 0 .tileType 40 frameCount 0 var rect Rectangle new Rectangle(anmArray 0 .xtile ts, anmArray 0 .ytile ts, ts, ts) tileGround.bitmapData.fillRect(rect, 0) anmArray 0 .tileType 40 frameCount drawTile(anmArray 0 .tileType, anmArray 0 .xtile, anmArray 0 .ytile) frameCount tileGround.bitmapData.unlock() public function drawTile(spriteType int, xt int, yt int) void var tileSprite Bitmap getImageFromSheet(spriteType, ts) var rec Rectangle new Rectangle(0, 0, ts, ts) var pt Point new Point(xt ts, yt ts) tileGround.bitmapData.copyPixels(tileSprite.bitmapData, rec, pt, null, null, true) public function getImageFromSheet(spriteType int, size int) Bitmap var sheetColumns int tSheet.width ts var col int spriteType sheetColumns var row int Math.floor(spriteType sheetColumns) var rec Rectangle new Rectangle(col ts, row ts, size, size) var pt Point new Point(0,0) var correctTile Bitmap new Bitmap(new BitmapData(size, size, false, 0)) correctTile.bitmapData.copyPixels(tSheet, rec, pt, null, null, true) return correctTile


Workflow with Flash Pro CS6 and FlashDevelop Using fla and swc to store assets I am using this tutorial http www.flashdevelop.org wikidocs index.php?title AS3 FlexAndFlashCS3Workflow In the past older versions of Flash Pro I was able to complete these steps right click on the symbol in the Library panel, select "Linkage..." dialog, check "Export for ActionScript" and fill in the symbol name (ie. MySymbol design or assets.MySymbol design), do not change the base class (ie. flash.display.MovieClip). Right now, I am stuck at that part. Any hints? What I wish to do is Use fla for the artist to store assets. Publish to swc Extract the assets in FlashDevelop by creating an instance of their class. ... How is this done in CS6? To clear things up, this is what I see when I right click a Flash symbol


Flash saves in Windows, not in Linux, FileReference.save() The code below compiles fine on the Flex 4 SDK on Fedora 15. Mouse click opens the dialog box, I click okay, and a file is saved, but the file is empty. I run the same SWF file (that was compiled on the Linux machine) on a Windows machine, and the created file contains the expected data. Then I broke the FileReference declaration out of the function into the class level, hoping to avoid a known bug and to keep a reference to the file alive outside the function. However, the same problem persists. Hoping to set up a workaround, I added the debug Flash player to my path and ran the file from Flash without the benefit of the browser, and it works. So now a Flex problem has become a Firefox problem, maybe owing to a shady procedure I used to install the plugin without really understanding what was happening. I am running Firefox 5.0. In essence my workflow is fixed, but perhaps people who performed the above will not be able to use projects with FileReference.save()? Should I be worried about this edge case? WriteTheFile.as Original code by Brian Hodge Test to see if ActionScript Flash can write files package import flash.display.Sprite import flash.events.Event import flash.events.MouseEvent import flash.utils.ByteArray import flash.net.FileReference public class WriteTheFile extends Sprite private var xml String private var fr FileReference public function WriteTheFile() void if (stage) init() else addEventListener(Event.ADDED TO STAGE, init) private function init(e Event null) void removeEventListener(Event.ADDED TO STAGE, init) Calling the save method requires user interaction and Flash Player 10 stage.addEventListener(MouseEvent.MOUSE DOWN, onMouseDown) private function onMouseDown(e MouseEvent) void fr new FileReference() fr.save(" lt xml gt lt test gt data lt test gt lt xml gt ", "filename.txt") EDIT addressed answer in code above, but the same problem exists. EDIT This works on the same system when the standalone player is invoked. Therefore this is a browser (FF 5.0) plugin problem.


Best way to create neon glow line effect in AS3? What's the best way to create a neon glow line effect in Flash AS3? Say similar to what's going on in the game gravitron360 on the xbox 360? Would it be a good idea to create movieclips with plain lines drawn in them and then apply a glow filter to them? or perhaps just apply the glow filter to the entire movieclip layer the movieclips are on? or just draw them manually and create a glow effect by converting the lines to fills and then softening edges? (wouldn't blend as well but would be the fastest CPU wise?) Thanks for any help


Dragging and dropping sword in unreal engine 4 I am developing a 2d game using unreal engine 4 in which the user drags and drops a sword.I want the sword to follow the position of my finger.At the moment, when I drag the sword, it moves at an offset from my finger.The game has been packaged to an pad and I have set up the functionality using blueprints. Pseudo code On Drag () finger position sword position on screen on drop finger position on release from screen position of sword How do I make the sword follow the position of my finger as I drag it?


How to create opacity mask from colored bitmap? For the image (bitmap) below, if I do Create a spite with the image in unreal engine. Create a opacity mask on the spite. Use this image, choose a specific color, such as blue, make its corresponding region the only opacity region on the mask. My question is about the implementation of part 2 and part 3 in Unreal engine, they are quite confusing. If anyone know how to implement it in unity, it would also be helpful. Thanks a lot.


How can I set my non convex object's collision to a more detailed one to allow other objects to go underneath? My problem is simple. I imported a 3D object (it's not convex) and I want the character to go under your legs. But this does not happen There seems to be a way to do this, I just do not know which one. Vision of what would be a complex collision I've already changed all these options, but it did not work out The closest I got was when I saw something about adding a physical material. But when I try only a circle appears, I still can not add one exactly equal to the Character Links where I've already looked for help https docs.unrealengine.com en us Engine Content FBX StaticMeshes collision https docs.unrealengine.com en us Engine Physics PhysicalMaterials PhysMatUserGuide https forums.unrealengine.com development discussion content creation 18509 how can i make this have a more precise collision box


Dynamic character in UE4 I've been creating simple characters in Blender for a while, and now I want to add dynamic details to them. I managed to make a cloak with using UE4 cloth physics. However I have trouble with smaller things. As english isn't my primary language, I don't even know how to name this issue properly. Example of things I want to achieve Simple polygon ponytail that bounces while running Edges of clothes, like shorts are loose and also move while running Accessories like bracelets or dangling keys on wrists hanging from clothes which also move a bit while walking Is this something I do in Blender and export, or is it something I add in Unreal? What should I look for? EDIT So far I found this thanks to a comment https docs.unrealengine.com en US Engine Animation NodeReference SkeletalControls AnimDynamics index.html But if anyone else has suggestions, please keep them coming.


Switch from left click to right click to make character walk in the Top Down Example, in UE4? When creating a new project in the Unreal Engine 4, you can choose to create a project already with some added features and things (Top Down Example) This project has a character (which I changed its appearance) and it moves around the map when I click the left mouse button I looked at the blueprints of the project, but I did not identify where the command is that makes the character walk, so I'd like it to walk when I right click. Alls blueprints of project M Cursor Decal TopDownCharacter TopDownController TopDownGameMode The circled blocks of reds are the ones I suspected could be where I should make the modification, but no information on them gave me the certainty that that was where I was supposed to change. I still do not create projects in C programming mode, because I do not have Visual Studio 2017. Some links from websites where I spent before coming here and that can help you to help me https docs.unrealengine.com en us Engine Blueprints https www.youtube.com watch?v EFXMW UEDco The video is 2015, so although it's good, I did not take it so well, because I know that with all this time that has already happened, a lot is different. Sorry for any translation errors, I'm not English speaker.


UE Sequencer Foot slide with character movement What is the best way to implement the character movement on the sequencer so there is no foot slide? I would go with Root Motion but the animations I have are on place. Thank you


How to create smoke that spreads outward in all directions? I saw many tutorials about smoke grenade but they just use volumetric smoke. I want to make something like the smoke grenade in PUBG, where the smoke spreads in all directions how to do that? The Unreal Engine 4 smoke grenade throws out smoke in a particular direction, like this But I want something more like PUBG's that spreads smoke evenly in all directions