|
I've always used timeGetTime, and whatever caveats that entails. You need to use timeBeginPeriod to raise its precision though.
|
# ? May 26, 2008 05:38 |
|
|
# ? May 13, 2024 07:45 |
|
ehnus posted:You just never know, sometimes it just slips peoples minds when it comes to calling expensive functions, sometimes people just don't know the cost of functions. There is an alternative in __rdtsc() as it's really fast but unfortunately it's not reliable on multiple core machines so it can be ruled out for most cases. Not reliable on singlecore laptops either, from what I hear It's just sort of bad in general.
|
# ? May 26, 2008 15:31 |
|
Chris Awful posted:I'm working on a 2D isometric map in Python using Pygame. Creating a map at 640x480 with 32x32 tiles which comes out to 300 map tiles for just the first Z axis. However, I need 16 Z axises. So that is 4800 tiles which each contain an image. With such a giant list(array), FPS is sluggish.
|
# ? May 26, 2008 17:31 |
|
ZorbaTHut posted:Not reliable on singlecore laptops either, from what I hear It's just sort of bad in general. It's reliable, you just don't read the clock frequency at program startup and never check it again . The problem with rdtsc is when multiple core processors enter power save mode and their internal counters skew -- if you read the timebase on one core and the thread migrates before you can read it again you may see your computer going back in time.
|
# ? May 26, 2008 17:33 |
|
GringoGrande posted:It's overkill to store the image in each individual cell. Load all the images into a list and then create method for the cell objects to return the image data that should be blitted. Thanks. Increased frame rate and the program startup is faster. Also, I noticed that scrolling pixel for pixel was taking 150k cycles. Knocked that down to 38k cycles by scrolling each 4 pixels. Chris Awful fucked around with this message at 20:21 on May 26, 2008 |
# ? May 26, 2008 20:11 |
|
Chris Awful posted:Thanks. Increased frame rate and the program startup is faster. Also, I noticed that scrolling pixel for pixel was taking 150k cycles. Knocked that down to 38k cycles by scrolling each 4 pixels. If you want to speed up the game even more, you should only draw the map when the state has changed somehow, and then you could even try and narrow it down so you only redraw the affected tiles.
|
# ? May 26, 2008 20:35 |
|
I've been working on this Flash game in my free time and I'd like to get some feedback about just about anything. I've made some big changes lately so I wanna see how people feel about them. Most of the levels look crude because I just whipped them up in a day to try a new kind of gameplay style. http://hatu.biz/whifBeta/ Try out the powers too, most people seem to forget them. I personally like 1 the best
|
# ? May 26, 2008 20:39 |
|
OneEightHundred posted:FBX and COLLADA both contain a shitload of information, I'm really not sure what more you'd want out of them. The whole Maya/Max interchange thing has come up very recently on another project as well, and neither FBX nor COLLADA manage to preserve the materials properly between packages.
|
# ? May 27, 2008 10:13 |
|
American Psychonauts posted:I've been working on this Flash game in my free time and I'd like to get some feedback about just about anything. I've made some big changes lately so I wanna see how people feel about them. Looks like a good start! Did you mean to leave the mega ball (debug) in? Because, that thing rules This is mindlessly fun :p but I ran out of levels I also had -468/200 HP? Luminous fucked around with this message at 17:53 on May 27, 2008 |
# ? May 27, 2008 17:49 |
|
Paradoxish posted:Edit- Just realized that I completely missed part of your question. Your delta is your frametime, which is the inverse of your framerate. Taking your average framerate is easy and something you can do trivially in your update function: My delta is always higher than interval. Delta is usually something like 1.6761907e-006, so it's never even entering the inside of the if statement. Any thoughts on what I'm doing wrong?
|
# ? May 29, 2008 03:48 |
|
I'm looking into implementing a templated fixed point class in C++, but before I go reinventing the wheel, does anybody know of an existing one available for download? Most of the ones I've come across don't really cut it.
|
# ? May 29, 2008 13:29 |
|
SkankerX posted:I'm looking into implementing a templated fixed point class in C++, but before I go reinventing the wheel, does anybody know of an existing one available for download? Most of the ones I've come across don't really cut it. I don't, but I'm curious as you what you want to use it for. The consensus I had always heard was that fixed point calculations were pretty much un-necessary after the Pentium, due to the relative speed- and accessibility of floating point co-processors. I suppose it might be useful for data packing?
|
# ? May 29, 2008 15:54 |
|
Nuke Mexico posted:I don't, but I'm curious as you what you want to use it for. The consensus I had always heard was that fixed point calculations were pretty much un-necessary after the Pentium, due to the relative speed- and accessibility of floating point co-processors. I suppose it might be useful for data packing? Fixed point is still necessary for most portables, including the iPhone (for OpenGL ES) and for the DS (for everything). Having a nice, type safe fixed point class which overloads the standard mathematical operators would go a long way in keeping other dependent code platform agnostic (typedef real numbers as float or fixed, depending).
|
# ? May 29, 2008 16:04 |
|
SkankerX posted:I'm looking into implementing a templated fixed point class in C++, but before I go reinventing the wheel, does anybody know of an existing one available for download? Most of the ones I've come across don't really cut it. There is a C extension for fixed-point math that some compilers support which you can use unless you really just want a template version. I have a template library for fixed-point math partially implemented but I don't have it up anywhere and I doubt I will finish it anytime soon. Nuke Mexico posted:I don't, but I'm curious as you what you want to use it for. The consensus I had always heard was that fixed point calculations were pretty much un-necessary after the Pentium, due to the relative speed- and accessibility of floating point co-processors. I suppose it might be useful for data packing? As was pointed out, floating point is not always available, but aside from that, sometimes you just genuinely want a fixed granularity between your values as opposed to a scientific notation form of storage. I.E. A fixed-point decimal representation taken to 2 decimal places is often perfect for representing a value of some quantity in dollars. For these types of data, a floating point representation, decimal or not, is generally just asking for trouble.
|
# ? May 29, 2008 17:39 |
|
SkankerX posted:Fixed point is still necessary for most portables, including the iPhone (for OpenGL ES) and for the DS (for everything). Having a nice, type safe fixed point class which overloads the standard mathematical operators would go a long way in keeping other dependent code platform agnostic (typedef real numbers as float or fixed, depending). ahh, that completely makes sense
|
# ? May 29, 2008 17:55 |
|
That Turkey Story posted:There is a C extension for fixed-point math that some compilers support which you can use unless you really just want a template version. I have a template library for fixed-point math partially implemented but I don't have it up anywhere and I doubt I will finish it anytime soon. If you're willing to share, I'd appreciate it. If I add anything to it I'll contribute it back upstream.
|
# ? May 29, 2008 18:15 |
Okay, static lighting is working like a champ. I'm going to push dynamic lighting to see if I can't come up with anything. First question: I'm thinking about placing the shadow-casting objects in a quadtree, but I'm not sure at what object count the speed benefits will be apparent. My other alternative is to build a list of shadow casters and discard all objects outside the light Second question: What kind of overhead does building a render list entail? I'd like to build one every time a dynamic light is moved so performance will be snappy when they're still. Is this a silly thing to do?
|
|
# ? Jun 1, 2008 03:55 |
|
Jo posted:If I use an early out algorithm for detection, can I expect a significant performance improvement in a map with 60-70 shadow casters? quote:My other alternative is to build a list of shadow casters and discard all objects outside the light quote:Second question:
|
# ? Jun 2, 2008 08:00 |
|
Jo posted:First question: It really depends all on how balanced your pipeline is and where your bottlenecks are. For my money, I'd say an oct-/quad-/bin-tree is a great solution to this. For my money, what you ACTUALLY want to do is to keep TWO spatial hierarchies -- one has all the dynamic lights in it, one has all the dynamic objects in it. When one moves, it intersects it's "bounds" (size of the objects, distance-to-90% attenuation or something for the lights) with the tree for the other class of object, triggering any updates as needed.
|
# ? Jun 2, 2008 11:39 |
|
Havok announced a few months ago that they would be releasing the core library for Havok to the public, looks like they finally got around to it: http://www.havok.com/tryhavok quote:The No-Charge Havok PC download is a binary-only bundle that includes all of the standard features and functionality of both the Havok™ Physics and Havok™ Animation products. The download includes Havok SDK libraries, samples, and technical documentation for software developers; as well as Havok's Content Tools for preparation and export of physical assets and characters directly from recent versions of popular 3D modeling and animation tools. Looks like they are being friendly to cheapo game developers too: quote:If you plan to sell your commercial PC Game above a retail value of $10 USD, (or equivalent amount in other currencies based on prevailing exchange rates at the time of launch), you must first request a no-charge PC Game distribution license from Havok at https://www.havok.com/PCgamedistribution, prior to retail release of your game. This PC Game distribution agreement is required to ensure you have complied with Havok logo, copyright, and attribution requirements, and that your application is a PC game (commercial non-game application distribution is not allowed). There will be no fee associated with this because the license fee has been covered by Intel under a commercial agreement with Havok. SDK download is ~230MB.
|
# ? Jun 3, 2008 04:27 |
|
gibbed posted:Havok announced a few months ago that they would be releasing the core library for Havok to the public, looks like they finally got around to it: Excellent I have been waiting for this. Now I wonder wether I should try Havok or PhysX first. Can anyone compare the two?
|
# ? Jun 3, 2008 09:48 |
|
heeen posted:Excellent I have been waiting for this. Now I wonder wether I should try Havok or PhysX first. Can anyone compare the two? PhysX was bought by Nvidia. They also promise GPU support in the near future. The free version of havok doesn't have all GPU enabled stuff. On the other hand havok's animation tool set is top notch. So I guess it depends on what you need from the physics engine.
|
# ? Jun 3, 2008 10:35 |
|
Which one is better development wise? Eg. easier to start with? Do either of them have xna/c# bindings?
|
# ? Jun 3, 2008 16:14 |
|
Gary the Llama posted:My delta is always higher than interval. Ack, I've been kind of busy for the last week so I totally forgot about this thread. If you're still having problems would you mind posting the full code you're using? You're multiplying the time delta from querying the performance counter by the frequency of the counter, right? Otherwise you'll just end up with the difference in ticks, which is going to be significantly larger than the difference in seconds. This is the exact code I'm using for my game dev competition entry in games. I didn't want to copy this directly before because there's extra crap in there that gets in the way of the timing code, but I figured it might be useful if you're having issues: code:
Paradoxish fucked around with this message at 16:24 on Jun 3, 2008 |
# ? Jun 3, 2008 16:19 |
|
vanjalolz posted:Which one is better development wise? Eg. easier to start with? I think physx has XNA bindings. Havok isn't really that well supported by the amateur community yet. But if you need an animation system for your game then Havok is probably a good choice. I would say neither of the engines is overly difficult, though they both have their own quirks.
|
# ? Jun 3, 2008 18:13 |
|
It may be worth mentioning that there are stability issues with QueryPerformanceCounter on certain hardware. For my own projects, I use something similar to the example in the following article to check for leaps or negative elapsed time. http://support.microsoft.com/default.aspx?scid=kb;EN-US;q274323
|
# ? Jun 3, 2008 18:23 |
|
What would you guys recommend for getting into games development (to enter the game dev competitions for example). I'm not new to programming, I know Java and PHP well and have a working knowledge of Ruby (for use with Rails mostly) however I've done very little game development in the past. Really I'm looking for an engine which will cover lots of the stuff for me while letting me be creative. I've looked at blitzmax but can't find any decent information on how to get started. Also I'm on OSX so can't use anything Windows only such as that XNA.
|
# ? Jun 4, 2008 11:32 |
|
DBFT posted:What would you guys recommend for getting into games development (to enter the game dev competitions for example). I always consider writing a Tetris clone to be the "Hello World" of a new game system (graphics library/framework, language, etc). Depending on what you're doing, I'd suggest either SDL+OpenGL or Ogre3D. If you're starting with a simple game, then do the SDL+OpenGL route because Ogre3D would be a bit of Overkill
|
# ? Jun 4, 2008 13:28 |
|
Nuke Mexico posted:I always consider writing a Tetris clone to be the "Hello World" of a new game system (graphics library/framework, language, etc). I'll vouch for passing over Ogre3D as your first try. I tried diving head first into that with a solid knowledge of C++ and it ended up being way too much for a beginner.
|
# ? Jun 4, 2008 15:02 |
|
Fair enough. I Guess I'll go with SDL+OpenGL. I have some knowledge of C so I guess I'll use C and try to fill in the blanks in my knowledge as I go. Does anyone have any recommendations for tutorials/books for beginning with SDL+OpenGL?
|
# ? Jun 4, 2008 16:45 |
|
ValhallaSmith posted:I think physx has XNA bindings. Havok isn't really that well supported by the amateur community yet. But if you need an animation system for your game then Havok is probably a good choice. I would say neither of the engines is overly difficult, though they both have their own quirks. Havok rules
|
# ? Jun 4, 2008 17:05 |
|
DBFT posted:I have some knowledge of C so I guess I'll use C and try to fill in the blanks in my knowledge as I go. Does anyone have any recommendations for tutorials/books for beginning with SDL+OpenGL? I havent worked with SDL, but as far as OGL goes, you cant go wrong with The Red Book. That, plus the tutorials by NeHe on Gamedev should set you well on your way.
|
# ? Jun 4, 2008 19:06 |
|
DBFT posted:Fair enough. I Guess I'll go with SDL+OpenGL. NeHe's for scrubs.. Nate Robins is where it's at http://www.xmission.com/~nate/tutors.html
|
# ? Jun 5, 2008 01:32 |
|
Paradoxish posted:Ack, I've been kind of busy for the last week so I totally forgot about this thread. If you're still having problems would you mind posting the full code you're using? You're multiplying the time delta from querying the performance counter by the frequency of the counter, right? Otherwise you'll just end up with the difference in ticks, which is going to be significantly larger than the difference in seconds. My code is pretty much exactly that. Mind showing me your updateScene() function?
|
# ? Jun 6, 2008 01:14 |
|
more falafel please posted:Havok rules Elaborate!! Nuke Mexico posted:NeHe's for scrubs.. Nate Robins is where it's at http://www.xmission.com/~nate/tutors.html I hear that NeHe is bad, but there is a LOT more stuff on there than Nate's website.
|
# ? Jun 6, 2008 11:41 |
|
vanjalolz posted:Elaborate!! Yeah, but honestly your average Tutorial on GameDev.net is probably about as good anyways
|
# ? Jun 6, 2008 15:07 |
|
I am trying to display data in the BLP Format on screen in a Managed DirectX application coded in C#. If you've no idea what BLP is that's fine, because the gist is that I have a chunk of image data compressed as DXT1 stored in a stream. What I want to do is draw that image onto the screen. I've spent the evening reading and searching half the internet for more information, but I can't for the life of me figure out how to turn that DXT1 data into a Texture. Does DirectX support the format natively somehow or am I going to have to write my own function to decompress the data into a Bitmap? I've got very limited experience working with DirectX or real time rendering in general, so I've no idea where to even start looking for more information. I've tried creating a new texture using the following constructor: code:
Another constructor accepts a Stream of data as an argument, but attempting to use this method generates a "Parameter is not valid." error, presumably because the Stream is not a bitmap. So, yeah, I'm confused and not sure what to try next Crash Bandicoot fucked around with this message at 22:50 on Jun 8, 2008 |
# ? Jun 8, 2008 22:29 |
|
Crash Bandicoot posted:Unfortunately once the Texture is instantiated I am not sure how to pass it the actual image data. EDIT -- In MD3D they're called LockRectangle and UnlockRectangle respectively. Apparently the MSDN pages for them are broken and the only documentation for them are in Japanese, so good luck. http://msdn.microsoft.com/en-us/library/bb152978(VS.85).aspx OneEightHundred fucked around with this message at 23:20 on Jun 8, 2008 |
# ? Jun 8, 2008 23:15 |
|
How would you get around having opengl textures that are not 64, 128, or 256 pixels in width/height?
|
# ? Jun 10, 2008 20:13 |
|
|
# ? May 13, 2024 07:45 |
|
dsage posted:How would you get around having opengl textures that are not 64, 128, or 256 pixels in width/height? Otherwise, round up and waste the extra space (or find a creative use for it.)
|
# ? Jun 10, 2008 20:50 |