Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

122 Neutral

About Jmelgaard

  • Rank
  1. Quote:Original post by Nedelman I have an XNA particle systems demo implemented with point sprites posted at which you might find helpful. It runs on PC as well as Xbox 360. The particle system logic is implemented in C# code, which isn't exactly ideal performanc-wise, but it does at least make the code easier to reuse. Conserning the Project Files... Since its csproj files i gues Visual Studio???... but what version then, cus i can't seem to open them? o_O...
  2. Quote:Original post by Nedelman I have an XNA particle systems demo implemented with point sprites posted at which you might find helpful. It runs on PC as well as Xbox 360. The particle system logic is implemented in C# code, which isn't exactly ideal performanc-wise, but it does at least make the code easier to reuse. Hi and THX!... haven't looked thoroughly into it yet, since im at work. But on the surface it looks to be very usefull. So im defenetly having my hopes up. And well, C#/Managed Code might not be ideal, but as far as my small projects go, its gonna be 2D or Isometric games only. and very smalle games since it on a spare time basis, then the Reuseble code and fast development is by far more important than performance. Quote:Original post by Promit Quote:Since just drawing each sprite in a normaly facion really puts a drag on the performance... (ofc it does. knew that from start)... Im especially interested in optimizations.I have no idea what "normaly facion" (presumably "normal fashion") is supposed to mean. My C# code handles rather a lot of particles without any noticeable impact (relative to native code). You need to be more specific, probably with code. Im gonna have to get back to you on that if you need more info, as stated above im at work ATM. but basicly calling the Draw 10.000 times on the Sprite letting the CPU work for it. instead of useing Vertex Buffers, the GPU or other ways to increase performance.
  3. Im ofc Thankfull for your input... ;)
  4. Unfortunetly this is only small improvements, and what i need is large scale... ATM i can only render around 20K sprites and stay above 30FPS on a: Core 2 Duo 6600 Radeon 1600 XT 2GB Dual Channel DDR II And i need to reach a nummer with at least 1 more digit... preferebly 2 or even 3... ive read about pushing some data to vertex buffers and make the GPU do some of the dirty work... witch should speed things up... i have no idea how to tho...
  5. Hi im working on a particle system in managed DirectX written in C#, Point-sprite based. Im now looking for some good artickles/excamples on the topic. Since just drawing each sprite in a normaly facion really puts a drag on the performance... (ofc it does. knew that from start)... Im especially interested in optimizations.
  6. Hi Im been trying to build a little game in 2D with sprites... And basicly its all working fine... but im getting some undesired lines when i "scroll" in my game... Atm im bulding a huge map of tiles, my tiles are fx 64x64, and my map is 64x64 of thoes tiles... the lines im talking aboug abear horisontaly between these tiles... A cut of a screenshot can be seen here: My code is "build on" the toturials from and in C#... But i won't post code just yet since i figured it might be something specifik im forgetting and code might not be needed to explain whats wrong... If thats not the case, i can post code...
  7. Jmelgaard

    Fullscreen (CsGL & C#)

    Well i would disagree on weather CsGL is worth lerning or not... It stille leaves me with a lot of knolege, and with that knolege TAO and DirectX will both be easyer overcome... So its just a Question of where to start... and since NeHe had a lot of very good and easy toturials, CsGL was in it self easy overcome, and the gennereal experience from can be used other places... So even if the Math book is Old and a newer version is out there... it still gives u knolege... in the end im interested in both OpenGL and DirectX in genneral.. so what wrappers i use is for now not of my consern...
  8. Jmelgaard

    Fullscreen (CsGL & C#)

    Hi out there.... I have a bit of a problem... i havent been able to figure out to enable fullscreen mode for my game... Im using C#, .NET and CsGL... Is it possible to make fullscreen in C#... or do i have to make my main window in C++... If i need C++, I assume that im still able to code the rest in C#, since it compiles to same CLR on .NET right?... (thats posible in most other aspects of .NET Programming)....
  9. This might sound crasy... but its not your int thats the problem... but your double's... Double and Float values are both floating-point values which use base two, this means they cannot store decimal fractions exactly, resulting in rounding errors and a loss of precision. so a double value is not as presice as an integer... thats proberly why u get that message... but as H_o_p_s posted, typecasting might solve your problem... but then u have an idea why u get that error... You can also consider using a BigDecimal instead, since BigDecimals are exact representations of decimal fractions, and couses no precision loss... and further u can take a look at which i (almost) just stumbled on, which aparently provides a bit more...
  10. Jmelgaard

    2D Bounce Engine

    Quote:Original post by MattMcFarland Well, I was using cos and sin to create my vector and I just discovered that it is much better just to make the vector off of simple x and y. I would like to thank Anthony Flack for the answer (from indie developer forums) his answer is as follows: nstead of moving your ball based on cos and sin of an angle, you should deal with it directly as a vector - movement of x, and movement of y. Let's call them mx# and my#. Kind of like your xspeed and yspeed, but don't recalculate them each frame; leave them in a persistent state. So every frame, you would just go x:+mx# y:+my# -- Well... i would still say that you should try with your Cos and Sin since u will proberbly come to muchs use of it... And your mx and my vector is just calculated from sin and cos... then u will be able to make turns as well and it is not that hard... what u basicly want is a Direction (between 0 and 360 degrees) and a Speed... then: mx = Speed * Cos(Direction) my = Speed * Sin(Direction) B_U_T!!! Depending on what language us use this might not give the desired result... What u have to remember is, what do u have to feed your Cos and Sin methods with? Degrees or Radians? For .NET as an example u have to convert your degrees to Radians for it to work... Done very simple: Degrees to radians: ((PI * deg) / 180) Radians to degrees: ((180 / PI) * deg)
  11. Jmelgaard

    how to set a max fps?

    If its to have the same movement weather u are running at 30 fps or at 100 fps on a object, i have a little (Selfmade) library with a few helpfull classes. The library is in no way complete and a lot will proberly be added over time... and some changes might be made (bug correction if there is eny ect.) but as for now it contains a few things i find very helpfull i my gameprojects and i use the library a lot my self... But back to the Class u can use... FrameCounter... Its a simple little class whitch provides u with 2 things: FPS: calculatet as a float value (u can convert it to INT if u like. TimeFactor: A float factor to multiply your objects movement with, runs 1:1 at 100fps What u basicly need to do is create a new instance of the FrameCounter Class. ex: CsGL.dotJEM.Extesion.FrameCounter fc = new CsGL.dotJEM.Extesion.FrameCounter(); then u have to call it in your main loop (where u draw things) i Prefere to do it as the first thing. ^^ fc.frameCount(); and then u will be able to pull the to values from the Object. fc.FPS and fc.TimeFactor it might not be the best implementation for calculating the timeFactor, but i find it very easy to use and it have worked for me so far... If your FPS is very high u will have to lower its presition or it wont work proberly... but for me its default presition works fine... ________________________________________________________________________________ Some other content of the lib is a Math3D class for some also very usefulld calculations... Radian to Degree conversion (dine easely with (180/Math.PI)*deg, but i find it helpfull not to type that every time) Degree to Radian Sine from Degrees Cosine from Degrees 3D Vector rotations (Around X,Y and Z) A Point2D and Point3D with Float precition since CsGL is working with float. and a bit more... ________________________________________________________________________________ Now if u are interested (or others are) plz feel free to send me a PM and i can send it to u... It even has Documentation ^^ (Well most of it, and my spelling might not be that good so bare with me) :D
  12. Jmelgaard

    Calculating 3D Vectors from Rotations

    Im more and more beginning to think thats it will be needed with a third rotation to accomplish... Since i can't se how else it should be posible... Im talking strickly about my spaceship scenario... But then the Question will be how to do that so that it will work prober... If we evaluate the 2 Vectors: A = (-1; 2;-2) B = ( 1; 2;-2) By rotating them around the Z axis i get: (Z-Rot) A = (-2;-1;-2) B = (-2; 1;-2) but giving an V = ( 0; 2;-2) However what im aming for for thoes to are: (V-Rot) A = ( 0; 1,3; 2,7) B = ( 0; 2,7; 1,3) (I hope that might clerify it a bit or at least do something) ^^ But how do i then get these results... ? Edit: By sitting and thinking a bit further got the conclusion that it should be posible to accomplishe it using the folowing: Normaly we would rotate in the Order: X then Z giving us all the desired derections... however not the right Flip... But by a diferent approach we migt uptain just that: Z (Flip) then X (Lift) and finnaly Y (Direction) The big problem now would be how to controll this wilt the 4 actions: Flip Left Flip Right Lift Up Lift Down [Edited by - Jmelgaard on October 20, 2005 4:38:46 PM]
  13. Jmelgaard

    Font Tools...

    Hi... Im lokking for a list of Font Tools... and if posible documentation for CsGL... But for now the font tools are of most importans... (using c#) ive found: GDITextureFont but it places it self behind some objects, and my texture binds to it... for reasons unknown...
  14. Jmelgaard

    Sorry another math question!

    Triangulation... To calculate the rest in a triangle where u have 2 sides |AB| & |AC| and the angle between... use Cos... c^2 = a^2 + b^2 - 2ab*cosC a = |BC| b = |AC| c = |AB| so if A = 42deg, |AB| = 175.83 & |AC| = 287.21 |BC| = 195,82 And by using Sinus for the other: |AC| = 292.40 thats my results...
  15. Jmelgaard

    Calculating 3D Vectors from Rotations

    Or so i thougt... in the "Ghost" situation, it works perfectly... however in the spaceship case it does not... and why?... well the explanaition is easy... but i can't figure the solution out ATM.. As long as we are moving along the Z Axis it works as its surposed... its quite ovious that this is becouse we rotate around the same Z-Axis at all time, and the "wrong" one... The rotation is clearly around the space-Z-Axis... when it should be around my ships Z-Axis instead... Hope u understand? ^^
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. 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!