• Content count

  • Joined

  • Last visited

Community Reputation

205 Neutral

About cdxrd

  • Rank

Personal Information

  1. I actually have this working in a slightly different manner. I let each piece move itself. Since it can have borders on all 4 sides (ala best fiends) of a piece in addition to a whole piece that I call a block or center wall, I first am checking if my pieces can go straight down. I also check to see if that piece has a sidewall on either side. If it doesn't have any borders I skip the diagonal checks. If it does have borders then it checks the diagonals. Also each piece checks is neighbor to the top to see if a new piece needs to be added. This results in a pretty predictable drop pattern and I don't see the columns leeching from the sides any more. Maybe not ideal, but it seems to work really well.
  2. I will be following this as I am working on the same thing at the moment. Each piece has an opportunity to be a wall or even to have breakable or non-breakable walls on all 4 sides, and i'm struggling to write the code to get the blocks to drop down. I have a few ideas I have yet to implement which *should* work.. but i'm also going to be moving blocks down one row at a time, once that row is resolved, then the next, etc.. until the board is full again. Definitely looking for easier ways to do this!
  3. C# & Monogame... then later add in Xamarin and you get iOS, Android, playstation, wii, oouya, windows, windows 8, mac os, Linux, windows phone, etc.. all with mostly the same codebase..
  4. Overcomplicated things.. doh.. just take the initial angle the objects should be firing at, track the amount of rotation and increment that each frame.. add the tracked rotation + intial firing angle, and boom. works.. doh...
  5. Well, the b objects are positions attached to the main object. Firing, meaning I want to move a sprite from its origin, b, whereever it happens to be on the main object (since its rotating) at the correct angle to its destination.. and I want that angle to properly calculate itself, where right now I can't get it to. So per the diagram, the B objects should be always fire in that particular angle as they circle around. So right now, the green arrows are facing radian, oh 5.35.. So as the large circle rotates, taking B with it, say it rotates 2.5 radians. The sprinkler effect is best demonstrated by video I think.. and it gets the point across a LOT better... The angle doesnt properly update to match the direction it should be facing.. THe video is on youtube and will be available as soon as they finish processing. I know theres probably something really simple im missing or miscalculating here.. Click for video of it not working properly and to give a clear idea what im after
  6. Ok, hopefully someone can help. Ive been playing with this for a while. I have a circular object rotating around its center. This diagram should help explain my troubles. The entire object circles around the center clockwise, in radians. I then have several groups of objects labeled B that rotate with the main object, also around that center point. Each smaller B object is stored in relation to the main circles position using a vector3.. so x&y being the x&y, and im using Z as the angle (in radians).. which I want to be in the direction of the arrows.. ALWAYS.. so as the whole thing rotates, the direction of the arrows rotates with it.. Trouble is, Im geting a sprinkler effect. Sometimes it will keep up for a few seconds, then start going backwards, then just stayput, then suddenly swing around the other way.. doh... Heres what I have been using: // to set up Positions[0] = new Vector3(value.X + 325, value.Y + 194, 5.35f); Positions[1] = new Vector3(value.X + 337, value.Y + 211, 5.35f); Positions[2] = new Vector3(value.X + 349, value.Y + 230, 5.35f); // angle is figured here rotation += elapsed / divider; float circle = MathHelper.Pi * 2; rotation = rotation % circle; float angle = rotation - prevRotation; prevRotation = rotation; // object positions / angles are figured out here for (int zz = 0; zz < 18; zz++) { Vector2 Aim = Vector2.Zero; Positions[zz].Z += angle; Vector3 temp = RotateSphere(new Vector3(Positions[zz].X, 0, Positions[zz].Y), position, angle); Positions[zz].X = temp.X + dist.X; Positions[zz].Y = temp.Z + dist.Y; } //Rotatesphere public Vector3 RotateSphere(Vector3 oldPos, Vector2 centre, float angle) { Matrix rotationMatrix = Matrix.CreateRotationZ(angle); //angle is in radians Vector2 distance; Vector2 newVertex; Vector2 temp = new Vector2(oldPos.X, oldPos.Z); distance = temp - centre; newVertex = Vector2.Transform(distance, rotationMatrix); newVertex += centre; return (new Vector3(newVertex.X, 0, newVertex.Y)); } //aiming and drawing here double tmpAngle = (double)Positions[zz].Z; Vector2 tmpVector = new Vector2(Positions[zz].X - (spotlight.Width / 2), Positions[zz].Y - (spotlight.Height / 2)); Aim.Y = tmpVector.Y + (int)Math.Round(1200 * Math.Sin(tmpAngle)); Aim.X = tmpVector.X + (int)Math.Round(1200 * Math.Cos(tmpAngle)); draw(start, end) So all Im really trying to do is figure out why Im getting a sprinkler effect, I would have thought that I could just add the amount of rotation of the main object (in radians) to each of the hole positions and have them aim in the right direction. I cant just add an arbitrary value, like 0.0041675 to the angle, since its based on the elapsed time nd could get out of sync.. Any Ideas here??
  7. Thanks for the assistance all! Got it!
  8. Hey all, Im working on a radar of sorts and am having a huge brain fart.. and google isnt helping much either. I have three number ranges.. 1 - 10,000, 1 - 30,000 & 1 - 55,000 I need to be able to convert each to a range from 1-64.. and for the life of me, the math just isn't working in my favor.. Any ideas?
  9. Shmup questions..

    Been thinking about working on a side scrolling shmup. Im curious though, how do most people go about doing their shmups? Im talking in respects to the waves of enemies.. For ex.. at 10 secs, this group comes in.. then out at 13 secs.. next wave in at 12 secs, out at 15, etc. ? Whats the best way to handle that? also, whats the best/easiest way to store that info? xml files? This is going to be done with XNA and C# fwiw..
  10. Green Blob Thingy

    I might try it.. but considering there is NO info on the website or here.. no screenshots. no nothing.. until then, Not worth the risk. No offense, but you need something up there besides a link to the download..
  11. Quote:Original post by Daaark It's running now. Very nice so far. It scares me how it used 113, considering that I am going to make a similar 3d game like this for XNA, and have to fit it in 150mb. Well, and I am sure that it could have been done again in half that or less. Combining all the images into a spritesheet, compressing the music a bit better, etc.. Theres actually many different music tracks in there, and the number of those could have been cut down as well. Thanks for the comment!
  12. I am happy to announce that Kollectiv has been released! Now considering this is really the 1st game I have ever released, all criticism is welcome, both good and bad! Kollectiv was written in C# using Microsofts XNA. Here are a few screenshots:   Gallery Download Now! More Information Kollectiv is a fast paced puzzle based action game that combines elements from other popular puzzle and strategy games to come up with a brand new, unique and addicting gameplay style and objective. Players will delight in the mutiple levels of difficulty and various gameplay modes. Plan your moves accordingly and try to aim for the awesome bonus of the Kollectiv! Try it today at !
  13. Just curious, but have you tried creating just a new empty project (windows game) and setting that to fullscreen instead of just using the spacewar template?
  14. Definately appreciate the help yet again remigius! Makes sense, since the game is running at 800 x 600. I just need to find a "How to use a shader in 2D for newbs for XNA" tutorial.. =)
  15. Ok, im trying to implement a shader sample (bloomatic) in xna 3.0ctp from ziggywares site. [url][/url] And I have added the following to my project, in the appropriate spots.. Effect bloomatic; RenderTarget2D rTarg; RenderTarget2D bloomTarg; rTarg = new RenderTarget2D(game.GraphicsDevice, 1024, 1024, 0, SurfaceFormat.Color); bloomTarg = new RenderTarget2D(game.GraphicsDevice, 256, 256, 0, SurfaceFormat.Color); bloomatic = content.Load<Effect>("Effects/bloomatic"); game.GraphicsDevice.SetRenderTarget(0, rTarg); game.GraphicsDevice.Clear(Color.Black); spriteBatch.Begin(); //#region draw background image //#region draw block array //#region drawHUD game.GraphicsDevice.SetRenderTarget(0, bloomTarg); game.GraphicsDevice.Clear(Color.Black); bloomatic.Parameters["mag"].SetValue(0.0099f); bloomatic.Parameters["alpha"].SetValue((float)(Math.Cos(0) * 0.5 + 0.5)); bloomatic.Parameters["hirange"].SetValue(false); bloomatic.Begin(); spriteBatch.Begin(SpriteBlendMode.None, SpriteSortMode.Immediate, SaveStateMode.SaveState); EffectPass pass = bloomatic.CurrentTechnique.Passes[0]; pass.Begin(); spriteBatch.Draw(rTarg.GetTexture(), new Rectangle(0, 0, 256, 256), new Rectangle(0, 0, 800, 600), Color.White); pass.End(); spriteBatch.End(); bloomatic.End(); game.GraphicsDevice.SetRenderTarget(0, null); spriteBatch.Begin(); spriteBatch.Draw(rTarg.GetTexture(), new Rectangle(0, 0, 800, 600), new Rectangle(0, 0, 800, 600), Color.White); spriteBatch.End(); spriteBatch.Begin(SpriteBlendMode.AlphaBlend); spriteBatch.Draw(bloomTarg.GetTexture(), new Rectangle(0, 0, 800, 600), Color.White); spriteBatch.End(); I figured out that the ResolveRenderTarget() function is removed from 3.0, and I dont have to worry about that, but it stops everytime right now on this line (the first clear up at the top, like line 9): game.GraphicsDevice.Clear(Color.Black); with the following error: The active render target and depth stencil surface must have the same pixel size and multisampling type. After looking that up, Im more confused than ever..