TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Page 14 of 100 FirstFirst ... 4910111213141516171819242934394449545964 ... LastLast
Results 326 to 350 of 2490

Thread: What are you making?

  1. #326
    Member
    Registered: Apr 2002
    Location: Third grave from left.
    Quote Originally Posted by Al_B View Post
    I think the first warning is simply because the compiler is making sure that you didn't mean to write something like "int32u(-2) + 16 >> 4" when you used two constants together.
    Hm, writing "int32u((-2 + 16))" also fixes it - i think you are right. VC likes (thankfully actually) to warn about stuff near << and >> as their precedence is a bit peculiar (not seeing it as justified in this particular instance tho).

    Quote Originally Posted by Al_B View Post
    I assume you're using preprocessor defines for the -2 and 16 magic values as otherwise it would be unusual to hard code them in the line like that.
    The magic values are not magic in their context and are written the way they are to be clear about the intent and meaning of it (there are many lines similar to it and all use the same form).

    Quote Originally Posted by Al_B View Post
    In either case, the compiler appears to generate the correct code so it's more informational than anything else.
    Yeah, assumed as much (it is just a warning - the is no actual ambiguity) - just never seen it warn about this kind of code.

    Quote Originally Posted by Al_B View Post
    For the const problem - do you want the cellDataZ variable itself to be constant? If so, I think you want "int32u ** const cellDataZ = ..." - i.e. with the const just before the variable name? Otherwise you'll need to declare cellData itself as const to work in the manner as you've originally written it.
    I have a habit of using "const" quite aggressively - at that time i was adding const for all the stuff referencing the int32u data itself. The correct constness for the stuff is (which i actually use. the previous code was the mysterious wtf i got while in progress of fixing the constness):

    int32u const *cellData[9][3];
    int32u const * const * cellDataZ;
    // PS. i always use "type const" instead of "const type" for consistency (the "const type" exception is only usable with the "type" part and nowhere else).

    However, i still do not get why it failed with the code presented originally. Still a mystery :/

    ----------------------
    Yay, progress:


    Pretty darn fast tesselation (*) of 16x16x16 chunked map. Smoothed plain and simple cubes (ie. not generated using marching cubes alg). Vertices are shared (using "glDrawRangeElementsBaseVertex" for drawing). Full adjacency information for normal generation (chunk borders inclusive - something i forgot to take into account the first time around) - currently not generating the normals tho.

    (*) Avg. 120 ticks per voxel for the given map - expecting that to triple-quadruple when i am finished with it.

    edit: Ah, forgot to mention, there are 2 lines per voxel per axis on the pic - just to give an idea how big the voxels are.
    Last edited by zombe; 29th Dec 2011 at 19:56.

  2. #327
    Administrator
    Registered: Oct 2000
    Location: Athens of the North
    Quote Originally Posted by zombe View Post
    I have a habit of using "const" quite aggressively - at that time i was adding const for all the stuff referencing the int32u data itself.
    I'm not a huge fan of const although it obviously has its benefits. When you start dealing with double (or higher) level indirections it just seems a little easy to end up with issues like you came across.
    Quote Originally Posted by zombe View Post
    However, i still do not get why it failed with the code presented originally. Still a mystery :/
    With your original code you'd be able to assign a value to *cellDataZ which could be used to modify constant values. As a simple example - I'm sure you accept that this is invalid:
    Code:
    	int const MeaningOfLife = 42;		// Answer to the meaning of life - must never change
    	int *NonConstPtr = &MeaningOfLife;	// Not allowed because ... 
    	*NonConstPtr = 54;			// ... this could happen (oops)
    The equivalent with your code would allow the same thing to be done by a slightly longer route:
    Code:
    	int const MeaningOfLife = 42;		// Answer to the meaning of life - must never change
    	int *NonConstPtr;
    	const int **SomeConstPtr = &NonConstPtr;// Equivalent to your error - compiler will complain
    	*SomeConstPtr = &MeaningOfLife;		// Perfectly legal - NonConstPtr now points to MeaningOfLife
    	*NonConstPtr = 54;			// Also legal (Oops again)
    It's not likely you would write code that would do that - but as it's possible it is simply disallowed.

    Quote Originally Posted by zombe View Post
    Yay, progress:
    Pretty darn fast tesselation (*) of 16x16x16 chunked map.
    Looking interesting - will be good to see it when you've got some alternative textures on it (assuming you're not going for the psychedelic vibe!)

  3. #328
    Member
    Registered: Apr 2002
    Location: Third grave from left.
    Quote Originally Posted by Al_B View Post
    I'm not a huge fan of const although it obviously has its benefits. When you start dealing with double (or higher) level indirections it just seems a little easy to end up with issues like you came across.
    Const helps the compiler considerably (+ __restrict__ where needed) and sometimes prevent me from shooting my legs off. True, sometimes the compiler spots some pesky distinction i do not particularly care about, which is a bit annoying, but it happen very-very rarely.

    Quote Originally Posted by Al_B View Post
    As a simple example - I'm sure you accept that this is invalid:
    Yes. NonConstPtr is of type "int *" and at the right side is "int const *" => attempted breach of const contract.

    Quote Originally Posted by Al_B View Post
    int const MeaningOfLife = 42;
    int *NonConstPtr;
    const int **SomeConstPtr = &NonConstPtr;
    *SomeConstPtr = &MeaningOfLife;
    *NonConstPtr = 54;
    Yep - good example. Aliasing issue - and as compiler can not possibly detect such problems at compile time => it assumes the worst. Mystery solved.

    Quote Originally Posted by Al_B View Post
    Looking interesting - will be good to see it when you've got some alternative textures on it (assuming you're not going for the psychedelic vibe!)
    Hehe, psychedelic vibe is not the goal (1). Speaking of textures: that is just a shader - have not written any texture loading yet. Low priority (2). I am more worried with other stuff (3).

    (1) Used that for testing - easier to see how things are smoothed and sport problem cases. Speaking of which - having the whole resource system built with "hot-swap" capabilities (any external changes to any resource files will take effect immediately in game and problems reported in log [Using an xhtml/javasript logViewer that auto-updates / prettifies etc + auto-scrolling option {defaults to it whenever it detects a new logging session}]). Adjusting the shaders etc/without needing to restart nor manually reload them => is just totally made of WIN! Highly recommended.
    (2) Currently it just ignores block material and piles it all in default-material mesh assembly - fairly trivial to add other materials as the renderer already handles all the state sorting/combining (where needed) etc.
    (3) Considerable obstacles i want to ensure i can reasonably solve before i delve into easier issues:
    * Physics: should be relatively simple ... erm, physics never are. Quite optimistic with it tho (at the midpoint of tessellation i have the needed data in a form that is fairly compact and still in "physics" friendly state - ie, before it gets bastardized by mesh generation).
    * Lighting: i need 4 directional ambient lights ("ambient" as in minecraft which has 2 non-directional ambient lights) - updating thous will be painful and highly worrying.
    * World gen (currently just glm::gtx::noise::simplex(pos*scale) > 0.0f for testing): i do not want to use anything that uses floats as i need guarantees that given the exact same input i will get the same output. Floats simply cannot do that (One can set the FPU flags/state to some fixed state and prey [yeah, from personal experience, not fun figuring out who changed it] no-one else fiddles with it. Disable all FP optimization and force it to write out all intermediate values => x_x). I have some ideas tho ... will see.

  4. #329
    Administrator
    Registered: Oct 2000
    Location: Athens of the North
    Quote Originally Posted by zombe View Post
    Const helps the compiler considerably (+ __restrict__ where needed) and sometimes prevent me from shooting my legs off.
    It's a personal choice. It probably makes little (or no) difference to the compiler since there are many circumstances where it can't assume that the variable really is const. However, modern compilers are fantastic at optimising and will probably treat something as const even if a variable isn't declared that way. I totally agree they can be useful in catching human errors (mine included) but having to fire up my brain to work out what "int const ** const x" does and doesn't allow to be done with x is more likely to make me miss larger problems with code.

    Of course - all that is subject to profiling. If your code bottlenecks have benefited from const'ifying the variables then I'm certainly not going to argue against doing it!

    Quote Originally Posted by zombe View Post
    having the whole resource system built with "hot-swap" capabilities (any external changes to any resource files will take effect immediately in game and problems reported in log [Using an xhtml/javasript logViewer that auto-updates / prettifies etc + auto-scrolling option {defaults to it whenever it detects a new logging session}]). Adjusting the shaders etc/without needing to restart nor manually reload them => is just totally made of WIN! Highly recommended.
    Very nice indeed. I can see that saving you a lot of time in the long run and it sounds like you've got an ideal testbed for quickly knocking something up in future.

    Quote Originally Posted by zombe View Post
    i do not want to use anything that uses floats as i need guarantees that given the exact same input i will get the same output. Floats simply cannot do that
    Agreed - at least not in a guaranteed cross-platform way. Have you considered simply using fixed point for what you need? You'll obviously have to choose the scale of your precision but since you have a fixed world granularity it would appear at first glance to be a reasonable option.

  5. #330
    Member
    Registered: Oct 2007
    Location: Sydney, Australia
    Quote Originally Posted by zombe View Post
    Pretty darn fast tesselation (*) of 16x16x16 chunked map. Smoothed plain and simple cubes (ie. not generated using marching cubes alg). Vertices are shared (using "glDrawRangeElementsBaseVertex" for drawing).
    Very cool stuff. Forgive me if you've mentioned before, but where are you heading with it? I can imagine some very cool Descent-like 3D combat. Possibly even a sort of corridor-crawling Shattered Horizons.

  6. #331
    Member
    Registered: Apr 2002
    Location: Third grave from left.
    VC2010 does not accept: "void (*p)(void *) = [](void *) {};" => me is not a happy bunny
    Apparently have to wait till the next version of VC gets released for a fix. Unless the workaround is any good (have not yet dug into that).

    Hm, since i switched from VC2008 to VS2010 relatively recently, might share my impressions for thous who have not yet switched (my -10..10 point scale grade):
    * IDE is incredibly slow to start up. (-1p)
    * slowness from excessive HDD accesses (-2p)
    * "go to definition" and other searches are (most of the time) actually working (vs. just giving a few pages of random and completely unrelated garbage)!!! holy shit! (+7p)
    * intellisense - hell yeah, MAJOR time saver! (+11p)
    * intellisense causes the whole IDE to crash ever now and then. (-2p)
    * intellisense gets nuts every now and then - underlining everything with bogus errors. switching to some source file added in solution explorer for a moment does fix it luckily. (-1p)
    * bogus warnings one can not turn off in compilation script (script is per installation and not per project unfortunately) - had to edit it. (-1p)
    * quite a few C++0x stuff is implemented (+4p)
    My conclusion, with the benefit of hindsight => well worth the trouble porting the projects.

    Quote Originally Posted by Al_B View Post
    Agreed - at least not in a guaranteed cross-platform way. Have you considered simply using fixed point for what you need? You'll obviously have to choose the scale of your precision but since you have a fixed world granularity it would appear at first glance to be a reasonable option.
    Yep, considered that. Googled various implementations etc, but the complexity of divisions / multiplications is offputting Most divisions/multiplications one can simplify considerably (tried that with simplex noise - just to see how it goes with some real case math) - but not all. Not happy with it.

    Quote Originally Posted by Bakerman View Post
    Very cool stuff. Forgive me if you've mentioned before, but where are you heading with it? I can imagine some very cool Descent-like 3D combat. Possibly even a sort of corridor-crawling Shattered Horizons.
    That actually depends a bit on how some of the things work out. My calculator told me that the thing i originally wanted to do i just can not do with current hardware limits - so, it is a (HUGE) compromise, and hence i am not sure how it works out (ie. what MORE i have to drop and/or change). Do not quite want to jinks it yet ... will know better what path i have to go when i know the limits.
    Last edited by zombe; 31st Dec 2011 at 15:57.

  7. #332
    Administrator
    Registered: Oct 2000
    Location: Athens of the North
    Quote Originally Posted by zombe View Post
    VC2010 does not accept: "void (*p)(void *) = [](void *) {};" => me is not a happy bunny
    I don't think you can be too harsh on VC2010 for that one - C++11 is pretty new. Why not just give it an address of a placeholder non-lambda function if that's what you need?

    Quote Originally Posted by zombe
    Yep, considered that. Googled various implementations etc, but the complexity of divisions / multiplications is offputting
    In practice all you need to do is effectively a bit shift before or after a regular integer multiplication or division. You obviously want to do it in a way that preserves precision but there are examples online on how to do it. It won't necessarily be quicker than floating point but the repeatability of results will be better and I doubt it will be the bottleneck in what you're doing.

  8. #333
    Member
    Registered: Jan 2006
    Location: On the tip of your tongue.


    Gun Bastard cutscenes coming along nicely...

    Anyone have any ideas on how I can get some decent free music? Any composers hanging about, willing to work for free?

  9. #334
    Moderator
    Registered: Jan 2003
    Location: NeoTokyo
    Just surf YouTube for homemade stuff and when you hear something you like, message the person that made it and you'll probably get their permission, if they don't already have a disclaimer that you can use it with credit. I've gotten music this way and now it's hard to imagine an easier way.

  10. #335
    Member
    Registered: Jan 2006
    Location: On the tip of your tongue.
    Hmm, good idea. Thanks!

  11. #336
    Member
    Registered: Jun 2004
    Try the Newgrounds audio portal too

  12. #337
    Member
    Registered: Jan 2006
    Location: On the tip of your tongue.
    In the mean time, I slapped together a trailer:

    http://www.youtube.com/watch?v=1m2KdQaedPw

    Sorry about teh Fraps watermark...

  13. #338
    is Best Pony
    Registered: Nov 2002
    Location: The magical land of Equestria
    Quote Originally Posted by nicked View Post
    In the mean time, I slapped together a trailer:



    Sorry about teh Fraps watermark...
    There you go, brony.

  14. #339
    Member
    Registered: Jan 2006
    Location: On the tip of your tongue.
    cheers - couldn't work out how to embed it.

  15. #340
    Member
    Registered: Apr 2002
    Location: Third grave from left.
    Quote Originally Posted by Al_B View Post
    I don't think you can be too harsh on VC2010 for that one - C++11 is pretty new. Why not just give it an address of a placeholder non-lambda function if that's what you need?
    Using captureless lambda functions would be much more convenient and since i experimented earlier with capturing lambda functions - kind of expected captureless ones also to work (the "special" way). Just a bit disappointed, but as the link i posted revealed - VC2010 was pretty much already out of the door at the time that particular option was proposed/added. (Oh, another slight disappointment: "foreach" syntax is also not implemented yet as i found out.)

    Quote Originally Posted by Al_B View Post
    In practice all you need to do is effectively a bit shift before or after a regular integer multiplication or division. You obviously want to do it in a way that preserves precision but there are examples online on how to do it.
    Ok, seems my googling skills suck - did not find any examples doing that previously. Should indeed be reasonably fast - i keep it in mind.

    --------------------------------
    Have made some progress:

    ### Lost of cleanups / moving code around. Now using view from player entity and not just a freely floating cam.

    ### Automatic chunk gen / unload and tesselation updates with pretty good buffer management.
    * Buffer updates are now asynchronous (Mapping with UNSYNCHRONIZED bit + fenced mark and sweep garbage collection).
    * Works well when there is insufficient buffer space (Worst case scenario for all the chunks in visible range around player would take ~4-5GB memory - luckily, the scenario, while possible, is unrealistic. Current world fits completely into one 176MB buffer [1]).
    * Prioritizes chunks that are near player.
    * Generates physical representation also (16*16*16 lookup table for faces [quad] where every face has a link to the next one in same cell - makes it very easy to find the triangles relevant to current collision check). Physical representation survives tesselation unloads.

    ### Added normal generation
    * Just to be absolutely sure i did not mess anything up - i did not
    * Could not get GLM's half-floats to work - they always just write out 0. While looking around in its source i found that their implementation (yep, it is there - i just could not get it to actually DO anything) is just ridiculously inefficient O_o !. Found some papers for darn-good implementations and used thous instead (I use half-floats for normals).

    ### Added collision detection / response
    * Entity movements are tested (sweep-test) against world and recursive sliding behavior is used in case of collisions - works very-very well (Found the algorithm in my pdf-doc folder - hi-five to packrats).
    * Enabling gravity starts an amusing slide ride to the depths - yeah, definitely need to implement some friction.
    * Have not found any way to get stuck etc ... except block changes nearby (no idea how to handle that atm).

    ### Added a few controls to add/remove blocks ingame
    * Just edits at 2 voxel distance in viewing direction - quite confusing, but good enough for testing.
    * Can not think of any non-confusing ways for world-edit :/ :\.

    --------------
    Yeah, normals help . Above the map:
    http://img525.imageshack.us/img525/9...wnormnornd.png
    http://img843.imageshack.us/img843/3...normnornd2.png
    http://img850.imageshack.us/img850/5...normnornd3.png
    Bottom of the map (map size [atm]: 16384x16384x512):
    http://img854.imageshack.us/img854/9...normnornd4.png
    Stray cubes:
    http://img818.imageshack.us/img818/1...normnornd5.png
    My puny editing attempts:
    http://img802.imageshack.us/img802/5...mnorndedit.png

    [1] Using the same buffer for index and vertex data (Saves a crap-ton of memory due to less fragmentation) - despite the ancient relevant spec telling that one should not do that. Does anyone know whether it still is a bad idea? (I doubt it makes any difference on any non-ancient GPU)

  16. #341
    Moderator and Priest
    Registered: Mar 2002
    Location: Dinosaur Ladies of the Night
    I was lurking over at the Darkmod forums, and I came across this picture of a lamp someone had dug up.



    I mean damn. That has to be one of the ugliest lamps I've ever seen in my entire life. It's all Steampunkish...but...wuh? This is a lamp that could severely fuck up even the most fengish of feng shui.

    So it's ugly. But it's also AWESOME. It's so awesome, in fact, that I decided to model it.

  17. #342
    Moderator
    Registered: Jan 2003
    Location: NeoTokyo
    Well done. Texture that puppy & let's get it in game.

  18. #343
    Moderator and Priest
    Registered: Mar 2002
    Location: Dinosaur Ladies of the Night
    Maybe later. Right now, I've got to finish up the modeling tutorials I'm doing for the folks down in Thiefgen

    ...that I'm not sure anyone is reading.

  19. #344
    Member
    Registered: Nov 2003
    Location: Thief fan since ca. 1999
    Interesting, I don't believe I've seen this modeling program you have a screenshot of.

    "Modo" is it?

  20. #345
    Member
    Registered: Mar 2001
    Location: Melbourne, Australia
    Status update:



    Game + level editor is very close to being demo worthy at this stage. Sounds, enemies, physics, items, collisions all good. Just needs a level transition system of some sort to be put in and then it should be ready. Expect a demo release complete with the level editor somewhat soon-ish when I can get the motivation to add that final bit in.

  21. #346
    Member
    Registered: Jun 2004
    Well, it's been a good month since I did any work on my stuff, and the mountain of "to-dos" and my own indecisiveness (I have several ideas for completely different projects) is getting me close to a burnout. So I figure, to motivate myself further, instead of spending the next 10 months working towards completing one of my big projects, I should use my existing tech to make a small showcase-type-game to motivate myself further and actually have a finished product of sorts.

    So TTLG, any suggestions? Im about to implement Bullet for realistic physics/collision stuff. I am thinking something action-y / shootem up / FPS type thing since it's relatively easy to do. Also im thinking robotos, mainly because I dont have a skeletal animation system yet and dont want to spend 2 weeks coding and tweaking that right now.

    Or I've been considering something off-the-wall zany / artsyfartsy. One idea is to make an adventure type game where the people are static 2D cardboard/wooden cutouts (you see the cardboard/wood if you go behind them). You could talk to them find items etc. If anyone got a good short interactive story that would work in this format they'd like to pitch, PM me.

    Open to creative suggestions!

    EDIT: also, any resources for free models? I've been using TurboSquid, but lots of models only come in proprietary 3DSMax or Maya formats so I cant use them. Basically, I need to be able to import it into Blender (since I wrote a plugin for exporting to my engine format). Actually, Renz, if you want to team up and do a small game together (you do art, I do the coding, both collaborate on story/gameplay) hit me up!
    Last edited by Yakoob; 27th Jan 2012 at 04:04.

  22. #347
    Member
    Registered: Oct 2007
    Location: Sydney, Australia
    So after being a little burnt out on coding, I've decided to get back into the groove of modelling, since I'll be needing to do a lot of it for my current project. The game starts on a paddle steamer, so I figured that would be a good first step. With this as a reference, I've managed to come up with:



    And with wire:



    The whole thing will be subject to a bit of iterative deepening... I'm still blocking out things like the paddleboxes at the moment, and roughing out the railings. The proportions are a bit different to the reference; it's far wider than it should be, and there's a bit more deck in the front. I'm tempted to rectify that, but the width at least is needed so I can fit enough room for gameplay onto it. There's to be a short firefight on board, but we want to give the player plenty of opportunity to avoid it; that means giving them enough space.

    Also, if anyone should happen to be knowledgeable about how steamers work on the inside, I'd love for you to contact me... at the moment I'm particularly struggling with how on earth the smoke from the boilers is supposed to get to the smokestacks, which as far as I can tell are well afore of them .

  23. #348
    Member
    Registered: Nov 2003
    Location: Thief fan since ca. 1999
    Quote Originally Posted by icemann View Post
    Status update:



    Game + level editor is very close to being demo worthy at this stage. Sounds, enemies, physics, items, collisions all good. Just needs a level transition system of some sort to be put in and then it should be ready. Expect a demo release complete with the level editor somewhat soon-ish when I can get the motivation to add that final bit in.
    Neat! Looks like an NES era game.

  24. #349
    Moderator and Priest
    Registered: Mar 2002
    Location: Dinosaur Ladies of the Night
    Quote Originally Posted by sNeaksieGarrett View Post
    Interesting, I don't believe I've seen this modeling program you have a screenshot of.

    "Modo" is it?
    Yup. Modo. Used by Pixar to model their stuff, and Id used it to make everything in Rage. It's my personal favorite modeler, mainly because it's the one with the least amount of excess pointless BS to work through.

    And I should know excess pointless BS. I'm slogging through learning Blender at the moment, and while it has it's perks, the one thing I keep wondering is why the hell would anyone make a modeler in this day and age without edge bevels and polygon insets built in. I can work around their absence, but it takes me 10x as long to do the simplest things sometimes.

    ...no offense, Bakerman. Your boat model is pretty damn nice, but...Blender. :P

    Quote Originally Posted by Yakoob
    Actually, Renz, if you want to team up and do a small game together (you do art, I do the coding, both collaborate on story/gameplay) hit me up!
    Hmm. I'll give you a definite maybe on that. I think I've seen you floating around on Steam once or twice. I'll hit you up tonight about it if you're around.

    edit: Yakoob, in case I'm imagining things, and actually haven't seen you bouncing around on Steam, what's your user name over there? I couldn't find you under the obvious answer.
    Last edited by Renzatic; 27th Jan 2012 at 15:49.

  25. #350
    Member
    Registered: Oct 2007
    Location: Sydney, Australia
    Quote Originally Posted by Renzatic View Post
    but...Blender. :P
    Divide utility by price and you have your answer . ...ignoring the fact that dividing by zero isn't infinite...

    Really, I'm sure for me it's a case of not knowing what I'm missing. I've heard Modo is really nice, but Blender works perfectly fine for me. I started off 3D modelling with GameStudio's built-in modeller... after that, discovering Blender was like realising that actually, yes, you can breathe air, and it's quite conveniently all around you. And I've stuck with it since. The most complaints about it I've heard have been about the interface... I never really had a problem with it, after the initial disorientation of using a real modelling app .

Page 14 of 100 FirstFirst ... 4910111213141516171819242934394449545964 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •