Daily Archives

Articles indexed Tuesday December 28 2010

Page 2/34 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Civilization 4: time in own scenario runs up too quickly.

    - by oKtosiTe
    In Civilization 4 (Beyond the Sword) I started making a scenario that focuses on the colonization of North America. For added realism, I set the StartYear=1780. Everytime I run the scenario, the time runs up far too quickly–probably because I set Era=ERA_ANCIENT and GameTurn=0–so that after just twenty turns the clock nears present day. I'm not really sure how to go fix this, other than by playing an actual marathon game from the start up to the year 1780 and copy over the values. Is there any way to calculate/know the right values for my scenario?

    Read the article

  • Slick 2D first trial error

    - by pringlesinn
    I followed some advices to learn Slick2D and when I started doing the "SimpleGame" I got my first error. Does anyone have any idea of what is it and how to fix? Sun Dec 26 23:09:12 GMT-03:00 2010 INFO:Slick Build #274 Sun Dec 26 23:09:12 GMT-03:00 2010 INFO:LWJGL Version: 2.0b1 Sun Dec 26 23:09:12 GMT-03:00 2010 INFO:OriginalDisplayMode: 1024 x 768 x 16 @60Hz Sun Dec 26 23:09:12 GMT-03:00 2010 INFO:TargetDisplayMode: 800 x 600 x 0 @0Hz Sun Dec 26 23:09:12 GMT-03:00 2010 ERROR:Could not find a valid pixel format org.lwjgl.LWJGLException: Could not find a valid pixel format at org.lwjgl.opengl.WindowsPeerInfo.nChoosePixelFormat(Native Method) at org.lwjgl.opengl.WindowsPeerInfo.choosePixelFormat(WindowsPeerInfo.java:52) at org.lwjgl.opengl.WindowsDisplayPeerInfo.initDC(WindowsDisplayPeerInfo.java:54) at org.lwjgl.opengl.WindowsDisplay.createWindow(WindowsDisplay.java:158) at org.lwjgl.opengl.Display.createWindow(Display.java:299) at org.lwjgl.opengl.Display.create(Display.java:848) at org.lwjgl.opengl.Display.create(Display.java:800) at org.newdawn.slick.AppGameContainer.tryCreateDisplay(AppGameContainer.java:299) at org.newdawn.slick.AppGameContainer.access$000(AppGameContainer.java:34) at org.newdawn.slick.AppGameContainer$2.run(AppGameContainer.java:364) at java.security.AccessController.doPrivileged(Native Method) at org.newdawn.slick.AppGameContainer.setup(AppGameContainer.java:345) at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:314) at SimpleGame.main(SimpleGame.java:38) Exception in thread "main" org.newdawn.slick.SlickException: Failed to initialise the LWJGL display at org.newdawn.slick.AppGameContainer.setup(AppGameContainer.java:375) at org.newdawn.slick.AppGameContainer.start(AppGameContainer.java:314) at SimpleGame.main(SimpleGame.java:38)

    Read the article

  • How to play many sounds at once in OpenAL

    - by Krom
    Hello, I'm developing an RTS game and I would like to add sounds to it. My choice has landed on OpenAL. I have plenty of units which from time to time make sounds: fSound.Play(sfx_shoot, location). Sounds often repeat, e.g. when squad of archers shoots arrows, but they are not synced with each other. My questions are: What is the common design pattern to play multiple sounds in OpenAL, when some of them are duplicate? What are the hardware limitations on sounds count and tricks to overcome them?

    Read the article

  • In general, are programmers or artists paid better?

    - by jokoon
    I'm in a private game programming school where there also are 3D art classes; sadly, there seems to be a lot more students in those latter classes, something like 50% or 100% more. So I was wondering: in the real video game industry, which of the artist/modeler or the programmer is more likely to be wanted in a company, so who will be paid more ? I'm sure there are artists which are obviously paid better than other programmers and I'm sure there are other sorts of jobs in the game industry (sound, management, testers), but I wanted to know if there is a general tendency for one or the other. And sometime I wonder even if an artist can happen to write scripts...

    Read the article

  • Where is a good place to learn how to develop games?

    - by pringlesinn
    I'm brazilian and I want to learn how to develop a game in some college or something like that, but I don't know any place here to learn it. Here is not that good either to develop games, as we don't have many companies to do that. So, I was thinking about working in some place else, while I study it. What I really want to know is, a good place to learn, and a country that developers are well payed to be able to pay my course and still have money to do something else. I'm a Java programmer, still learning a lot, but I want to do it later. A few years from now.

    Read the article

  • Calculating the force of an impact?

    - by meds
    I'm trying to figure out a way to determine the force two objects collide in. I have two vectors defining their linear velocity at the time of impact, their mass and their angular velocity. Keep in mind this is all for a 2D physics engine. I don't think it's as simple as adding up these values and figuring out if it's large enogh it makes a large impact since that doesn't take into account if the two objects are travelling in the same direction (as an example). Any ideas?

    Read the article

  • Homebrew development for 7th gen home consoles

    - by Brian McKenna
    I'm looking to do some homebrew development for either the Wii, Xbox360 or PS3. I'll be developing from a Linux system. The programming language doesn't matter. Wii - devkitPPC and libogc look fairly easy and complete Xbox360 - Mono.XNA looks interesting but not very feature complete PS3 - psl1ght seems interesting but I haven't been able to find out much How homebrew friendly are each of these consoles? Is someone able to give a comparison of each of these scenes?

    Read the article

  • Are there any font rendering libraries for games development that support hinting?

    - by Richard Fabian
    I've used angel code's bitmap font generator quite a bit and though it's very good, I wondered if there would be a way of using the hinting information to provide a better readable result by using hinting to provide differing thickness based on size/pixel coverage. I imagine any solution would have to use the distance field tech presented in the valve paper on smoothing fonts while maintaining or reducing asset size. (http://www.gamedev.net/community/forums/topic.asp?topic_id=494612) but I haven't found any demos of it being used with hinting information turned on or included in the field gradients in any way. Another way of looking at this is whether there are any font bitmap generators that will output mipmaps that still maintain their readability in the face of pixel size. I think the lower mip levels would try to guarantee fill and space where it is necessary to maintain readability/topology over maintaining style/form (the point of hinting). In response to "Is there a reason you can't just render the size you want", the problem lies in the fact that font rasterisers currently don't render in 3D, and hinting information would be important in different amounts due to the pixel density being different along different axes, even differing in importance along the length of a string due to the size reducing over distance. For example, I only want horizontal hinting in a texture that is viewed from the side, and only really want vertical hinting in a font that is viewed from below or above. This isn't meant to be a renderer that tries to render a perfect outline as accurately as possible, as hinting distorts the reality of the font, instead this is meant to be a rendering solution for quite static scenes, but scenes that have 3D transformed and warped text layout. In this case the legibility is important, more important than the accuracy of representation of the polygon shape.

    Read the article

  • Begining a simple game development. [closed]

    - by Vinod Maurya
    Hi, I have searched a lot about beginning the game development but I didn't found the appropriate answer which I am looking in fact I got more confused. What I want to know is which game engine, modeling programs (I know only 2, please tell me if there is some other) to use? For the beginning, I want to use some free game engines for learning purpose. I am an absolute beginner in game development. I have a good programming experience in C++, VB, Java, C#. Thanks.

    Read the article

  • Procedural terrains in 3D: what has been done ? Are there common algo and/or theories about it ?

    - by jokoon
    Besides programming, modeling an environment takes a great deal of time. I don't know about the work time involved, for example, in a WoW dungeon level, or other beautiful city-like, future environment, jungles, fantasy, etc, but this kind of work is made from scratch by artists. What are the techniques involved in the TorchLight level randomizer, and does other titles have similarities with this ? Is there a family name for such techniques ?

    Read the article

  • Making sense of the Game State manager tutorial?

    - by Johnny Quest
    I have come across the Game State Managemnet tutorial at http://create.msdn.com/en-US/education/catalog/sample/game_state_management because I thought this would be a good place to start a game off. I have added a new screen, but I am still a bit lost on how everything works. When I make my game, do I only need one more additional screen? just for gameplay? or should I have a different screen for each level?

    Read the article

  • Multiple Key Presses in XNA?

    - by Bryan Harrington
    I'm actually trying to do something fairly simple. I cannot get multiple key presses to work in XNA. I've tried the following pieces of code. else if (keyboardState.IsKeyDown(Keys.Down) && (keyboardState.IsKeyDown(Keys.Left))) { //Move Character South-West } and I tried. else if (keyboardState.IsKeyDown(Keys.Down)) { if (keyboardState.IsKeyDown(Keys.Left)) { //Move Character South-West } } Neither worked for me. Single presses work just fine. Any thoughts?

    Read the article

  • Tools for creating assets? [closed]

    - by Agent_9191
    There are similar questions about finding existing resources that are free for use (free sprites/images, music, sound), but I'm interested in creating the resources myself. What tools do you use for asset creation/modification? Please only put one tool per answer. Also try to include the following information: Product Name Link to website Type of assets is can create (2D images, 3D images, audio, etc) OS(s) supported Cost License (if free/open source) General summary

    Read the article

  • Tiled game: how to correct load background image ?

    - by stighy
    Hi, i'm a newbie. I'm trying to develop a 2d game (top-down view). I would like to load a standard background, a textured ground... My "world" is big, for example 3000px X 3000px. I think it is not a good idea to load a 3000px x 3000px image and move it... So, how is the best practice ? To load a single small image (64x64) and repeat it for N times ? If yes, ok, but how i can manage the "background" movement ? Thanks Bye!

    Read the article

  • C# XNA Normals Question

    - by Wade
    Hello all! I have been working on some simple XNA proof of concept for a game idea I have as well as just to further my learning in XNA. However, i seem to be stuck on these dreaded normals, and using the BasicEffect with default lighting i can't seem to tell if my normals are being calculated correctly, hence the question. I'm mainly drawing cubes at the moment, I'm using a triangle list and a VertexBuffer to get the job done. The north face of my cube has two polygons and 6 vectors: Vector3 startPosition = new Vector3(0,0,0); corners[0] = startPosition; // This is the start position. Block size is 5. corners[1] = new Vector3(startPosition.X, startPosition.Y + BLOCK_SIZE, startPosition.Z); corners[2] = new Vector3(startPosition.X + BLOCK_SIZE, startPosition.Y, startPosition.Z); corners[3] = new Vector3(startPosition.X + BLOCK_SIZE, startPosition.Y + BLOCK_SIZE, startPosition.Z); verts[0] = new VertexPositionNormalTexture(corners[0], normals[0], textCoordBR); verts[1] = new VertexPositionNormalTexture(corners[1], normals[0], textCoordTR); verts[2] = new VertexPositionNormalTexture(corners[2], normals[0], textCoordBL); verts[3] = new VertexPositionNormalTexture(corners[3], normals[0], textCoordTL); verts[4] = new VertexPositionNormalTexture(corners[2], normals[0], textCoordBL); verts[5] = new VertexPositionNormalTexture(corners[1], normals[0], textCoordTR); Using those coordinates I want to generate the normal for the north face, I have no clue how to get the average of all those vectors and create a normal for the two polygons that it makes. Here is what i tried: normals[0] = Vector3.Cross(corners[1], corners[2]); normals[0].Normalize(); It seems like its correct, but then using the same thing for other sides of the cube the lighting effect seems weird, and not cohesive with where i think the light source is coming from, not really sure with the BasicEffect. Am I doing this right? Can anyone explain in lay mans terms how normals are calculated. Any help is much appreciated. Note: I tried going through Riemers and such to figure it out with no luck, it seems no one really goes over the math well enough. Thanks!

    Read the article

  • Web application development platform recommendation

    - by TK.Maxi
    Hi all I did a year's worth of Pascal, Visual Basic and C++ 15 years ago, so suffice it to say that I'm a complete n00b & lamer when it comes to this. I really do hope that this question doesn't canned, but if it does, please be so kind as to point me in the direction of where it should be posted. I have an idea, like so many others, for a web app. I don't necessarily have the capital to outsource the development of the app right now, and I probably wouldn't want to, since non-disclosure agreements can be expensive to enforce, especially in this day and age of intercontinental outsourcing. I need the app to be usable on any mobile device (eventually), primarily on the major mobile platforms at first, on the web, (pc/mac/*ix) obviously, on mobile web browsers like opera mobile, etc. I envisage the app interacting with the major social networks like fb, orkut, msn im, twitter, et al in a way where friend's are messaged and/or wall posted, a message is posted to the users wall. Geo-location functionality is a plus, considering the service/app can be location sensitive in two ways, 1, the immediate location of the user, 2. the desired location of the user. I'd like to incorporate OpenID sign on, and the flip-side, the service will require that people (service providers) list their specialities/specialisations/interests/areas of expertise, so that matches to user requests can be made by the service, while users' requests are posted into the web universe. I've probably described a glut of apps out there, but I'd appreciate feedback on the sort of platform that I should look at using, be it hosted on something like Google's app engine, or written in android friendly code, or whatever. I'm a firm believer in herd mentality, especially at the start of a project that I have very little experience in. The more opinions, the merrier! I can't get very much more specific, since that would give the idea away. Thanks for your time and I look forward to hearing from wise and experienced and the fresh and innovative alike. Thanks

    Read the article

  • "Too many indexes on table" error when creating relationships in Microsoft Access 2010.

    - by avianattackarmada
    I have tblUsers which has a primary key of UserID. UserID is used as a foreign key in many tables. Within a table, it is used as a foreign key for multiple fields (e.g. ObserverID, RecorderID, CheckerID). I have successfully added relationships (with in the the MS Access 'Relationship' view), where I have table aliases to do the multiple relationships per table: *tblUser.UserID - 1 to many - tblResight.ObserverID *tblUser_1.UserID - 1 to many - tblResight.CheckerID After creating about 25 relationships with enforcement of referential integrity, when I try to add an additional one, I get the following error: "The operation failed. There are too many indexes on table 'tblUsers.' Delete some of the indexes on the table and try the operation again." I ran the code I found here and it returned that I have 6 indexes on tblUsers. I know there is a limit of 32 indexes per table. Am I using the relationship GUI wrong? Does access create an index for the enforcement of referential integrity any time I create a relationship (especially indexes that wouldn't turn up when I ran the script)? I'm kind of baffled, any help would be appreciated.

    Read the article

  • javascript-aware html parser for Python ~

    - by znetor
    <html> <head> <script type="text/javascript"> document.write('<a href="http://www.google.com">f*** js</a>'); document.write("f*** js!"); </script> </head> <body> <script type="text/javascript"> document.write('<a href="http://www.google.com">f*** js</a>'); document.write("f*** js!"); </script> <div><a href="http://www.google.com">f*** js</a></div> </body> </html> I want use xpath to catch all lable object in the html page above... In [1]: import lxml.html as H In [2]: f = open("test.html","r") In [3]: c = f.read() In [4]: doc = H.document_fromstring(c) In [5]: doc.xpath('//a') Out[5]: [<Element a at a01d17c>] In [6]: a = doc.xpath('//a')[0] In [7]: a.getparent() Out[7]: <Element div at a01d41c> I only get one don't generate by js~ but firefox xpath checker can find all lable!? http://i.imgur.com/0hSug.png how to do that??? thx~! <html> <head> </head> <body> <script language="javascript"> function over(){ a.innerHTML="mouse me" } function out(){ a.innerHTML="<a href='http://www.google.com'>google</a>" } </script> <body><li id="a"onmouseover="over()" onmouseout="out()">mouse me</li> </body> </html>

    Read the article

  • Set Facebook status using iphone app

    - by gmcalab
    I have just started with the new graph api for facebook. I have gotten a few items to work like logging in and getting the user name and displaying this to the screen. I am having trouble figuring out how to set my status with the graph api... I have tried a couple things but I always receive and error response back. Any ideas? NSMutableDictionary *params = [NSMutableDictionary dictionaryWithObjectsAndKeys: @"test2", @"test", nil]; [_facebook requestWithMethodName:@"status.set" andParams:params andHttpMethod:@"POST" andDelegate:self];

    Read the article

  • Efficient Context-Free Grammar parser, preferably Python-friendly

    - by Max Shawabkeh
    I am in need of parsing a small subset of English for one of my project, described as a context-free grammar with (1-level) feature structures (example) and I need to do it efficiently . Right now I'm using NLTK's parser which produces the right output but is very slow. For my grammar of ~450 fairly ambiguous non-lexicon rules and half a million lexical entries, parsing simple sentences can take anywhere from 2 to 30 seconds, depending it seems on the number of resulting trees. Lexical entries have little to no effect on performance. Another problem is that loading the (25MB) grammar+lexicon at the beginning can take up to a minute. From what I can find in literature, the running time of the algorithm used to parse such a grammar (Earley or CKY) should be linear to the size of the grammar and cubic to the size of the input token list. My experience with NLTK indicates that ambiguity is what hurts the performance most, not the absolute size of the grammar. So now I'm looking for a CFG parser to replace NLTK. I've been considering PLY but I can't tell whether it supports feature structures in CFGs, which are required in my case, and the examples I've seen seem to be doing a lot of procedural parsing rather than just specifying a grammar. Can anybody show me an example of PLY both supporting feature structs and using a declarative grammar? I'm also fine with any other parser that can do what I need efficiently. A Python interface is preferable but not absolutely necessary.

    Read the article

  • [C#][XNA] Draw() 20,000 32 by 32 Textures or 1 Large Texture 20,000 Times

    - by Rudi
    The title may be confusing - sorry about that, it's a poor summary. Here's my dilemma. I'm programming in C# using the .NET Framework 4, and aiming to make a tile-based game with XNA. I have one large texture (256 pixels by 4096 pixels). Remember this is a tile-based game, so this texture is so massive only because it contains many tiles, which are each 32 pixels by 32 pixels. I think the experts will definitely know what a tile-based game is like. The orientation is orthogonal (like a chess board), not isometric. In the Game.Draw() method, I have two choices, one of which will be incredibly more efficient than the other. Choice/Method #1: Semi-Pseudocode: public void Draw() { // map tiles are drawn left-to-right, top-to-bottom for (int x = 0; x < mapWidth; x++) { for (int y = 0; y < mapHeight; y++) { SpriteBatch.Draw( MyLargeTexture, // One large 256 x 4096 texture new Rectangle(x, y, 32, 32), // Destination rectangle - ignore this, its ok new Rectangle(x, y, 32, 32), // Notice the source rectangle 'cuts out' 32 by 32 squares from the texture corresponding to the loop Color.White); // No tint - ignore this, its ok } } } Caption: So, effectively, the first method is referencing one large texture many many times, each time using a small rectangle of this large texture to draw the appropriate tile image. Choice/Method #2: Semi-Pseudocode: public void Draw() { // map tiles are drawn left-to-right, top-to-bottom for (int x = 0; x < mapWidth; x++) { for (int y = 0; y < mapHeight; y++) { Texture2D tileTexture = map.GetTileTexture(x, y); // Getting a small 32 by 32 texture (different each iteration of the loop) SpriteBatch.Draw( tileTexture, new Rectangle(x, y, 32, 32), // Destination rectangle - ignore this, its ok new Rectangle(0, 0, tileTexture.Width, tileTexture.Height), // Notice the source rectangle uses the entire texture, because the entire texture IS 32 by 32 Color.White); // No tint - ignore this, its ok } } } Caption: So, effectively, the second method is drawing many small textures many times. The Question: Which method and why? Personally, I would think it would be incredibly more efficient to use the first method. If you think about what that means for the tile array in a map (think of a large map with 2000 by 2000 tiles, let's say), each Tile object would only have to contain 2 integers, for the X and Y positions of the source rectangle in the one large texture - 8 bytes. If you use method #2, however, each Tile object in the tile array of the map would have to store a 32by32 Texture - an image - which has to allocate memory for the R G B A pixels 32 by 32 times - is that 4096 bytes per tile then? So, which method and why? First priority is speed, then memory-load, then efficiency or whatever you experts believe.

    Read the article

  • Help With Prolog Lists

    - by BeginnerPro
    Hi, Im new to Prolog and was looking for some assistance. What i am trying to do is basically get the some of the list of list, if that makes sense? lol What i am trying to achieve is.... sum([ [1,2],[3,4],[5,6] ]). should return: Number Of Lists: 3 List 1 3 List 2 7 List 3 11....etc I can get the Number of Lists which is fairly simple but im not quite sure how to loop through the List and then for each List add the number up. Am i making this more complicated than it actually is? lol! If anyone can help me or point me in the general direction that would be great. Thanks in advance

    Read the article

  • Is there a better way to do SELECT queries in MySQL and sort them in PHP than this way?

    - by Kent
    I am just learning PHP/MySQL, one this I am having to do a lot is displaying data that was previously inserted into the database out to the user's browser. So I am doing this: $select = mysql_query('SELECT * FROM pages'); while ($return = mysql_fetch_assoc($select)) { $title = $return['title']; $author = $return['author']; $content = $return['content']; } then I can use these variables through out the page. Now, doing it the above way isn't an issue when I only have 3 columns in a database but what if I am dealing with a huge database with many more columns. I have a nagging feeling that the pros do it in some more efficient way where they maybe loop through the table they are selecting from to find all columns it has and associate them with variables automatically. Is that the case? or is the above how you guys do it too?

    Read the article

  • Converting UnicodeString to PAnsiChar in Delphi XE

    - by moodforaday
    In Delphi XE I am using the BASS audio library, which contains this function: function BASS_StreamCreateURL(url: PAnsiChar; offset: DWORD; flags: DWORD; proc: DOWNLOADPROC; user: Pointer):HSTREAM; stdcall; external bassdll; The 'url' parameter is of type PAnsiChar, so in my code I do a cast: FStreamHandle := BASS_StreamCreateURL(PAnsiChar( url ) [...] The compiler emits a warning on this line: "suspicious typecast of string to PAnsiChar". In trying to eliminate the warning, I found that the recommended way is to use a double cast: FStreamHandle := BASS_StreamCreateURL(PAnsiChar( AnsiString( url )) [...] This does eliminate the warning, but the BASS function now returns error code 2 ("cannot open file"), which tells me the URL string it receives is somehow broken. I cannot see what the bass DLL actually receives, but using a breakpoint in the debugger the string looks good: var s : PAnsiChar; begin s := PAnsiChar( AnsiString( url )); At this point string s appears fine, but the BASS function fails when I pass it. My initial code: PAnsiChar( url ) works well with BASS, but emits a warning. So what's the correct way of getting from UnicodeString to PAnsiChar without a warning?

    Read the article

  • Pattern Brushes in WPF

    - by daub815
    I am struggling with creating various brushes to fill in various shapes or as a background. Here are some patterns I am struggling with creating: <<<< <|<|<|<|||| //////// \\\\ |||||||| I've been able to create the \\\, //////, and |||||| with a linear gradient, but the first two are causing me issues. BTW, the second one is a triangle. Any suggestions or help would be greatly appreciated.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >