Tagged Questions
-1
votes
0answers
76 views
What's the idea on the base of rendering camera on 2D platformers games? [closed]
I'm programming a 2D platformer game, and I am wondering about how the right to left scrolling of the camera is done in a game like this.
There is a background that need to be updated. There are also ...
1
vote
2answers
67 views
XNA spritebatch.Draw: Which part gets colored by the color parameter?
Which part gets colored and how can I control it?
I have a rounded block and my goal is to have the center filled with a certain color chosen by that parameter. Here's the picture:
...
1
vote
1answer
251 views
2D Scrolling Background on XNA
How do I create a scrolling X and scrolling Y background without weird things happening like the player disappearing or not getting the offset correct?
I have code at ...
2
votes
1answer
87 views
Issues upscaling pixel art with SampleState.PointClamp
I'm developing a 2D game, and I'm striving to create a nice blocky low-res appearance for the game, yet allow it to be played at variable resolutions. So, I've researched resolution independency and ...
1
vote
3answers
164 views
Splitting tileset into individual tiles
I'm trying to split a tileset (from here) into individual tiles.
For debugging purposes I wrote some code to split the tileset into individual tiles and display them on screen, but some aren't being ...
1
vote
2answers
142 views
Resolving 2D Collision with Rectangles
For about a week I've been trying to grasp the basics of collision, but I've been driven to the point of wanting to just give up on everything when it comes to collision. I just don't understand it. ...
0
votes
1answer
57 views
Putting a 2d camera into a gamestatemanagement sample [closed]
Hello everyone i am new to xna and i am trying to implement a simple 2d camera that follows my sprite around the level i am using a gamestatemanagement so i have the basic platformer with screen ...
1
vote
3answers
132 views
Creating an update “Tick” on tiles for simulating growth of plants
In my 2D tile based platformer I have added plants to be able to farm such as the simplest, grass, to other things like corn. Now each of these speacial tiles must be updated to show how much it has ...
7
votes
1answer
295 views
Implementing water effects (splashes) into XNA 4.0 game
I am creating a 2D XNA game and came across a tutorial on adding water effects (splashes) to an XNA game but after implementing it into my game I can't get it to scale down. Currently it takes up the ...
-1
votes
1answer
72 views
XNA 2D Particle in 3D world [duplicate]
Is it possible to make 2D-sprite particles in a 3D world that always face towards the camera?
-4
votes
1answer
77 views
My 2d Shader in XNA falls apart the second I put it into Farseer [closed]
I wrote a simple light shader that I tested in a simple 2d spaceship shooter and it worked fine. Once I imported it into my friend's farseer project with rotatable shapes, it doesn't seem to work ...
-1
votes
2answers
182 views
Making The Player Stop Bouncing And Stop Sinking In The Ground In A Platformer XNA
Heres a problem i've been having. I have a platformer, and whenever my player hits the ground he keeps bounding. Here's the falling code
iceBoy.moveY++;
iceBoy.position.Y += moveY;
Now heres the ...
1
vote
1answer
289 views
2D tile-based collisions: using different methods by tile?
I'm trying to write a collision handling method that handles each of the 9 potentially colliding tiles (the player's and the 8 around him) differently according to a "CollisionType" value attached to ...
0
votes
1answer
138 views
xna: Methods for having sprite characters in 3d game?
Methods for having sprite characters in 3d game?
I am making a game much like Doom. The world is 3d but objects and characters are 2d sprites. I am not asking about billboarding objects. I am asking ...
5
votes
2answers
225 views
XNA 2D: How to load/unload specific content by level
I'm writing a 2D room-based* platformer using XNA, and I'm trying to figure out the best way to load resources based on what the current map requires. Basically, I need to (want to) dispose of the ...
-6
votes
1answer
321 views
How can I make sprites like diablo's for my soon-to-be isometric rpg? Like in all directions [closed]
(xna newcomer)I can use blender(3d modelling tool). I just can't make people, but if I have to, I'd learn it.
How can I do that? I plan on making a lot of armor sets, equipments too. How would I go ...
-3
votes
1answer
342 views
2D XNA Shooting Game [closed]
im doing a XNA game for a school project but im having trouble with the bullets. I can´t find any way to draw them or "invoque" them went i want. It is a modified Space Invaders that im trying to do. ...
-2
votes
3answers
333 views
Why use textures that are Power of Two? [duplicate]
Possible Duplicate:
Why are textures always square powers of two? What if they aren’t?
I am using C# and XNA (also MonoGame for other platforms than Windows) to create a game in 2D. ...
4
votes
2answers
237 views
Ball bouncing infinitely and constantly
Alright, so I've got hold of some simple physics mechanics, and am currently trying to implement bouncing. Based on the first answer of this question, I've developed the following algorithm:
...
2
votes
2answers
93 views
Create a variety a sprites from a single image in XNA?
I want to be able to take a single image and cut them up into a lot of images to make the sprites. How would I do that in XNA since I only know how to load the texture then use it without changing it?
...
3
votes
1answer
136 views
Figuring out which direction my object is facing on a 2D plane?
My friend and I were messing around in XNA 4.0 making a 2D racing game. Kind of like this one: Ivan “Ironman” Stewart’s Super Off Road. The problem we are having is knowing which direction the car is ...
0
votes
0answers
126 views
Stacking Drawing Matrix for SpriteBatch in XNA
I'm trying to make a 2D engine for XNA with SpriteBatch. My object unit is Entity, which can include other Entities as its children. However, when drawing them, the rotation and scaling stacking do ...
1
vote
2answers
308 views
Background blur in 2D game?
In an XNA 2D game, I am thinking about blurring the background slightly to increase the feeling of depth? I am already using parallax scrolling which works pretty well in terms of enhancing depth ...
1
vote
1answer
301 views
Tongue pull effect
I've been searching on the net for several days and can not find nothing about this effect. Even a name for this effect. I want to make a character that can use his tongue to pull objects objects it ...
0
votes
0answers
144 views
Rotating towards thumbstick - XNA - Xbox360 controller
I'm doing a topdown shooter game where I controll my character with an Xbox controller. The problem I'm having right now is that when I'm rotating the character it feels like it sticks at 0, 90, 180 ...
3
votes
2answers
235 views
XNA Why is Texture.GetData one dimensional?
This is question has been really killing me. In XNA when you want to convert an image to color data using Texture.GetData, it only lets you make it a one dimensional array instead of a 2D one. This ...
3
votes
4answers
380 views
XNA 2D Spritesheet drawing rendering problem
I'm making a tile-based game, using one spritesheet containing all tile graphics.
Each tile has a size of 32x32 pixels.
The main problem is: when I draw the tile to the screen, if the tile position x ...
0
votes
0answers
80 views
Managing shots of the player [closed]
I'm currently developing a 2D Jump'n'Run and the situation is the following: The player has different weapons he can collect and is then able to shoot the weapon's projectiles (laser, rockets, ...
2
votes
3answers
303 views
2d shapes in XNA 4.0?
Having some experience of XNA but none of 3D programming. I have an idea i want to realize but i have not decided to do it in 3d or 2d. Im not sure which one will be best in XNA.
I want to have a ...
3
votes
4answers
195 views
Sprite and Physics components or sub-components?
I'm taking my first dive into creating a very simple entity framework. The key concepts (classes) are:
Entity (has 0+ components, can return components by type)
SpriteEntity (everything you need to ...
-3
votes
1answer
216 views
Character jump animation is not working when I hit the space bar [closed]
I am having an issue with my game in XNA. My jump sprite sheet for my character does not trigger when I hit the space bar. I can't seem to find the problem. I have also include the code below to make ...
25
votes
3answers
3k views
2D water with dynamic waves
New Super Mario Bros has really cool 2D water that I'd like to learn how to create.
Here's a video showing it. When something hits the water, it creates a wave. There are also constant "background" ...
0
votes
1answer
117 views
Storing large array of tiles, but allowing easy access to data
I've been thinking about this for a while. I have a 2D tile bases platformer in XNA with a large array of tile data, I've been running into memory problems with large maps. (I will add chunks soon!)
...
1
vote
1answer
155 views
Absorbtion 2d image effect
I want to create a specyfic 2d image effect. It consists in modifying a sprite so it looks like it is being zoomed to a point or "absorbed" by that point. I'm not really sure what is the technical ...
4
votes
1answer
607 views
2D Tile Game - Smooth Biome Terrain Transitions
While working on my 2D tile based game, I encountered a problem. I use Perlin Noise to generate the terrain. Some biomes (Desert, Forest, etc) have different flatness values depending on terrain, ...
0
votes
2answers
201 views
3d vertex translated onto 2d viewport
I have a spherical world defined by simple trigonometric functions to create triangles that are relatively similar in size and shape throughout.
What I want to be able to do is use mouse input to ...
9
votes
2answers
982 views
Faster 2D Collision detection
Recently I've been working on a fast-paced 2d shooter and I came across a mighty problem. Collision detection. Sure, it is working, but it is very slow.
My goal is: Have lots of enemies on screen and ...
-2
votes
1answer
271 views
C# XNA 2D Multiple boxes collision detection and movement
Hi,
I've been making simple game where you shoot boxes that are coming towards you.
All game objects are simple rectangles.
Now I have problem with collision detection; how to check where the ...
1
vote
0answers
123 views
Beginner C# image loading woes - NullReferenceException [closed]
I keep getting a "NullReferenceExeption was unhandled" with "Object reference not set to an instance of an object." written under it. I have all of the images (png) correct with names and added to ...
1
vote
2answers
322 views
Rotating multiple points at once in 2D
I currently have an editor that creates shapes out of (X, Y) coordinates and then triangulate that to make up a shape of those points.
What will I have to do to rotate all of those points ...
3
votes
2answers
411 views
2D lighting theory: day-and-night cycle, spot lights at night
I am writing a rogue-like 'zombie' management game. The game map will be similar to Prison Architect. A top-down 50 X 50 grid.
I want to implemented a day night cycle and during the night I would ...
4
votes
1answer
1k views
How do I rotate a sprite so that it is 'pointing' in the direction it is moving
I have a sprite, e.g a missile, heading in a certain direction (using a velocity vector).
How do I figure out its how much to rotate it so that it gets drawn 'pointing' in the direction it is ...
5
votes
3answers
309 views
'Spring' physics
I'm trying to put together a struct or a method of some sort that will allow me to check the relative position between two objects, and if they're too far apart, apply a force that will draw them ...
4
votes
1answer
230 views
How do I calculate the boundary of the game window after transforming the view?
My Camera class handles zoom, rotation, and of course panning. It's invoked through SpriteBatch.Begin, like so many other XNA 2D camera classes. It calculates the view Matrix like so:
public Matrix ...
13
votes
2answers
1k views
Best way to mask 2D sprites in XNA?
I currently am trying to mask some sprites. Rather than explaining it in words, I've made up some example pictures:
The area to mask (in white)
Now, the red sprite that needs to be cropped.
The ...
1
vote
1answer
1k views
2D Grid based game - how should I draw grid lines?
I'm playing around with a 2D grid based game idea, and I am using sprites for the grid cells. Let's say there is a 10 x 10 grid and each cell is 48x48, which will have sprites drawn there. That is ...
6
votes
3answers
358 views
Smooth waypoint traversing
There are a dozen ways I could word this question, but to keep my thoughts in line, I'm phrasing it in line with my problem at hand.
So I'm creating a floating platform that I would like to be able ...
2
votes
2answers
295 views
One-way platform collision
I hate asking questions that are specific to my own code like this, but I've run into a pesky roadblock and could use some help getting around it. I'm coding floating platforms into my game that will ...
2
votes
1answer
407 views
Friction in 2D game
I'm developing a 2D platformer, although this question could probably apply to just about any 2D type physics; What is the equation for friction? I have sort of a hacky type of friction set up in my ...
4
votes
1answer
261 views
2D Magnet-like repelling behavior
If somebody wanted to develop a system between two intersecting rectangles so that the rectangles would, in a gradual process, push eachother away from one another until no longer intersecting, with ...




