Jump to content

  • Log In with Google      Sign In   
  • Create Account


Trapper Zoid

Member Since 20 May 2005
Offline Last Active Oct 08 2013 10:18 PM
-----

Topics I've Started

Expected maximum texture size

07 August 2013 - 05:48 PM

What would be a sensible maximum texture size to expect on today's hardware, factoring in the whole range of graphics cards, integrated graphics and legacy systems that could be realistically be expected to be still in use?

 

I am playing around with some 2D prototypes and am currently making tile sheets to load into an OpenGL texture. I would like to be able to load as much as possible into a single texture, which currently isn't going to be a problem, however it would be nice to know for the future what I should peg as a limit for the maximum size for a tile sheet so I can plan the scope of the available tiles accordingly.


General vibe of using SDL 1.3?

30 October 2011 - 12:11 AM

What's the current status of using SDL 1.3 for 2D game development, compared to the mature SDL 1.2 or alternative libraries like SFML? It still seems to be in beta, but how quirky does "beta" mean in the case of SDL 1.3?

I'm getting back into some C style game development like I was several years ago and I'm checking out the current state of game libraries. Back then I was using SDL 1.2 so the natural choice is SDL 1.3 - the zlib licensing removes my biggest gripe about the old library. But in my preliminary hunt for resources I'm not getting the same vibe from SDL as I was back when I started. SDL 1.3 is still in beta and appears to be a footnote on its own webpage, sort of like how it was in 2009. I'm still leaning towards trialling SDL due to my history of working with it and to ease my de-rustifying my game programming, but I'd like to get a general feel of any general potential pitfalls I'm getting in to by blindly going with the new version.

Architecture for multithreading

09 December 2009 - 01:13 PM

I'm working on a few quick game projects, and I'd like to use this opportunity to experiment with some new architecture approaches. With my projects being generally quite small, I've previously never had a need to look into multithreading, but with multiple cores being ubiquitous these days it feels like a large gap in my knowledge. I'd like to steer my development direction towards writing multiple-thread, multiple-core friendly code and I've read up on the basic nuts and bolts (starting threads, mutexes etc.); I'm just a bit lost as to the steps I should go in to plan the high-level architecture to be multithread friendly. My current single-threaded approach to a game system would be to create a kernel acting as the main game loop, where the main tasks that need to run every loop get registered and called every cycle. I'd have tasks for world update, rendering, input polling, updating the timers and so on, registered to the kernel and somewhat independent from each other, although they do tend to share some information through what are effectively global data structure (such as things like the latest time update delta). They also tend to share some code elements such as the logging system. From what I gather an easy way to multithread this would be to split the tasks into some large threads, for example:
  • A main thread for gameplay elements
  • A render thread
  • Maybe a resource management thread for files, textures, memory etc.
  • And technically maybe threads for some smaller subsystems like audio, which the libraries I use most likely handle invisibly to me
This way there are only two large threads, the gameplay one and the render one, which can communicate through a shared data block of renderable elements, which the gameplay thread writes to and the renderer reads, which I can keep a close eye on to avoid thread issues. This seems pretty straightforward to do, but it doesn't sound very scalable to more advanced threading systems and it doesn't solve issues like a shared logging system I'm guessing my stumbling point is understanding the best ways threads in a game system can safely communicate with each other, and what that means for how to structure the tasks in a game system into an architecture that makes sense with those limitations. I'd be grateful if someone could explain at a high-level how they'd personally go about structuring a multithread friendly system and the interfaces they'd use between threads. Maybe with a bit of discussion that the nature of the problem will "click" with me. Thanks.

Storing extra info with allocated memory in C?

12 August 2009 - 02:20 PM

I've got a quick question about monitoring memory use in C, before I go hog-wild with my own solutions. I've written wrappers for memory allocation and deallocation in my code, with the same interface as for the standard C library:
void *dgl_malloc(size_t size);
void dgl_free(void *pointer);
(DGL is the prefix I'm using for my code. I'm not using calloc, so I skipped it) These are just wrappers for the standard library functions at the moment. I'm more interested in logging memory use than writing my own allocators. The problem is that there's not a lot I can do with those void pointers. Say for example I want to keep tabs on the amount of memory my functions have allocated. I can increment a counter in dgl_malloc based on the size requested. But when it comes time to release the memory there's no info in that pointer provided to dgl_free to decrement it. I don't think I can do crazy things with structures, such as making something like:
typedef struct {
void *memPointer;
unsigned long size;
} memStructure;
then creating one of these in dgl_malloc, returning memPointer, then back-casting to memStructure in dgl_free. If I allocate the pointer to another variable, then the extra info is lost. Is there a simple solution to this that I'm overlooking, or do I have to do hacky? (Note I'm using C, not C++, so C++ only functionality can't be used)

Freeplay 2009 in Melbourne - anyone attending?

07 August 2009 - 01:43 PM

Freeplay 2009 is on in Melbourne next week, Friday and Saturday Aug. 14 - 15 at the State Library. Anyone else from GameDev.net planning to attend? This is the first Freeplay I'll have attended and I've never been to one of the games festival things before, so I'm not sure what to expect. At a bare minimum I'm hoping for a general air of enthusiasm to help me get generally inspired to make good games; any other pointers or networking is a bonus.

PARTNERS