Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 27 Aug 2002
Offline Last Active Today, 04:10 AM

#5244442 What does mapping mean?

Posted by MaxDZ8 on 04 August 2015 - 12:20 AM

Just in case the questions are serious, I am against this type of explanation as the metaphor used is possibly more complicated than what really happens, which I consider a bad habit (in particular, geologic activity is one of the most complicated phenomena in the world).

Besides, as a non-native English user, I had some difficulty putting the things together and even re-reading it, some concepts appear to clash such as the use of the word layout with cartographic quality but in practice we're just talking about a blob of memory with a size.


It is not obvious in my opinion Andy is referring to layout of the virtual memory address space, in this specific context I consider this prone to misunderstanding.


I also argue that a buffer is never re-arranged as it is in itself a blob of linear memory. It might map to a different pointer (virtual memory address) but its layout does not change in the sense that buffer[i] will always go to the same element of the buffer as long as buffer holds the correct base value, which is always the result of the Map call. I understand this might be a subtle nuance of English interpretation.


I also argue there's no point in ELI5'ing this. There's no need to pull in extraneous concepts. Anyone not understanding mapping does not need a metaphor; they need to re-read the documentation and check their basics.

#5244253 C++ Operator Overloading: Bitwise Operators & If-Check

Posted by MaxDZ8 on 03 August 2015 - 03:18 AM

Maybe I missed the objections but... why do you have to use flags and masks? Unless I have a lower-level component requiring it, I'd stay away from them.

#5244252 What does mapping mean?

Posted by MaxDZ8 on 03 August 2015 - 03:09 AM

I suggest to discard/ignore the above post.


It's very simple. Your VB is a blob of memory. Most of the time, it resides on VRAM (but it does not have to). The GPU is working with it; you don't touch it. You have an handle to it, but not to its memory.


Mapping a buffer means you get a pointer to something that is (not quite) the buffer memory. Stuff you write there will go to the real buffer; depending on flags you can get its contents.


Mapping a buffer does not give you any information of how the data is stored, you don't know layout, you don't know type.


Most of the time, you map a buffer to write to it. Your modifications are not guaranteed to happen until you unmap the buffer.


The relevant function calls are ID3D10Buffer::Map and  ID3D10Buffer::Unmap, note there are map/unmap calls for other resource types as well.

#5242912 To use mana or not? (that is the question)

Posted by MaxDZ8 on 27 July 2015 - 01:39 AM

Working without mana is viable.

Oldschool pen-and-pencil RPGs had you select your spells every RPG-day. You're given 'slots', you allocate them, you consume them, you're done.

More recently, you were allowed to select them on the fly.

I'm not up do date with the most recent advancements. Nonetheless, requiring to go back to town seems an immensely slow mechanic. Unless magic is extremely powerful OR you give many more slots OR you want to nerf magic on purpose, that seems to reduce casting effectiveness quite a lot.

#5242910 steam hardware survey

Posted by MaxDZ8 on 27 July 2015 - 01:32 AM

As a side note Norman, you might be interested in comparing installed base to unity.

Note for the time being Steam reports the most common video card is NV GTX 970 (3.54%), while 750 is less common (2.56%). Considering the 970 can easily be 300 bucks I'm inclined to assert steam samples mostly core gamers demographics (which is known to to). It could be debated whatever this is the best for you.

#5238572 Text adventure design in C

Posted by MaxDZ8 on 06 July 2015 - 02:33 AM

Holy shit.

There's so much wrong in this thread I can hardly believe.


Do not hardcode locations/rooms in code.

Do not produce structs by using C code.


Lenny, seriously, I sympathize with the structure you proposed, but you should really have spared us from demonstrating the terrible practice of mixing code with assets. Have phun managing the numeric index for 'touch' information.

True solution: data driven architecture. Here's a JSON to populate areas (not the same thing, as I couldn't be bothered in keeping track of the indices), then you only have to parse it and get your structures out.

    "locations": {
        "beach" : {
            "desc": "A sandy beach covered in shells.",
            "near": [ [ "north", "forest" ] ]
        "forest" : {
            "desc": "A dark and spooky forest.",
            "near": [ [ "south", "beach" ], [ "east", "hill" ] ],
            "items": [ "temple_key" ]
        "hill" : {
            "desc": "A windswept hilltop covered in tussock.",
            "near": [ [ "west", "forest" ], [ "north", "mountain" ] ],
            "items": [ "tin_can", "rotting_adventurer_corpse" ]
        "mountain" : {
            "desc": "A tall lonely mountain.",
            "near": [ [ "south", "hill" ] ]

Bonus: here's how it looks in notepad++ json viewer.

Left as an exercise: HTML5+CSS landscape editor!

Attached Thumbnails

  • 103246-GameDev.net Community Forums.png

#5237995 Best approach for long computations, threading or timeslicing?

Posted by MaxDZ8 on 02 July 2015 - 08:07 AM

In this day and age, I would suggest to just make them async. Be careful of dispatching new work faster than they get processed.

In theory I would suggest std::future but it is my understanding it has no "is result ready" call so I'm afraid you will have to go with std::thread.


Now, you should carefully approach threading but you don't have to be scared by them. In a certain sense, they don't introduce really new concepts in terms of data safety. Just try to figure out a minimal data set they need to work on and the minimal "interface".


EDIT: SeanMiddletech reported below that it is possible to obtain a "is result ready call" by having a sleep-by-0-seconds call. I consider it a bit quirky but it sure will do. Go upvote that post.


EDIT: I have noticed WFP reply is more recent. Whoops. Go upvote that as well. Note: use the quote button, it gives notifications to the quoted person.

#5236704 The Story of a Roman Slave - 2D RPG set in an alternate history Britannia

Posted by MaxDZ8 on 25 June 2015 - 04:06 AM

Ah yeah pretty sure that was it. Other precursors appear to be "fallen london" and something related an "echo bazar". I don't remember much. Maybe worth checking mostly to make sure you strive away from it. Or at least don't look too much like them.

#5236689 The Story of a Roman Slave - 2D RPG set in an alternate history Britannia

Posted by MaxDZ8 on 25 June 2015 - 01:38 AM

I think the starting idea has a lot of potential. The historic background seems sound and you're basically "augmenting" the true tech advancements.


It made me think of a game... but I don't remember the name really. Those are currently two games in the same universe. The last one is about a ship exploring an unknown underground sea. I don't remember much but I think the setting was similar. Was it similar?

#5236684 What performance will AMD's HBM bring for graphics programmers?

Posted by MaxDZ8 on 25 June 2015 - 01:22 AM

On the topic of whether HBM is a huge game-changer -- Not yet, at least not for end-users, because today's HBM1 bandwidth isn't all that much larger than the bus on the 390x (512GB/s vs 320Gb/s)...

... is merely top-end, thus having little to no market share.


Corrected that for you. Perhaps this is irrelevant to you AAA guys but really most cards are sold at 150 bucks; my card has 75 GiB/s, a two-chip binned HBM would bring close to 200.

#5235519 What performance will AMD's HBM bring for graphics programmers?

Posted by MaxDZ8 on 18 June 2015 - 10:16 AM

This does not belong to this forum.


The thing is simple: you already get +75% bandwidth so you can get up to 75% more perf as long as you are bandwidth-limited and fit the memory budget.

It seems there's also an improvement in latency.


It might be a game-changer for manufacturing but it really isn't much from programming point of view. It's "just" faster memory. Except it's way faster. And as a flagship, it's fairly affordable.

#5234932 Game Development Help Please (language choice)

Posted by MaxDZ8 on 15 June 2015 - 12:10 PM

But for some insane reason they built the game you linked to in flash - very odd considering you can do all that with js, css and html no probs.
No problems now, but a quick search suggests the game was originally launched in June 2011. HTML5 was far from being stable at the time, not to mention the state of JavaScript engines. We could discuss whatever it's stable now. Their decision was appropriate at the time considering they've been churning profits for years. I've seen this game being advertised on mass media!

#5234836 trying to make GPU physics deterministic

Posted by MaxDZ8 on 15 June 2015 - 12:51 AM


can you give an example plz, don't understand, are there other int operations that aren't deterministic?

Last time I tried stuff like 2147483000u * 10u I got garbage instead of the expected 4294960816u. Can't remember the exact operation. I think it may have been bitshifts instead of multiplications.


Is there any chance this could have been a driver/compiler issue? On the OpenCL compiler I've seen it forgetting about data hazards. It eventually got fixed.

#5234835 Game Development Help Please (language choice)

Posted by MaxDZ8 on 15 June 2015 - 12:44 AM

For stuff running in browsers you have Javascript and Javascript. HTML5, some CSS...

But if you have no idea what you're doing, perhaps you should stick to some engine such as the above mentioned Game Maker. Try to hack something with Unreal Blueprints, something along those lines.

#5234419 Need advice on GameObject handling.

Posted by MaxDZ8 on 12 June 2015 - 03:46 AM

Neither. In C++ terms, I'd suggest an std::vector<std::unique_ptr<GameObject>>. You cannot go wrong with persistent stuff.

What GameObject really is depends on what it does. To check for clicks, you just need a click area, for animations you need another interface, you can work on inheriting interfaces or by composition.


At the level of abstraction you're talking now there's no point in writing much. Maybe you have your needs clear in mind; I sure don't.