1. Post #2281
    Map in a box's Avatar
    July 2009
    7,166 Posts
    Awesomium uses ARGB instead of RGBA color. When you get the renderbuffer, you can specify it to swap order.
    awe_renderbuffer_copy_to(pRender, pBuffer, width * 4, 4, true, false);
    I know that, but like I said it would be difficult to fix without having a noticeable performance hit. I'll dig into Slick2D and figure something out.
    Reply With Quote Edit / Delete Windows XP Professional x64 United States Show Events

  2. Post #2282
    ASK ME ABOUT MY PLAYBOOK INSTEAD OF COLLEGE
    icantread49's Avatar
    April 2011
    1,616 Posts
    I have two applications submitted so far, and a third will be done by the time the deadline comes around.
    A compass (probably wont get through)
    A syncing e-reader (more likely)
    and TBA
    i have to resubmit mine, apparently i fucked up the signing process and didn't sign with RIM's key, only my own
    Reply With Quote Edit / Delete Windows XP United States Show Events Friendly Friendly x 2Dumb Dumb x 1Programming King Programming King x 1 (list)

  3. Post #2283
    Gold Member
    ShaunOfTheLive's Avatar
    November 2007
    9,815 Posts
    My SD card broke...
    There goes a few hours of work.

    Oh well.
    Wow, how did you do that? I thought SD cards were basically unbreakable. (They don't have the weakness of having a separate connector like USB drives do)
    Reply With Quote Edit / Delete Windows 7 Canada Show Events Late Late x 1 (list)

  4. Post #2284
    Gold Member
    HiredK's Avatar
    November 2006
    419 Posts
    Well, first of all, if you're going to do bloom, you shouldn't just downsample and linearly interpolate.
    What you need to do is downsample to a few different resolutions, then apply a separable Gaussian blur, then combine the results. The Gaussian blur is the important part. The downsampling is done for two reasons:
    1. It greatly reduces the number of fragments you need to filter.
    2. It allows you to exploit spatial locality when you need to sample over a larger area. (much better cache hit/miss ratio, huge performance impact)
    For you to benefit from the downsampling step, you must ensure that your blur is not writing out to a full-resolution buffer. It is the resolution of the target that determines how many fragments are processed, not the source. The downsampling/mipmapping is worthless if you are filtering at full-screen resolution anyway.

    Second, you're only giving us a small fraction of the information we'd need to figure out what's going on. We can't help without having the whole picture.
    Thanks for the tips, I finally got it working by changing the downsampling size from 512.0f to (render_w * 0.25f) and it worked like a charm.... probably a ratio related problem. I'm applying a gaussian convolution pass only once giving me the result below:



    Now is using different resolution for the bloom pass really necessary? I mean one pass is already pretty close to the real deal.
    Reply With Quote Edit / Delete Windows 7 Canada Show Events

  5. Post #2285
    itty-bitty pretty kitty
    Dennab
    September 2008
    9,837 Posts
    Wow, how did you do that? I thought SD cards were basically unbreakable. (They don't have the weakness of having a separate connector like USB drives do)
    It snapped?

    Edited:

    I know the SD cards I have are pretty flimsy.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  6. Post #2286
    Gold Member
    ShaunOfTheLive's Avatar
    November 2007
    9,815 Posts
    I'm trying to learn how to create associations between objects in OOP. Say I have this diagram:



    Basically, any Workplace may have any number of Employees but an Employee may not work at more than one Workplace at the same time.

    What is the correct way to implement this in an object-oriented programming language?
    My guess is that the Workplace class should manage an array (or possibly a dynamic list) of Employee instances and expose methods to add or remove employees, which would naturally map them to said array.

    An Employee object, on its side, would have to be added to a Workplace object.

    Now that I think of it, though, there's a problem with the fact that the relationship from Employee to Workplace is not enforced in that multiple Workplaces could have the same instance of Employee added to them. How could I avoid that situation? Is my whole idea correct?
    It's basically correct, yeah. Maybe your Employee should have a pointer back to its parent Workplace, and when Workplace adds an Employee, it has to ask the Employee whether its parent pointer is null. Or maybe that's a horrible idea.

    EDIT:

    supersnail11 posted:
    It snapped?
    Well, disregarding the fact that you're a self-professed "HUGE idiot", I can't imagine a situation in which a force could be applied to a thin card that would snap it. Well, maybe if you roll over it with a chair wheel and the pressure in the middle is too much, but I would think that since it's flat, that wouldn't affect it. Although I have broken CDs that way.
    Reply With Quote Edit / Delete Windows 7 Canada Show Events Funny Funny x 1 (list)

  7. Post #2287
    itty-bitty pretty kitty
    Dennab
    September 2008
    9,837 Posts
    Well, disregarding the fact that you're a self-professed "HUGE idiot", I can't imagine a situation in which a force could be applied to a thin card that would snap it. Well, maybe if you roll over it with a chair wheel and the pressure in the middle is too much, but I would think that since it's flat, that wouldn't affect it. Although I have broken CDs that way.


    I'm talking about long and thin ones, like the ones sony devices use.

    These could certainly snap in half.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Disagree Disagree x 1 (list)

  8. Post #2288
    Gold Member
    Lord Ned's Avatar
    April 2006
    3,702 Posts
    I know that, but like I said it would be difficult to fix without having a noticeable performance hit. I'll dig into Slick2D and figure something out.
    I don't get a noticeable performance hit from the byte swapping?
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  9. Post #2289
    Bang Train's Avatar
    December 2007
    209 Posts
    I'm trying to learn how to create associations between objects in OOP. Say I have this diagram:



    Basically, any Workplace may have any number of Employees but an Employee may not work at more than one Workplace at the same time.

    What is the correct way to implement this in an object-oriented programming language?
    My guess is that the Workplace class should manage an array (or possibly a dynamic list) of Employee instances and expose methods to add or remove employees, which would naturally map them to said array.

    An Employee object, on its side, would have to be added to a Workplace object.

    Now that I think of it, though, there's a problem with the fact that the relationship from Employee to Workplace is not enforced in that multiple Workplaces could have the same instance of Employee added to them. How could I avoid that situation? Is my whole idea correct?
    A set can enforce the no duplicate employees. Thats not really an OO design issue, but an implementation issue.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  10. Post #2290
    Gold Member

    March 2005
    3,028 Posts
    Now is using different resolution for the bloom pass really necessary? I mean one pass is already pretty close to the real deal.
    I think they usually apply a gaussian blur during each upsampling pass to hide the bilinear upsampling artifacts. Instead of upsampling the whole thing all at once using bilinear, they blur, upsample, blur, upsample, blur.
    It's sort of a refinement you can make. There's no need for it if you're happy with the results you've got now.
    Reply With Quote Edit / Delete Windows 7 Show Events

  11. Post #2291
    Map in a box's Avatar
    July 2009
    7,166 Posts
    I don't get a noticeable performance hit from the byte swapping?
    Are you using Slick2D and awesomium?
    Reply With Quote Edit / Delete Windows XP Professional x64 United States Show Events Dumb Dumb x 1 (list)

  12. Post #2292
    Gold Member
    Catdaemon's Avatar
    February 2005
    2,821 Posts
    I've started implementing a tile engine. I'm beginning to regret using the tiled map format now.. it's shit. I'm working off some parser someone wrote for SFML 1 (I'm using 2) and I keep running into brick walls with it. I've managed to get it to work kinda but I'm getting this:

    Anyone have any idea what this might be caused by? I have one big tile map image in memory and I'm setting the sprites to subrects of it :/

    Edit:

    Nvm, fucking sfml and its obscure technicalities.
    Reply With Quote Edit / Delete Windows 7 Show Events

  13. Post #2293
    ASK ME ABOUT MY PLAYBOOK INSTEAD OF COLLEGE
    icantread49's Avatar
    April 2011
    1,616 Posts
    i have to resubmit mine, apparently i fucked up the signing process and didn't sign with RIM's key, only my own
    used new keys, resubmitted, should be good to go!

    unfortunately i couldn't edit the previous "release" so i renamed the product and made a new product, i hope that doesn't fuck things up
    Reply With Quote Edit / Delete Windows XP United States Show Events

  14. Post #2294
    ..............
    nekosune's Avatar
    February 2009
    1,827 Posts
    used new keys, resubmitted, should be good to go!

    unfortunately i couldn't edit the previous "release" so i renamed the product and made a new product, i hope that doesn't fuck things up
    Couldnt you just add a new release to that product?
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events

  15. Post #2295
    ASK ME ABOUT MY PLAYBOOK INSTEAD OF COLLEGE
    icantread49's Avatar
    April 2011
    1,616 Posts
    Couldnt you just add a new release to that product?
    yeah but then i would have had to mess with changing the version, and i didn't wanna screw up my perfectly signed BAR file that took me so long to figure out
    Reply With Quote Edit / Delete Windows XP United States Show Events

  16. Post #2296
    ..............
    nekosune's Avatar
    February 2009
    1,827 Posts
    yeah but then i would have had to mess with changing the version, and i didn't wanna screw up my perfectly signed BAR file that took me so long to figure out

    Aren't you using eclipse plugins? All you have to do with that to generate a bar iis register Thekey rim gave you with it. Then right click on project. Blackberry tools --) sign for app world
    Reply With Quote Edit / Delete United Kingdom Show Events

  17. Post #2297
    ASK ME ABOUT MY PLAYBOOK INSTEAD OF COLLEGE
    icantread49's Avatar
    April 2011
    1,616 Posts
    Aren't you using eclipse plugins? All you have to do with that to generate a bar iis register Thekey rim gave you with it. Then right click on project. Blackberry tools --) sign for app world
    no i'm deploying a marmalade playbook BAR and then manually signing it with RIM's SDK tools
    Reply With Quote Edit / Delete Windows XP United States Show Events

  18. Post #2298
    ..............
    nekosune's Avatar
    February 2009
    1,827 Posts
    no i'm deploying a marmalade playbook BAR and then manually signing it with RIM's SDK tools

    Ouch. Well good luck then.
    Reply With Quote Edit / Delete United Kingdom Show Events Agree Agree x 1 (list)

  19. Post #2299
    Gold Member
    ZenX2's Avatar
    February 2009
    4,961 Posts
    I've been doing some research (aka playing ADOM/Nethack ) to help me with writing the inventory, attributes, etc. in my roguelike.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  20. Post #2300
    ASK ME ABOUT MY PLAYBOOK INSTEAD OF COLLEGE
    icantread49's Avatar
    April 2011
    1,616 Posts
    Ouch. Well good luck then.
    thanks. i already managed to sign it properly and it's pending review, so hopefully it all works :D
    Reply With Quote Edit / Delete Windows XP United States Show Events

  21. Post #2301
    Gold Member
    Catdaemon's Avatar
    February 2005
    2,821 Posts
    Now with correct images!
    Reply With Quote Edit / Delete Windows 7 Show Events Artistic Artistic x 4Winner Winner x 1 (list)

  22. Post #2302
    chimitos's Avatar
    September 2010
    2,345 Posts
    Wow, how did you do that? I thought SD cards were basically unbreakable. (They don't have the weakness of having a separate connector like USB drives do)
    It's not physically broken, a better word would be bricked.
    It's corrupted one to many times for me to bother with it.
    Reply With Quote Edit / Delete Windows 7 United States Show Events

  23. Post #2303
    Parad0x0217's Avatar
    May 2011
    73 Posts
    My PlayBook app has been approved and is now on the BlackBerry App World.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Winner Winner x 12 (list)

  24. Post #2304
    Naarkie's Avatar
    September 2011
    319 Posts
    Now with correct images!
    Are you making something like Space Station 13? It looks like it a bit.
    Reply With Quote Edit / Delete Windows 7 South Africa Show Events Agree Agree x 4 (list)

  25. Post #2305
    Gold Member
    Naelstrom's Avatar
    June 2010
    2,685 Posts
    Are you making something like Space Station 13? It looks like it a bit.
    Is it bad that I'm trying to make a Space Station 13 clone when I've never actually played it? (Doesn't work on Linux, runs like shit on Windows.)
    I just really like the idea.

    I would love some input and advice on it, hell I'd love it if someone worked on it with me. Would you be so kind?
    Reply With Quote Edit / Delete Linux United States Show Events

  26. Post #2306
    SHADERS
    Legend286's Avatar
    October 2008
    10,024 Posts
    I'm having a little issue with HDR,. This is the wanted result, only works if I render it directly to a screen quad



    However if I bind the output to a buffer I get a weird artifact... (I tried to change the buffer to GL_RGBA16F and to clamp/unclamp it but no luck) not sure what's causing it, anyone seen that before?

    Ew, box blur. You should use gaussian weighting for it instead. And the tearing is probably caused by the quad you're drawing it to (the diagonal slice happened to me before with XNA, it's a bug with the texcoords of the quad I was drawing to...) The rest is probably also caused by the same thing.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Late Late x 1 (list)

  27. Post #2307
    Moderator
    Seiteki's Avatar
    September 2005
    12,191 Posts
    Is it bad that I'm trying to make a Space Station 13 clone when I've never actually played it? (Doesn't work on Linux, runs like shit on Windows.)
    I just really like the idea.

    I would love some input and advice on it, hell I'd love it if someone worked on it with me. Would you be so kind?
    Grid-based movement for starters.
    Needs a semi-realistic atmosphere system, to allow all sorts of hijinks.
    Basically, go ask the people in the SS13 thread here what elements are needed for a game like that.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 1Friendly Friendly x 1 (list)

  28. Post #2308
    Gold Member
    Lexic's Avatar
    March 2009
    6,123 Posts
    Well, disregarding the fact that you're a self-professed "HUGE idiot", I can't imagine a situation in which a force could be applied to a thin card that would snap it. Well, maybe if you roll over it with a chair wheel and the pressure in the middle is too much, but I would think that since it's flat, that wouldn't affect it. Although I have broken CDs that way.
    I had a SD card that broke along its seam before. Anything can happen when cheap knockoffs are involved.
    Reply With Quote Edit / Delete Mac United Kingdom Show Events Late Late x 1 (list)

  29. Post #2309
    quality poster
    Dennab
    August 2009
    12,242 Posts


    i have begun to be making a heads up display for vidoe game in unreal engine
    Reply With Quote Edit / Delete Windows 7 United States Show Events Artistic Artistic x 1Programming King Programming King x 1 (list)

  30. Post #2310
    Gold Member
    BlkDucky's Avatar
    May 2008
    6,484 Posts
    I've been doing some research (aka playing ADOM/Nethack ) to help me with writing the inventory, attributes, etc. in my roguelike.
    dear god tell me you're not going to be basing an inventory system based on Nethacks.

    Edited:

    ADOM's is relatively incredible. Rip that off, if anything.
    Reply With Quote Edit / Delete Windows Vista United Kingdom Show Events Agree Agree x 1 (list)

  31. Post #2311
    Gold Member
    Dr Magnusson's Avatar
    July 2008
    2,694 Posts
    I've spent the last week or so trying to figure out how one could implement a Levenshtein Distance spin-off that used the physical location of the keys on the keyboard to determine the difference, instead of the insert/replace/delete operations that his uses. The advantage of this is that it takes slip-ups or accidental keypresses(or misses) into account.


    And it seems I've succeeded!
    Reply With Quote Edit / Delete Windows 7 Denmark Show Events Programming King Programming King x 6Artistic Artistic x 2Winner Winner x 1 (list)

  32. Post #2312
    Gold Member
    Robber's Avatar
    January 2006
    6,077 Posts
    Today is the last day of my awesome programming job because I have to do community service for the next 9 months (every male in Austria has the choice between community service and military service). I'll miss it dearly. :(
    Reply With Quote Edit / Delete Windows 7 Austria Show Events Friendly Friendly x 22Funny Funny x 1 (list)

  33. Post #2313

    August 2007
    192 Posts
    Should've chosen military service and gone for the air force... FREE FLYING LESSONS <3 (Dropping bombs on children, not so cool but still... FREE FLYING LESSONS)

    also my face when we have a 1 hour lecture in which we learn how to forge emails and scrape login details from packets and abuse ftp...

    THE WHOLE FUCKING INTERNET IS SO INSECURE!
    Reply With Quote Edit / Delete Mac United Kingdom Show Events Dumb Dumb x 20 (list)

  34. Post #2314

    August 2011
    192 Posts
    Should've chosen military service and gone for the air force... FREE FLYING LESSONS <3 (Dropping bombs on children, not so cool but still... FREE FLYING LESSONS)

    also my face when we have a 1 hour lecture in which we learn how to forge emails and scrape login details from packets and abuse ftp...

    THE WHOLE FUCKING INTERNET IS SO INSECURE!
    I've chosen military and it was horrible, so many stupid people in one room, it was like the internet in real life Oo

    doing community work now as well (BTW I live in Switzerland not austria but they have more or less the same system)
    Reply With Quote Edit / Delete Windows 7 Switzerland Show Events Friendly Friendly x 3Funny Funny x 1 (list)

  35. Post #2315

    August 2007
    192 Posts
    I've chosen military and it was horrible, so many stupid people in one room, it was like the internet in real life Oo

    doing community work now as well (BTW I live in Switzerland not austria but they have more or less the same system)
    The military is not so bad as long as you realise its a system.. And like any computer system there are rules you can manipulate, quite a good programmer environment. Just make sure you end up in an officers environment, being a grunt isn't quite the same.
    Reply With Quote Edit / Delete Mac United Kingdom Show Events Funny Funny x 1Dumb Dumb x 1 (list)

  36. Post #2316
    Gold Member
    Downsider's Avatar
    July 2007
    1,996 Posts


    Trying to rig up an inventory that'd work well for the iOS and Android versions of my MMO.. The series of boxes is a GuiControlSlidebox, using my awe-inspiring GUI system, so you can slide it up and down to reveal 16 panels total.

    If you click on one, it gets highlighted, if you click it again after highlight, a dialog comes up that'll say shit like equip, drop, info, or whatever.



    I think this design sucks. Any better ideas?
    Reply With Quote Edit / Delete Windows 7 United States Show Events Funny Funny x 3Artistic Artistic x 2 (list)

  37. Post #2317
    Gold Member
    Robber's Avatar
    January 2006
    6,077 Posts
    Should've chosen military service and gone for the air force... FREE FLYING LESSONS <3 (Dropping bombs on children, not so cool but still... FREE FLYING LESSONS)
    You need perfect eyesight and perfect health to be even considered as a pilot and you still have to do basic training which is horrible and stupid. Working for the Red Cross and helping people in need sounds much better than killing people in need.
    Reply With Quote Edit / Delete Windows 7 Austria Show Events Agree Agree x 4Disagree Disagree x 1 (list)

  38. Post #2318
    So I have been having a problem with this, I have an object in 3d space and I need it to look at the mouse, no problem.
    The only problem I have right now, is that the object only has the right rotation when the camera is on the same height, when I move the camera around it doesn't work right anymore.
    Does anyone have an idea how I can write some code to compensate for the position of the camera?

    This is the code I am using now. It uses a raycast from the camera to see where the mouse is in world space.
    Code:
    ray = Camera.main.ScreenPointToRay(Input.mousePosition);
    RaycastHit hit;
    if (Physics.Raycast(ray, out hit, 1000f))
    {
         radians = Mathf.Atan2(hit.point.x,hit.point.y);
         degrees = Mathf.Round((radians * / Mathf.PI));
         object.localEulerRotation = degrees;
    }
    Reply With Quote Edit / Delete Windows 7 Netherlands Show Events

  39. Post #2319
    Gold Member
    Vbits's Avatar
    April 2010
    1,186 Posts
    This post is responding to the pictures of the inventory.

    Make the buttons slightly less like desktop buttons, bigger, and then tweak the display for the inventory, unless your on a tablet or the game requires it fill the entire screen.
    Reply With Quote Edit / Delete Mac New Zealand Show Events

  40. Post #2320
    Hruhf's Avatar
    September 2007
    580 Posts
    Oh my, looking at the unit details for the unit I mentioned earlier, it turns out that the introductory session is not only in C, but is also in Linux. I am impressed considering this is only an introductory unit common to all engineering students.

    I guess I'm lucky I don't have to sit through something like visual basic or scratch.
    Reply With Quote Edit / Delete Windows 7 Australia Show Events Agree Agree x 5Winner Winner x 1 (list)