Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

102 Neutral

About Jouei

  • Rank
    Advanced Member
  1. Jouei

    Book Advice

    Well i do not know of any books that will teach you how do something like that specifically. But id like to point out a tile based engine does not mean tile based movement. In fact Super Nintendo games like Secret of mana, and yes even Zelda use tile based systems. You state that you do not want to use an engine i am confused by this and i think we all need more information as to what Language you are using and why you want to stay away from game engines. A game engine i would also like to point out is no something like a game maker a game engine only gives you pieces like collision and graphics rendering etc, these pieces are just building blocks to get your basic sub system off the ground so you can focus on other more important aspects. please let us know what language we are using and we may be able to answer your question better. Regards XainFaith.
  2. Jouei

    A Newbie, A Vision, No budget.

    I am going to throw my two cents in, You may or may not be biting off more then you can chew but who cares. If this your dream and you want it bad enough you just have to apply yourself it may take a long time and you may get pissed off or frustrated but no dream ever comes true with out a lot of effort. As for things you would need to know programming wise to make an rpg well quite a bit but there are ways to soften that blow. For instance C# XNA has a RPG starter kit its just a bit of a framework but if you pick up a C# book from the library or wherever and read it you can at least start. Also there are lots of game engines out there doing a TILE TO TILE movement system really is not that hard. Things like the Chrono trigger combat system that's a bit of a different story. In an honest opp-ion if you do not want to code get a lot of graphics together get a very good design doc done and post an add on the help wanted forum remember to use the template some younger programmers who may not care if there is money in it may come around providing you have everything nicely laid out and easy to see what you want. You seem like you want to really do this, So start small break a problem down and see the options if you mess up big whoop just got to start over. Keep at it, and don't leave your self that short. Regards XainFaith
  3. Jouei

    Menu's in XNA

    Here is a bit to get your started off since XNA does not use a polling input system things can become tricky very fast and checking for a left mouse down is not that same as a click. Here is my mouse class for XNA 4.0 the MouseEventData is just a struct with some basic data you can pass down ill add it too so you can see it. [source] public delegate void MouseEvent(MouseEventData mouseData); internal class MouseInput { #region Fields public int X { get; private set; } public int Y { get; private set; } #endregion #region Events private MouseState LastState; public event MouseEvent MouseLeftDown; public event MouseEvent MouseLeftUp; public event MouseEvent MouseRightDown; public event MouseEvent MouseRightUp; public event MouseEvent MouseMove; #endregion #region Constructor public MouseInput() { this.LastState = Mouse.GetState(); } #endregion #region Update Method public void Update() { MouseState mState = Mouse.GetState(); this.X = mState.X; this.Y = mState.Y; MouseEventData mouseData = new MouseEventData(); #region Mouse Move Event if (this.LastState.X != mState.X || this.LastState.Y != mState.Y) { mouseData.X = mState.X - LastState.X; mouseData.Y = mState.Y - LastState.Y; mouseData.Button = MouseButton.None; if (this.MouseMove != null) { this.MouseMove(mouseData); } } #endregion mouseData.X = this.X; mouseData.Y = this.Y; #region Check for Left button Mouse input if (mState.LeftButton == ButtonState.Pressed) { if (this.LastState.LeftButton == ButtonState.Released) { if (this.MouseLeftDown != null) { mouseData.Button = MouseButton.Left; this.MouseLeftDown(mouseData); } } } else { if (this.LastState.LeftButton == ButtonState.Pressed) { if (this.MouseLeftUp != null) { mouseData.Button = MouseButton.Left; this.MouseLeftUp(mouseData); } } } #endregion #region Check for Right button Mouse input if (mState.RightButton == ButtonState.Pressed) { if (this.LastState.RightButton == ButtonState.Released) { if (this.MouseRightDown != null) { mouseData.Button = MouseButton.Right; this.MouseRightDown(mouseData); } } } else { if (this.LastState.RightButton == ButtonState.Pressed) { if (this.MouseRightUp != null) { mouseData.Button = MouseButton.Right; this.MouseRightUp(mouseData); } } } #endregion this.LastState = mState; } #endregion } [/source] and now for the MouseEventData [source] public struct MouseEventData { public MouseButton Button; public int X; public int Y; } [/source] in your case just check for a mouse left up event and then see what button your in, since the mouse left up only fires after the left mouse has been pressed and release you will get much more accurate input. hope this helps to at least show you how to poll xna input.
  4. Jouei

    Menu's in XNA

    Falcon93 is quite correct on many points so i am just going to add something more. A menu is basically a collection of States or at least where sub options of the menu are incurred. What this means is that it really is just a branching section in the code that breaks the game down and runs along a path selected. Simply put you could even do it with a switch statement if you really wanted to do but there are better ways. One of the best ways to do it is with a Game State management system each part of your game could be referred to as a state eg ( Menu, Options, Game Play, HighScore ) Each on of these states are separate from each other in one form of way or another and can have there own code to deal with just there state. Writing a Game State Manager is not really to hard but depending on the features you want it to have it can become more difficult. But it basically breaks down like this. Game State Manager Screen " Represents a game state" The Game State Manager runs one screen at a time calling methods from the Screen class such as Update and Draw. You inherit the screen class to make the Game State for example you can have a MenuScreen and in that all the code to the menu could go. There are a lot of examples on how to do this across the web if you really want to make a game and worries less about the underlying stuff i suggest taking a look at the XNA Game Engine called Flat Red Ball http://FlatRedBall.com you can find me there from time to time and it comes with the above mentioned Game State Management. Regards XainFaith
  5. Jouei

    Help with shader

    My only thought currently is that maybe the timer value is not being input-ed into your shader, i personaly have not used python but it seems to me that may be your issue if an animation is not occurring then the value of the timer must be remaining constant or it is 0. Regards XainFaith
  6. Well i think in terms of a server you may want to peraphs create a lobby like application to handel what you want. The user starts the client and it connects to the lobby server. The person hosting the game can then create a game as a host. You would probaly want to do this using a uniqe name for the game or some other form of uniqe dentifer. Other users could then join that game and there cients recive the hosters ip adress and when the hoster starts the game the players connect directly to the hoster through the client application. Think star craft etc. The game servers are nothing more then lobby servers. When a game is completed you can have the hoster upload stats to the game server if you want t ohave latters etc. as for doing this in php or something of the sort i do not see an easy way per say. You could make your lobby server with Java itself and just run it off your home pc etc. Since its a lobby server and not the game server itself the resources should bot be as intensecive. Regards Jouei.
  7. Check out FlatRedBall It is a 2.5D engine has some basic collision stuff but you can incorperate Farseer Physics engine for the physics both of witch are free.
  8. Hi there i am devloping a client using Silverlight and i am using the DataContractSerializer to serialize the information i need to send back and forth but when i deserialize the information on my .Net server using the XML serializer i get an improper XML format usally one 1,2. I tryed to use the XML Serializer in the System.Xml namespace but i get the same kind of error. I think the error may occur from the mismatch of dll versions beign used the one in Silverlight is etc the one in the Server is and i belive this is the root of the problem but i am unsure how to fix it. I was reading a post stating the a Assembly redirection or something of the sort may be the solution but i have no idea how to do such a thing. Any help is much apprecated as i can not continue the project until i get beyond this block. regards Jouei.
  9. Jouei

    Box2D Questions

    Thanks for that bit of info. One Last question i am a bit confused by the AABB's in Box2D it seems they only have a lower and upper bounds how would on convert a normal rectangle of four points to this format. is the lower Bounds the lower right corner and the upper bounds the top left ? Regards Jouei.
  10. Jouei

    Box2D Questions

    Well NoMoreNames To Answer your question as far as i am aware no, the scale is for the objects that are added to the World Root for Box2D.XNA, So when drawing you take the objects position and convert it to your normal Screen or world cords. Eg: if 100 pixels = 1 meter witch is a rather large scale but its easy because of the nice round numbers :) then when you draw you would take the position of the object from box2D.xna and multiple it to convert it to your normal coordinate system eg if an object is 48 by 48 pixels then when you create the object you make it 2.2 by 2.2 because the box shape takes half widths, and to position it at 100 pixels by 100 pixels you would put it at 10 by 10. and in your draw code multiple it position by 10 would give you the 100 by 100 position :) you can then minus your world cords. At least thats what seems to work for me so far. I am having troubles trying to figure out how to use this with a quad tree though, mind you my quad tree is sub standard and any time an object moves it would need to be removed and then re inputted at its new cords. If you got any ideas on how to use box2d with spatial partitioning i would be glad to hear it. wicked357 i do not think the port is that up to date as of yet although i suppose that would be nice ^_^. EDIT: Ok so my math was abit off but as long as you get the idea given its right or not lol. Regards Jouei. [Edited by - Jouei on June 24, 2010 11:28:42 PM]
  11. Jouei

    Box2D Questions

    Yeah that is what i thought. How would you scale your gravity input then. Say i went by going by 50 pixels is 1 meter, and yes i like nice an rounded numbers. Thanks for confirming what i was saying earlier by the way. Regards Jouei.
  12. Jouei

    Box2D Questions

    I just recently downloaded Box2D.XNA and i just had a few questions and thought i would post here to see if some of you can answer them. First off it seems that there is some kind of scaling factor involved when useing it. Eg using pixels as a form of measurement since box2d seems to use meters. Am i correct that it means i would have to determine my own set of measurements eg: 100 pixels = 1 meter or 10 pixels = 1 meter. if this is the case does that means that position of the objects when being inputted into the root World for box2d also must be scaled and when using those values from the object when drawing must also be scaled and converted to pixel cords. if that is the case does it not also mean i have to scale the objects size as well for box2d. Mostly just wondering how others have done it and use box2d at this moment in time so i can decided how to implement it properly. Any and all comments are appreciated. Regards jouei.
  13. Jouei

    Moving 2D Camera Help Please

    Your question is pritty broad but i am going to give it a shot. First off when you say camera i assume 3d Graphics Api here. The first thing of note i want to say is it is probably better to move the car around your world and not the world around your car. The reason for this is you can then have the camera move the same amounts on the x and y axis and all you have to do is make sure it is always looking at the car that partly Solves half of your question. The second have is to check to see if the camera is at the edge of the map this could be done by using planes from the edge of your map up and with some basic collision detection stop the camera when it hits the plane this will have the effect of having the car move independently of the camera when at the edge of a map. Some fine tuning may be needed in the end but that is one basic way you could do it. If you want a quicker answer in the future to your questions provided more detail such as the following. Programing language Graphics Api, Is it 2d or 3d Api What you have tried if you have tried anything or are just lost. And anything else that may seem relavint. Regards Jouei.
  14. Well first off what is you programing experience or are you more interested in tools that could be used if you have programing experience in what languages. We need abit more info before we can truly answer that question. EDIT: Missed the C++ part.. There are two kinds of maps for 2d games .. well i am sure there are more but these are the two common ones i believe. First is to have a 2 Dimensional array of tiles for your game and render only a set portion to the screen based on world coordinates and tile size. The second is to use a none tile world and for that you want to read up on quad trees. A tiled world is much easier to do and is probably a better place to start.
  15. Well after my older computer died it also took with it my old collision code using SAT .. : sigh : so i am back to rewrite it i found a nice bit of a read for it but it seems my code is all broken. The Problem: Well the problem seems to be that even when the two objects are overlapping it still returns a ZERO Vector witch lets me know there is no intersection. But i can visually see that they are indeed overlapping so my code is oveusly broken. it returns the ZERO Vector on the interval distance being greater then zero this seemed odd to me but it is what the article i was reading does so i figured he is probably more right then i am, but i did try switching it around and i still walk through the rectangle or poly. But i am some what sure the problem must be with the Min and Max code after the projection onto an Axis. Anyways here is the code and related methods. internal virtual void ProjectBounding(Vector2 Axis, BoundingBase Poly, ref float Min, ref float Max) { // To project a point on an axis use the dot product Vector2[] Points = Poly.GetVerts(); float dotProduct = Vector2.Dot(Axis,Points[1]); Min = dotProduct; Max = dotProduct; for (int i = 0; i < Poly.Verts.Length; i++) { dotProduct = Vector2.Dot(Points, Axis ); if (dotProduct < Min) { Min = dotProduct; } else { if (dotProduct > Max) { Max = dotProduct; } } } } internal float IntervalDistance(float minA, float maxA, float minB, float maxB) { if (minA < minB) { return minB - maxA; } else { return minA - maxB; } } internal virtual void BuildEdges() { Vector2 p1; Vector2 p2; Edges.Clear(); for (int i = 0; i < this.Verts.Length; i++) { p1 = this.Verts; if (i + 1 >= this.Verts.Length) { p2 = this.Verts[0]; } else { p2 = this.Verts[i + 1]; } this.Edges.Add(p2 - p1); } } #region Internal Methods internal Vector2 PolyToPloyCollide(BoundingBase InternalPoly, BoundingBase Poly) { int edgeCountA = InternalPoly.Edge_Count; int edgeCountB = Poly.Edge_Count; float minIntervalDistance = float.PositiveInfinity; Vector2 translationAxis = new Vector2(); Vector2 Edge; // Loop through all the edges of both polygons for (int edgeIndex = 0; edgeIndex < edgeCountA + edgeCountB; edgeIndex++) { if (edgeIndex < edgeCountA) { Edge = InternalPoly.Edges[edgeIndex]; } else { Edge = Poly.Edges[edgeIndex - edgeCountA]; } // ===== 1. Find if the polygons are currently intersecting ===== // Find the axis perpendicular to the current edge Vector2 axis = new Vector2(-Edge.Y, Edge.X); axis.Normalize(); // Find the projection of the polygon on the current axis float minA = 0; float minB = 0; float maxA = 0; float maxB = 0; this.ProjectBounding(axis, InternalPoly, ref minA, ref maxA); this.ProjectBounding(axis, Poly, ref minB, ref maxB); float intervalDistance = IntervalDistance(minA, maxA, minB, maxB); if (intervalDistance > 0) return Vector2.Zero; intervalDistance = Math.Abs(intervalDistance); if (intervalDistance < minIntervalDistance) { minIntervalDistance = intervalDistance; translationAxis = axis; Vector2 d = InternalPoly.BoundsCenter - Poly.BoundsCenter; if (Vector2.Dot(d, translationAxis) < 0) translationAxis = -translationAxis; } } return translationAxis * minIntervalDistance; } Well that about sums it up i really would like some help on this it took me about 2 weeks last time i wrote this code cause i am not good at stuff like trig. Regards Jouei. [Edited by - Jouei on June 21, 2010 6:31:45 PM]
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!