Jump to content
  • Advertisement


  • Content count

  • Joined

  • Last visited

Everything posted by QuinnJohns

  1. QuinnJohns

    Genetic Algorithms for TSP

    I think the GA is just used as a diversification mechanism here: an alternative meta-heuristic that picks new neighbourhoods to search in. IIRC the local search itself is using an exchange operator that ranks edges based on how close they are to being part of the Minimum Spanning Tree of all cities. [/quote] Anyways, it took me a little less than two days to write the GA, mutations, crossovers, etc. Pretty excited about the results. Thanks for the input everyone.
  2. I'm trying to code a GA for the Travelling Salesman Problem, would there be any chance someone could give me basic pseudocode? I've looked over a ton of online documentations, but I'm still confused on the basic flow of a system like that? Thanks.
  3. QuinnJohns

    Genetic Algorithms for TSP

    Thanks for the help! I've been toying around with different algorithms, to gain a better understanding. I've written so far, Depth First, Bread First, Best First, Insertion Heuristic, and now I'm trying a GA. Using a GA would be pointless for me on a small dataset, but i'm playing with about 100 "city" data points. Thanks again for the help! Regards, Quinn
  4. QuinnJohns

    I'm back, and ready to ActionScript

    Welcome back.
  5. QuinnJohns

    XNA - Common SurfaceFormat?

    Thanks for the input!
  6. [font="Verdana"]I've done some device enumeration with SupportedDisplaymodes, et al[/font] [font="Verdana"] List<DisplayMode> dmList = new List<DisplayMode>(); public void GetDeviceEnumeration() { foreach (DisplayMode dm in GraphicsAdapter.DefaultAdapter.SupportedDisplayModes) { dmList.Add(dm); } } [/font][font="Verdana"]One thing I've noticed is that the graphics device, returns multiple resolutions, at different surface formats, being BGR565 and COLOR. After some research, I've found that BGR 565 is used on Windows Phone 7, and on PC, but not on XBOX 360. However, COLOR is used on both, but it is inherently not as quick. Is one "commonly used" over the other in terms of selected surface formats? and why? in industry or indie games? I'm currently doing development for both PC and Windows Phone games, however, this enumeration is only being used to generate list boxes in the "options" screens of the PC games only. I'd love to hear some input from the community on both.[/font] [font="Verdana"]Thanks![/font]
  7. QuinnJohns


    Not entirely a fan of the web design, the black and green just take away from the vibrant photographs. Also, the menus just look very plain. If you decide to stick with darker colors, I'd suggest finding ways to make everything pop. Take a look at http://www.matkey.com/. Simple design like yours, but the emphasis goes on the images, and there is more than just plain text links. As others stated, I'd also take into consideration what the page looks like in different browser windows / resolutions. Other than that, it's a nice site. Best of luck, Quinn
  8. Hey MJP, nice to see you're still alive and kicking.
  9. QuinnJohns

    As far as maths goes..

    To be honest, even in college, one of the best math resources I've ever found was http://www.khanacademy.org/. Enjoy. Quinn
  10. Well, in the sense of it, I read fictional books all the time (G.R.R.M - Game of Thrones, etc). I "reference" technical books. Only technical book I've read cover to cover, was an SAP in 24-hours book, because I was interested in the architecture. Regardless, you'll find that if you decide to ever acquire reference books - on a particular topic, I'd try and buy the e-book versions, for easy searching, etc. As one of the other posters stated, its actually sitting down and programming that'll make you a code expert. I wish you the best of luck exploring your passions in game development. It's a fun ride. Regards, Quinn
  11. QuinnJohns

    The Process of Creating A Game?

    Generally speaking, I'm a proponent of spending a majority of your time doing documentation. I've done my fair share of development, both for companies, on my own, or for my own company, games and non-games a like. Mainly, if you're doing a game, I'd suggest things such as Case Diagrams, Flowcharts, UML. If the operation is smaller, this would be an ideal time, to do detailed storyboards, wireframes of user interfaces. Whiteboards are your friend. Frankly, a lot of your common software development methodologies easily applied to games. Regards, Quinn
  12. QuinnJohns

    What languange and/or library should I learn?

    Do you not get tired of this statement? If I were you I would just keep it copied to a word document so you could paste it into threads [/quote] Or a keybinded macro? haha.
  13. QuinnJohns

    Examples for my XNA Book?

    I'd suggest visiting the following link: https://www.facultyresourcecenter.com/curriculum/pfv.aspx?ID=8119&c1=en-us&c2=0&Login= Apparently, it includes all 16 chapters, and the sample code for your book. Happy to help. Quinn
  14. QuinnJohns


    Sorry, for the lack of posts lately, I've been putting together a development team of friends, to start working on a small scale single player RPG, and we're in the design phase, for the moment. Also, on the side, I'm working on two projects: 1) Updating my Web Page. 2) Simple Poker Game. I'll get some pictures posted before long. Thanks. [Pixelante]
  15. QuinnJohns

    Map Editor (2D)

    I'm in the midst of working on a 2D Tile Editor, for use in creating some old school games I'm going to be working on, in the future. Basically, going to make some old classic recreations like Digdug, Pacman, Super Mario Bros, as just a way to enhance my ability as a gameplay and tools programmer, while delving into the old school abyss of old time favorites. Of course, none of these applications are for profit or anything, just educational purposes. I'll be sure to post some screen shots when I'm done, but it'll still be another week or two. I've got the drawing and such all done, resizable grid and map size, but I still need to work on getting my file loading and saving down pat, and optimize what I've got thrown together. I'll keep everyone updated. Side Note: Tile set not being used, just showing example of map editor. I have some tile sets in production for my own works. Quinn [Pixelante]
  16. QuinnJohns

    Overlap Tests(Mesh)

    These are snippets of the source code, they can be placed and broken up to be more efficient then they are currently laid out to be. D3DXVECTOR3 vCenter; // Lock the Vertex Buffer if(SUCCEEDED(pMesh->LockVertexBuffer(D3DLOCK_READONLY, (BYTE**)&Ptr))) { // Computer Bounding Sphere Radius D3DXComputeBoundingSphere((void*)Ptr, pMesh->GetNumVertices(), pMesh->GetNumBytesPerVertex(), &vCenter, &fObjectRadius); fObjectRadius = D3DXVec3Length(&vCenter) + fObjectRadius; // Unlock the Vertex Buffer pMesh->UnlockVertexBuffer(); }This calculates out your Radius, for use in the below Overlap test, your radius will never change, since this mesh isn't adjusting in size. D3DXVECTOR3 vObjectPosVS, vPlayerPosVS; D3DXVec3TransformCoord( &vObjectPosVS, &matView, &vObjectPosWS ); D3DXVec3TransformCoord( &vPlayerPosVS, &matView, &vPlayerPosWS ); Basically, at this point, we're transforming the coordinates from World-space to View-space, and then if object obstructs player, apply transparency: if ( ( vObjectPosVS.z + fObjectRadius > 0 ) && ( vObjectPosVS.z - fObjectRadius < vPlayerPosVS.z ) ) { D3DXVECTOR3 vPositionsVS [4]; D3DXVECTOR3 vPositionsSS [4]; D3DXVECTOR2 vObjectMaxSS; D3DXVECTOR2 vObjectMinSS; D3DXVECTOR2 vPlayerMaxSS; D3DXVECTOR2 vPlayerMinSS; // Calculate the area the object bounding volume takes up in view space vPositionsVS[0] = D3DXVECTOR3( vObjectPosVS.x + fObjectRadius, vObjectPosVS.y, vObjectPosVS.z ); vPositionsVS[1] = D3DXVECTOR3( vObjectPosVS.x - fObjectRadius, vObjectPosVS.y, vObjectPosVS.z ); vPositionsVS[2] = D3DXVECTOR3( vObjectPosVS.x, vObjectPosVS.y + fObjectRadius, vObjectPosVS.z ); vPositionsVS[3] = D3DXVECTOR3( vObjectPosVS.x, vObjectPosVS.y - fObjectRadius, vObjectPosVS.z ); // Calculate the area the object bounding volume takes up in screen space D3DXVec3TransformCoordArray( vPositionsSS, sizeof(D3DXVECTOR3), vPositionsVS, sizeof(D3DXVECTOR3), &matProjection, 4 ); vObjectMaxSS.x = vPositionsSS[0].x; vObjectMinSS.x = vPositionsSS[1].x; vObjectMaxSS.y = vPositionsSS[2].y; vObjectMinSS.y = vPositionsSS[3].y; // Calculate the area the player bounding volume takes up in view space vPositionsVS[0] = D3DXVECTOR3( vPlayerPosVS.x + fPlayerRadius, vPlayerPosVS.y, vPlayerPosVS.z ); vPositionsVS[1] = D3DXVECTOR3( vPlayerPosVS.x - fPlayerRadius, vPlayerPosVS.y, vPlayerPosVS.z ); vPositionsVS[2] = D3DXVECTOR3( vPlayerPosVS.x, vPlayerPosVS.y + fPlayerRadius, vPlayerPosVS.z ); vPositionsVS[3] = D3DXVECTOR3( vPlayerPosVS.x, vPlayerPosVS.y - fPlayerRadius, vPlayerPosVS.z ); // Calculate the area the player bounding volume takes up in screen space D3DXVec3TransformCoordArray( vPositionsSS, sizeof(D3DXVECTOR3), vPositionsVS, sizeof(D3DXVECTOR3), &matProjection, 4 ); vPlayerMaxSS.x = vPositionsSS[0].x; vPlayerMinSS.x = vPositionsSS[1].x; vPlayerMaxSS.y = vPositionsSS[2].y; vPlayerMinSS.y = vPositionsSS[3].y; // Check for overlap if ( vObjectMaxSS.x < vPlayerMinSS.x ) return; if ( vObjectMaxSS.y < vPlayerMinSS.y ) return; if ( vObjectMinSS.x > vPlayerMaxSS.x ) return; if ( vObjectMinSS.y < vPlayerMaxSS.y ) return; // If we got here, the object is obstructing and should be made transparent }There we have it. The code can be manipulated however you want, I'm currently handling it during any sort of updates, to handle manipulation of the location of the volume. Many thanks to MJP for helping guide me, each step of the process. Hopefully, this helps someone out in the future, be sure and rate up MJP after reading this please. Hehe.
  17. QuinnJohns

    Overlap Tests (Mesh)

    So, I am in the midst of putting together a screen-space overlap snippet, to handle mesh transparency, if the view of a player is being obstructed by another mesh or multiple meshes. A snippet is fourthcoming, when I finish it. I want to thank MJP, for all the help he's given me in learning such a concept. Quinn [Pixelante]
  • Advertisement

Important Information

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

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!