Daily Archives

Articles indexed Saturday June 7 2014

Page 15/16 | < Previous Page | 11 12 13 14 15 16  | Next Page >

  • Zelda-style Top-down RPG. Storing data for each tile type

    - by Delerat
    I'm creating a Zelda-style RPG using Tiled, C#, and MonoGame. When my code parses the .tmx file, it will get a number to associate with each tile type based off of their position in the tile sheet. If I ever need to change my sprite sheet, this number will change for many of the tiles. How can I guarantee that when I parse my .tmx file, I will be able to know exactly what tile type I'm getting so that I can associate the proper data with it(transparency, animated, collision, etc.)?

    Read the article

  • What do I need to Mod a Unreal Engine 3 game?

    - by RoadSideWarrior
    what I am looking for is some advise making a mod for a certain game and how I would go about making it. The game I am talking about is Blacklight: Retribution and what I wan't to know is; Is it possible? And if so, what programs will I need? It is an online only game so I was unsure how plausible a mod would be for it. Plus I have never made a video game before, but I do like the game and I wanted to do some things with it. Additionally, this will be my first time making anything video game related so I would appreciate any advise. To expand a bit, I plan to add something simple at first. A mod that would let you spectate another player in the first person. Then I plan do something a bit more complex where I want to make so the game optionally always records you playing (in short intervals most likely or you would run quickly out of memory). After all that is done I would add items, armor, weapons, and maybe make a map or not I am not sure but this in a shell what I hope to do. I don't know much about these things but I am reading anything I can get my hands on. So if this is overly ambitious or just plain out not a possibility any advise on what I should look to instead will be welcomed warmly. Thank you.

    Read the article

  • GLSL Normals not transforming propertly

    - by instancedName
    I've been stuck on this problem for two days. I've read many articles about transforming normals, but I'm just totaly stuck. I understand choping off W component for "turning off" translation, and doing inverse/traspose transformation for non-uniform scaling problem, but my bug seems to be from a different source. So, I've imported a simple ball into OpenGL. Only transformation that I'm applying is rotation over time. But when my ball rotates, the illuminated part of the ball moves around just as it would if direction light direction was changing. I just can't figure out what is the problem. Can anyone help me with this? Here's the GLSL code: Vertex Shader: #version 440 core uniform mat4 World, View, Projection; layout(location = 0) in vec3 VertexPosition; layout(location = 1) in vec3 VertexColor; layout(location = 2) in vec3 VertexNormal; out vec4 Color; out vec3 Normal; void main() { Color = vec4(VertexColor, 1.0); vec4 n = World * vec4(VertexNormal, 0.0f); Normal = n.xyz; gl_Position = Projection * View * World * vec4(VertexPosition, 1.0); } Fragment Shader: #version 440 core uniform vec3 LightDirection = vec3(0.0, 0.0, -1.0); uniform vec3 LightColor = vec3(1f); in vec4 Color; in vec3 Normal; out vec4 FragColor; void main() { diffuse = max(0.0, dot(normalize(-LightDirection), normalize(Normal))); vec4 scatteredLight = vec4(LightColor * diffuse, 1.0f); FragColor = min(Color * scatteredLight, vec4(1.0)); }

    Read the article

  • implementing a high level function in a script to call a low level function in the game engine

    - by eat_a_lemon
    In my 2d game engine I have a function that does pathfinding, find_shortest_path. It executes for each time step in the game loop and calculates the next coordinate pair in the series of coordinates to reach the destination object. Now I want to call this function in a scripting language and have it only return the last coordinate pair result. I want the game engine to go about the business of rendering the incremental steps but I don't want the high level script to care about the rendering. The high level script is only for ai game logic. Now I know how to bind a method from C to python but how can I signal and coordinate the wait time between the incremental steps without the high level function returning until its time for the last step?

    Read the article

  • How to achieve a Gaussian Blur effect for shadows in LWJGL/Slick2D?

    - by user46883
    I am currently trying to implement shadows into my game, and after a lot of searching in the interwebs I came to the conclusion that drawing hard edged shadows to a low resolution pass combined with a Gaussian blur effect would fit best and make a good compromise between performance and looks - even though theyre not 100% physically accurate. Now my problem is, that I dont really know how to implement the Gaussian blur part. Its not difficult to draw shadows to a low resolutions buffer image and then stretch it which makes it more smooth, but I need to add the Gaussian blur effect. I have searched a lot on that and found some approachs for GLSL, some even here, but none of them really helped it. My game is written in Java using Slick2D/LWJGL and I would appreciate any help or approaches for an algorithm or maybe even an existing library to achieve that effect. Thanks for any help in advance.

    Read the article

  • Rotation matrix for a 3D vector

    - by Shashwat
    I have a direction vector on which I have to apply some rotation to align it to positive z-axis. To use Matrix.CreateRotationX(angle) of XNA, I need the angle for which I'd have to compute cos or tan inverse. I think this is a complex task to do. Also, eventually those are also converted to sin(angle) and cos(angle) in the matrix. Is there any inbuilt way to create rotation matrix from a 3D vector? However, I can write the function but still asking if there is one already there.

    Read the article

  • How to display consistent background image

    - by Tofu_Craving_Redish_BlueDragon
    Drawing a large background is relatively slow in PyGame. In order to avoid drawing BG every frame, you could draw it once, then do nothing. However, if something is overdrawn onto the surface and keeps moving, you will need to redraw the background in order to "erase" the color pixels left by moving object; otherwise, you will have "traces" of the moving object. I have a moving object in my PyGame. However, I do not want to "clear the color buffer" by redrawing the background image. Redrawing the background image every frame is slow. My solution : I will "clear" only required portions (where the "traces" of moving object are left) of the "buffer" by redrawing portions of background. Is there any other better way to have a consistent background?

    Read the article

  • Changes to myApp.js files are reverted back to normal when the project is build - Cocos2dx

    - by Mansoor
    I am trying to do some changes to my myApp.js file of coco2dx project for android in eclipse but I am not able to do it. I am actually trying to change the default background image of my app. But when I run my project all the changes goes back to before values For Eg: This is the default line wer we are setting our background image this.sprite = cc.Sprite.create("res/HelloWorld.png"); I am changing it to the following line: this.sprite = cc.Sprite.create("res/CloseNormal.png"); But when I run my project CloseNormal.png goes back to HelloWorld.png I am using: OS: Win7 Cocos2d Ver: cocos2dx 2.2.2 Why is this happening. Can anybody help me?

    Read the article

< Previous Page | 11 12 13 14 15 16  | Next Page >