1. Post #3041
    Andrew McWatters
    Dennab
    March 2011
    4,658 Posts


    Ugh... that fps. Drawing 3.6k tiles with sfml should not bring you down to 40 fps blargh
    learn to optimize your draw calls scrub

    Edited:

    shithead king poster
    Reply With Quote Edit / Delete Windows 7 United States Show Events Funny Funny x 8 (list)

  2. Post #3042
    Person
    geel9's Avatar
    June 2008
    5,561 Posts
    Working on YoGUI. I added FilterTextFields--that is, you supply a regex, and it changes its border color if it's a match or not. It also provides a boolean method that lets the programmer see if the text is validated. You can customize the success and fail border color, so if you don't want it to change colors, set them both to the same thing.

    In the following pictures, the regex I'm using is:
    Code:
    ^\\d+?\\.\\d+?\\.\\d+?\\.\\d+?$
    Not valid:


    Valid:
    Reply With Quote Edit / Delete Windows 7 United States Show Events Winner Winner x 4Artistic Artistic x 1 (list)

  3. Post #3043
    Andrew McWatters
    Dennab
    March 2011
    4,658 Posts
    Reply With Quote Edit / Delete Windows 7 United States Show Events Useful Useful x 12Winner Winner x 2Friendly Friendly x 1 (list)

  4. Post #3044
    Person
    geel9's Avatar
    June 2008
    5,561 Posts
    And here it is put into Minor Destruction:



    Reply With Quote Edit / Delete Windows 7 United States Show Events

  5. Post #3045
    Gold Member
    Foda's Avatar
    April 2006
    2,726 Posts


    Ugh... that fps. Drawing 3.6k tiles with sfml should not bring you down to 40 fps blargh
    so it's just sml?
    Reply With Quote Edit / Delete Windows 7 United States Show Events Funny Funny x 13 (list)

  6. Post #3046
    ASK ME ABOUT MY PLAYBOOK INSTEAD OF COLLEGE
    icantread49's Avatar
    April 2011
    1,616 Posts
    my app used to load images and then convert them to the proper format and size (i.e. pow2) at run-time

    then i thought: why the fuck is it doing that as i'm the only one that tells it what images to load

    so i made a little program that uses freeimage to read my artist's PNG/TGA files and outputs custom images

    these custom images are quite literally

    4 bytes: original width
    4 bytes: original height
    4 bytes: pow2 width
    4 bytes: pow2 height
    1 byte: RGB or RGBA pixels
    N bytes: pixel data ready to be fed to opengl es

    loading times? instantaneous. memory problems (running out of memory while converting, etc.)? gone.

    i'm happy :)
    Reply With Quote Edit / Delete Windows XP United States Show Events Programming King Programming King x 6 (list)

  7. Post #3047
    benji2015's Avatar
    October 2010
    476 Posts
    learn to optimize your draw calls scrub

    Edited:

    shithead king poster


    Still kinda bad for no fps limit but w/e

    Edited:

    so it's just smfl?
    Yes



    I hope I'm not missing a joke
    Reply With Quote Edit / Delete Windows 7 United States Show Events Funny Funny x 8 (list)

  8. Post #3048
    Gold Member
    Socram's Avatar
    June 2006
    1,804 Posts
    you must be new.
    No actually, I come here all the time and know about all the drama that some of you can't seem to let go. I'm just not an asshole.

    Content wise, finished up the Reverse Key Finder in its first state! Now to add a lot more chord types and then get it working on the Android... not looking forward to that.

    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 3 (list)

  9. Post #3049
    Crescent fresh
    Perl's Avatar
    January 2011
    966 Posts
    I hope I'm not missing a joke
    I'm afraid you are
    Reply With Quote Edit / Delete Windows 7 Estonia Show Events Agree Agree x 3 (list)

  10. Post #3050
    Iceguize's Avatar
    November 2007
    43 Posts

    Ugh... that fps. Drawing 3.6k tiles with sfml should not bring you down to 40 fps blargh
    Generate a single sf::Image from the map data, then just sf::draw that, if you aren't already. Correct me if I'm wrong or there's a better way. Its what I did for my tile-based map. Or is this just a completely redundant thing to do that helps in no way at all?
    Reply With Quote Edit / Delete Windows 7 Australia Show Events Useful Useful x 2Agree Agree x 1Friendly Friendly x 1 (list)

  11. Post #3051
    Gold Member
    Lexic's Avatar
    March 2009
    6,118 Posts
    I dunno if you fixed this or not already but I suspect it's being case sensitive. You have 'kernel' and it wanted 'KERNEL'.
    Reply With Quote Edit / Delete Mac United Kingdom Show Events Disagree Disagree x 1 (list)

  12. Post #3052
    Reply With Quote Edit / Delete Windows 7 United States Show Events Funny Funny x 5Dumb Dumb x 2Agree Agree x 1 (list)

  13. Post #3053
    benji2015's Avatar
    October 2010
    476 Posts
    Generate a single sf::Image from the map data, then just sf::draw that, if you aren't already. Correct me if I'm wrong or there's a better way. Its what I did for my tile-based map. Or is this just a completely redundant thing to do that helps in no way at all?


    No. Not redundant at all.

    Thanks a lot!
    Reply With Quote Edit / Delete Windows 7 United States Show Events Friendly Friendly x 4Winner Winner x 2Funny Funny x 1 (list)

  14. Post #3054
    Gold Member
    ShaunOfTheLive's Avatar
    November 2007
    9,788 Posts


    No. Not redundant at all.

    Thanks a lot!
    Also, if you ever have to update parts of your background, make a function that marks a certain part of your background "dirty", and then just update that part of the sf::Image.
    Reply With Quote Edit / Delete Windows 7 Canada Show Events Useful Useful x 4Agree Agree x 1 (list)

  15. Post #3055
    Andrew McWatters
    Dennab
    March 2011
    4,658 Posts
    you spend a lot of time pointing out other people's shit work rather than actually posting shit

    maybe you should give the latter a try more often
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 6 (list)

  16. Post #3056
    Gold Member
    synthiac's Avatar
    June 2007
    1,078 Posts
    4 bytes: pow2 width
    4 bytes: pow2 height
    how about you store them as the exponent with 4 bits each?
    Reply With Quote Edit / Delete United States Show Events Dumb Dumb x 1 (list)

  17. Post #3057
    quality poster
    Dennab
    August 2009
    12,242 Posts
    you spend a lot of time pointing out other people's shit work rather than actually posting shit

    maybe you should give the latter a try more often
    nothing wrong with pointing out flaws in something someone releases publicly

    learn from it and fix your bad code instead of getting upset when someone points things out
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 3Dumb Dumb x 1Disagree Disagree x 1 (list)

  18. Post #3058
    Gold Member
    synthiac's Avatar
    June 2007
    1,078 Posts
    you spend a lot of time pointing out other people's shit work rather than actually posting shit

    maybe you should give the latter a try more often
    sorry, i just thought we needed a joke fresher than else-if chains.
    Reply With Quote Edit / Delete United States Show Events

  19. Post #3059
    Andrew McWatters
    Dennab
    March 2011
    4,658 Posts
    nothing wrong with pointing out flaws in something someone releases publicly

    learn from it and fix your bad code instead of getting upset when someone points things out
    "uhm" is a great way of helping out and not causing drama or making people upset isnt it
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 4 (list)

  20. Post #3060
    Reply With Quote Edit / Delete Linux Australia Show Events

  21. Post #3061
    Person
    geel9's Avatar
    June 2008
    5,561 Posts

    I appreciate your well thought-out criticism and suggestions as to how I can make my code better.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Zing Zing x 11Funny Funny x 4 (list)

  22. Post #3062
    Andrew McWatters
    Dennab
    March 2011
    4,658 Posts


    So this is what I'm up to.

    Fixing saving in Half-Life 2: Sandbox, which is rooted in a single segfault. Not bad if you ask me; it's better than having to rewrite a bunch of shit to work with multiplayer. I'm sorta getting sick of that. Not to mention some things are plainly broken upon the logical transition from a single player interacting with various parts of a game designed for a single player to multiple players doing the same thing.

    My issue is that the saverestore system in Source traverses entity hierarchies and the CHL2MP_Player class wasn't explicitly designed to be saved, so it has a "null" data description for what it needs to pass on to this system.

    That's sort of where I'm stuck. Having an empty data description array isn't bad, nor is that really the issue - it seems here that Source attempts to save pointers to various think context functions if available shortly after grabbing this data description and all of its base classes', but inevitably it attempts to handle a bad function pointer to one of them, and crashes later down the execution chain.

    So I've been fiddling with the debugger and animating my way down the call stack, but I haven't really hit on anything conclusive yet.

    It's not content as much as it is technical insight on what I'm doing, but I am actively working on things like this every single day as well as implementing new features into the mod.
    Reply With Quote Edit / Delete Windows 7 United States Show Events Programming King Programming King x 4 (list)

  23. Post #3063
    RUBY OVERLORD
    swift and shift's Avatar
    November 2011
    2,115 Posts
    how about you store them as the exponent with 4 bits each?
    null's goal is to just load it up quickly.

    reading unaligned memory, masking off bits and then shifting 1 by that is a lot more effort for no gain rather than simply reading a uint32_t
    Reply With Quote Edit / Delete Mac Australia Show Events Agree Agree x 6 (list)

  24. Post #3064
    Zyx
    Guest 3855 is lost and can't find the park exit
    Zyx's Avatar
    February 2005
    2,816 Posts
    Got some A* up in this bitch:
    Reply With Quote Edit / Delete Windows 7 Show Events Programming King Programming King x 3Winner Winner x 2Agree Agree x 1 (list)

  25. Post #3065
    AtomiCasd's Avatar
    June 2011
    588 Posts
    I'm obsessed with the idea of using volumentric analysis in 3d to plot out nodes using octrees to check if points in the cube is within the world or not(and from that decide the next action, plot node, subdivide more, etc), and WHILE doing that, not after, pathfind to your target.

    I have a semi working algorithm in my head. But holy fuck I have to do this school project and I don't have the time for this shit.

    Has anyone done something similar?
    Reply With Quote Edit / Delete Windows 7 Norway Show Events Optimistic Optimistic x 2 (list)

  26. Post #3066
    Paid for a title.
    Maurice's Avatar
    June 2005
    6,175 Posts
    Got some A* up in this bitch:
    Looks more like nodes?
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Funny Funny x 6Dumb Dumb x 1Disagree Disagree x 1 (list)

  27. Post #3067
    Zyx
    Guest 3855 is lost and can't find the park exit
    Zyx's Avatar
    February 2005
    2,816 Posts
    Looks more like nodes?
    Isn't it still A* if it looks at a graph of nodes instead of every tile in the game being a node by itself?
    If not I'll gladly change it to "Graph path finding" instead. It does what I want it to do anyway
    Reply With Quote Edit / Delete Windows 7 Show Events Agree Agree x 2 (list)

  28. Post #3068
    Paid for a title.
    Maurice's Avatar
    June 2005
    6,175 Posts
    Isn't it still A* if it looks at a graph of nodes instead of every tile in the game being a node by itself?
    If not I'll gladly change it to "Graph path finding" instead. It does what I want it to do anyway
    Just looked it up, you're right.
    I never did any pathfinding so I'm pretty clueless. Always thought A* was tilemap only because that's what people usually use it for.
    Reply With Quote Edit / Delete Windows 7 Germany Show Events Agree Agree x 1Dumb Dumb x 1 (list)

  29. Post #3069
    Gold Member
    synthiac's Avatar
    June 2007
    1,078 Posts
    reading unaligned memory
    that'll end up happening anyway
    Reply With Quote Edit / Delete United States Show Events Dumb Dumb x 1Agree Agree x 1 (list)

  30. Post #3070
    RUBY OVERLORD
    swift and shift's Avatar
    November 2011
    2,115 Posts
    Figured out what was wrong with my GC that was causing things to be collected when they shouldn't be.

    Here's the definition of the 'setindex' instruction:



    Looks alright, yeah?

    Nope! Basically I'm taking a pointer to the middle of a struct and saving that pointer in a hash table. When it comes time for the GC to scan for unreferenced objects, it goes and collects the struct containing the thing I'm pointing to, because there aren't any pointers pointing to that struct!

    Here's what I should have been doing:



    This sort of gives me the shits because I had considered this very issue a while ago and I wrote the js_to_js_string_t() function to deal specifically with this sort of thing... and then I forgot about it and did it the shit way anyway.

    Here's what js_to_js_string_t() does:

    Reply With Quote Edit / Delete Mac Australia Show Events Programming King Programming King x 5 (list)

  31. Post #3071
    Iceguize's Avatar
    November 2007
    43 Posts

    No. Not redundant at all.

    Thanks a lot!
    This has made me inexplicably happy.
    Reply With Quote Edit / Delete Windows 7 Australia Show Events Friendly Friendly x 4 (list)

  32. Post #3072
    hOnK :o)
    i300's Avatar
    December 2009
    3,987 Posts
    Figured out what was wrong with my GC that was causing things to be collected when they shouldn't be.

    Here's the definition of the 'setindex' instruction:

    -code-

    Looks alright, yeah?

    Nope! Basically I'm taking a pointer to the middle of a struct and saving that pointer in a hash table. When it comes time for the GC to scan for unreferenced objects, it goes and collects the struct containing the thing I'm pointing to, because there aren't any pointers pointing to that struct!

    Here's what I should have been doing:

    -code-

    This sort of gives me the shits because I had considered this very issue a while ago and I wrote the js_to_js_string_t() function to deal specifically with this sort of thing... and then I forgot about it and did it the shit way anyway.

    Here's what js_to_js_string_t() does:

    -code-
    What language are you writing that in, C++?

    That's pretty damn awesome to be honest.
    Reply With Quote Edit / Delete Mac United States Show Events Agree Agree x 1 (list)

  33. Post #3073
    Gold Member
    Nipa's Avatar
    June 2006
    1,095 Posts
    What language are you writing that in, C++?

    That's pretty damn awesome to be honest.
    He's coding it in C.
    Reply With Quote Edit / Delete Windows 7 Australia Show Events

  34. Post #3074
    Gold Member
    NinjaWilko's Avatar
    February 2009
    759 Posts
    Did some more work on my Lorenz Attractor visualizer. Increased the time it draws for from 1024 to 20,000, added colour changing in, and made it use a line renderer instead of GL calls. It looks much better now.

    Watch in HD if you want to see it best.

    Edited:

    Oh wow, it actually works at full speed on my phone too.
    Reply With Quote Edit / Delete Windows 7 Australia Show Events Winner Winner x 12Artistic Artistic x 5 (list)

  35. Post #3075
    quality poster
    Dennab
    August 2009
    12,242 Posts
    i love the glow effect and how things get brighter towards the center, looks quite cool
    Reply With Quote Edit / Delete Windows 7 United States Show Events Agree Agree x 7 (list)

  36. Post #3076
    Gesture menu actually does something now - also pauses the game!

    Reply With Quote Edit / Delete Windows 8 Netherlands Show Events Artistic Artistic x 2 (list)

  37. Post #3077
    Gold Member
    Darwin226's Avatar
    January 2009
    4,031 Posts
    Gesture menu actually does something now - also pauses the game!
    I don't like how you drag the other tile types with your mouse. That shouldn't be visible all the time.

    Edited:

    Just looked it up, you're right.
    I never did any pathfinding so I'm pretty clueless. Always thought A* was tilemap only because that's what people usually use it for.
    The thing is, tiles also form a graph. It's just a more uniform graph.
    Reply With Quote Edit / Delete Windows 7 Croatia Show Events

  38. Post #3078
    Dotmister's Avatar
    May 2008
    898 Posts
    Can someone explain why reading unaligned memory is slow, I've seen it talked about loads but never really explained.

    I've even seen some C++ structs which had 3 floats, then an extra float just for padding, supposedly because of this mysterious memory alignment.
    Reply With Quote Edit / Delete Windows 7 United Kingdom Show Events Agree Agree x 1 (list)

  39. Post #3079
    I don't like how you drag the other tile types with your mouse. That shouldn't be visible all the time.
    I'm planning on making an option in the gesture menu that displays a container with all available tiles, which you can drag into a bar. Then, everything in that bar will be visible and selectable in the scroll menu. But yea, I'm still gonna tweak that scroll menu.
    Reply With Quote Edit / Delete Windows 8 Netherlands Show Events

  40. Post #3080
    Gold Member
    Darwin226's Avatar
    January 2009
    4,031 Posts
    I'm planning on making an option in the gesture menu that displays a container with all available tiles, which you can drag into a bar. Then, everything in that bar will be visible and selectable in the scroll menu. But yea, I'm still gonna tweak that scroll menu.
    At least make it drag with the mouse, not follow it like on an elastic.

    I can see that getting extremely annoying when your moving your mouse to the right since it would get under it.
    Reply With Quote Edit / Delete Windows 7 Croatia Show Events