• What Are You Working On? - August 2014
    1,181 replies, posted
[img_thumb]https://dl.dropboxusercontent.com/u/22771846/spacerevenge.png[/img_thumb] Aliens ate your grandma. It's time for revenge.
the aliens ate my grandma? if they spent the time digging her up just to eat her i think they deserve applause, not revenge.
[QUOTE=Richy19;45710293]Cant you just port it over to C#?[/QUOTE] Not really in the timeframe I have. The application handles [B]all[/B] migrations of software between various environments, using an old-ass version control thing (PVCS), with more functionality than I'm actually capable of keeping track of. It's a program that's been slowly added to over time since the original version was used over 10 years ago, it's just they stopped maintaining it a few years back as it did everything necessary. This kids, is why you document everything, internal or external software. Document that shit. I spent at least a week and a half trying to reverse engineer some of the functionality so I could fix the major problems it had on Windows 7.
[QUOTE=Darwin226;45710942]I decided to have a go at making a code editor for Haskell. Making a VS extension was very tedious so I like the idea of a fresh new project that doesn't have to interact with some huge framework. It makes me more motivated and that results in prettier and better code. Anyways, unless I want to write a custom text renderer for WinForms (which I most certainly don't), I have to use RichTextBox and boy oh boy is it not meant for monospaced source code. The only way to say it's tab size is to manually edit the underlying RTF string and change the tab size which is in twips. What are twips? Well, they're 1/20 of a point. And a point is, naturally, 1/72 of an inch. The only working solution I currently have is to have a hidden RTB onto which I write 4 spaces and measure the horizontal distance from the beginning to the end and then convert that into twips using the displays DPI. So much for getting away from horrible hacks.[/QUOTE] [URL="http://www.codeproject.com/Articles/161871/Fast-Colored-TextBox-for-syntax-highlighting"]Fast Colored TextBox[/URL]
Today I fixed an extremely longstanding bug which meant that the initial size to allocate the texture memory of my texture array was wrong, which meant that it had to reallocate a few times. This was likely to run out of ram (huge contiguous of memory blocks = bad), and with chrome open I'd std::bad_alloc about 50% of the time. Turns out I'd forgotten to allocate space for mipmaps too, and now that I've done that, there's no more reallocation and no more running out of memory woo! I've also updated the vertex distortion to be modified in intensity (and radius) by how far away it is from the camera. This isn't the ideal heuristic for making further away things distort less, but I can't be bothered for objects to know how far away they are from each distorter (especially if there are multiple), so its a pretty ok solution for the moment. I could have objects distort depending on their distance from the camera which might be better, but in the end I just can't be arsed. It looks alright and these are going to be whizzing past at any rate (while you fire lasers at things in a giant mech), so it hardly matters that much for the moment
octtrees are good for static objects, any comparable structures available for dynamic/moving objects/models ?
[QUOTE=Zyx;45707446]Some of you might remember some time ago, when I made a post here about auto liking everyone on a dating site? I decided to try again, but this time with the ever so popular Tinder mobile app. [B]Step one:[/B] Look at the web requests. Luckily for me, I still had Charles, and it was just set my pc as my phones proxy and go like some people on Tinder. After further studying the requests, there was next to no security. Only an authentication token was added in the headers - And it was the same every single time. Perfect! [B]Step two:[/B] Understanding the web requests. There are two requests. A "Give me my next batch of users" and a "Like this user". Both requests responds with JSON text, so that's really easy. [B]Step three:[/B] Automating the shit out of it! Fast forward 1½ hour later, a program was born. You just feed in your authentication token at the top, and keep clicking the button until the cows come home. [B]Step four:[/B] Tell the world! [img]https://dl.dropboxusercontent.com/u/99717/TinderAuto.png[/img][/QUOTE] isn't that like super embarrassing if you see someone you know
[QUOTE=hexpunK;45710180]I've been working in VB6 for the first time ever for the last 7 weeks now. I was hired for this internship to work in F# and C# stuff for the company's backend system, but instead they've been giving proper intern tasks such as "write a program to monitor our dev environment servers in realtime, we want to know if its the load balancer or the server playing up" and "fix this 10 year old VB6 app because Win7 broke the fuck out of it". I forgot 10 years ago comments didn't exist in code, because as far as I can tell that's the only reason the VB6 thing would have zero comments! It does some black magic with COM, but it's so half arsedly written that I can only just about work out what it does by breaking it purposefully. VB6 is fucking weird. I miss my OO.[/QUOTE] And to think there are people on the Visual Studio Uservoice page demanding that MS bring VB6 back: [url]http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/6008370-bring-back-classic-visual-basic-an-improved-versi[/url]
[QUOTE=Downsider;45712296]isn't that like super embarrassing if you see someone you know[/QUOTE] They only get notified that you liked them if they liked you. So it would just be mutual embarrassment?
Reading VB6 is verbally equivalent to chanting the spell of summoning for Lucifer. setus shun equalis new addis inus inst
[QUOTE=Sidneys1;45703250]I've been working more on my Batch Image Processor lately. Shopped around for a solution to allow me to show the shell menu for images, found something nice and now you can shift+right click on an image (either in the tree view or the grid view) to display that. Also made the app able to react to file system changes like file renames, edits, and (eventually) deletions. Finally added some tooltips to the tree view so it's easier to tell what image belongs to what name as well. UI is about 75% complete, and I'm already planning features for version 2... Trying not to get ahead of myself. [img]https://imagizer.imageshack.us/v2/1280x720q90/540/9po4uu.png[/img] [img]https://imagizer.imageshack.us/v2/477x340q90/742/G0Ea4T.png[/img] All the UI needs now is the options panes, default right-click menus, and open folder/file dialogs! Then I have to write the image processing backend *shudders* As far as my other project (the Minecraft entity "summon" command generator) it's pretty much feature-complete, just need to implement all the different entities. Already planning a v2 that allows me to wrote XML files for the entities instead of hard-coding them. still fairly proud of the level of reflection, the options panels are entirely generated at run-time by reflecting on the entities' class properties. :D [img]https://imagizer.imageshack.us/v2/800x655q90/910/HrXhNb.png[/img] Sorry about all the images... I believe I heard that thumbnails/links are discouraged? Also, don't mind the green numbers, ShadowPlay is a bitch.[/QUOTE] Why is there JPEG artifacting on a PNG image?
[QUOTE=SteveUK;45712440]And to think there are people on the Visual Studio Uservoice page demanding that MS bring VB6 back: [url]http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/6008370-bring-back-classic-visual-basic-an-improved-versi[/url][/QUOTE] I saw that when I was looking up something to do with older ADO stuff I think. The only thing it confirmed for me is that the VB6 community are probably serial killers in waiting, the second MS drop the VB VM shipped with Windows, it's game over.
It's a jpeg with a png file extension
[QUOTE=COBRAa;45712657]Why is there JPEG artifacting on a PNG image?[/QUOTE] Because imageshack is shit and converts all uploads to JPG, but keeps "png" in the file name/URL =P If you hit "save images as" it'll show jpg. I really ought to switch my image host, but I've been using imageshack forever... Any suggestions?
Never use imageshack and you should cry if you use it again.(i'm so harsh pls forgive but imageshack really is the devil) Use imgur.
[url]http://pomf.se/[/url]
[QUOTE=raccoon2112;45710977][img_thumb]https://dl.dropboxusercontent.com/u/22771846/spacerevenge.png[/img_thumb] Aliens ate your grandma. It's time for revenge.[/QUOTE] I don't know if this is already included in your languages library, but if it's not, what was your algorithm to have bullets shot directly at the player instead of at right angles/45 degree angles? for example, I tried calculating the slope of the two points between the enemy and the player, but if the slope was a decimal, it would have issues because I can't tell something to move 2.69 pixels away, only 2. It would then ultimately miss even if the player was standing still since it would automatically become a whole number
[QUOTE=Lumaio;45706976]Someone just needs to make an online multiplayer version of this now :v: [editline]16th August 2014[/editline] Also, this is awesome.[/QUOTE] I'd have to have a server for that unless I forced people to forward their ports for it :v: I think anyways. I've done extremely little research into network programming. Tell me if I'm wrong. [editline]16th August 2014[/editline] [QUOTE=proboardslol;45712945]I don't know if this is already included in your languages library, but if it's not, what was your algorithm to have bullets shot directly at the player instead of at right angles/45 degree angles? for example, I tried calculating the slope of the two points between the enemy and the player, but if the slope was a decimal, it would have issues because I can't tell something to move 2.69 pixels away, only 2. It would then ultimately miss even if the player was standing still since it would automatically become a whole number[/QUOTE] You can store locations and velocities as floats or doubles and just cast them as ints for rendering.
[QUOTE=Dr. Evilcop;45712963]I'd have to have a server for that unless I forced people to forward their ports for it :v: [editline]16th August 2014[/editline] You can store locations and velocities as floats or doubles and just cast them as ints for rendering.[/QUOTE] Can you give me a small example to illustrate what you mean?
[QUOTE=proboardslol;45712945]I don't know if this is already included in your languages library, but if it's not, what was your algorithm to have bullets shot directly at the player instead of at right angles/45 degree angles? for example, I tried calculating the slope of the two points between the enemy and the player, but if the slope was a decimal, it would have issues because I can't tell something to move 2.69 pixels away, only 2. It would then ultimately miss even if the player was standing still since it would automatically become a whole number[/QUOTE] Use floats for positioning because you will end up needing to use subpixels; either that or use bresenham [editline]16th August 2014[/editline] When rendering, use (int)pos.x, (int)pos.y Of course; what language are you using?
[QUOTE=Map in a box;45713016]Use floats for positioning because you will end up needing to use subpixels; either that or use bresenham [editline]16th August 2014[/editline] When rendering, use (int)pos.x, (int)pos.y Of course; what language are you using?[/QUOTE] It doesn't really matter to me what language it's implemented in; I'm just interested in the algorithm. of course that can change from language to language, but I think anything in the C family would suffice for sake of example also thank you for saying Bresenham! I'd never heard of that before and I'm now looking into it!
[QUOTE=proboardslol;45713009]Can you give me a small example to illustrate what you mean?[/QUOTE] While rendering is dependent on the actual pixels on-screen, locations are not. I can store an object's location and velocity as float variables which allows me to use decimal values. When it comes time to render the image, I can cast the location to an integer variable. The ship may be rendered up to a pixel off from its "actual" position, but it's extremely unlikely the player will notice. There's no real "algorithm" to it other than casting the location to an integer value for rendering.
[QUOTE=Dr. Evilcop;45713101]While rendering is dependent on the actual pixels on-screen, locations are not. I can store an object's location and velocity as float variables which allows me to use decimal values. When it comes time to render the image, I can cast the location to an integer variable. The ship may be rendered up to a pixel off from its "actual" position, but it's extremely unlikely the player will notice. There's no real "algorithm" to it other than casting the location to an integer value for rendering.[/QUOTE] Oh that makes a lot of sense. So how would you deal with velocity? if, for example, the slope is like 7 in one instance and 2 in another, how do you tell the object to only move at the speed of 1 unit per second, regardless of slope?
Every beginner's programming class needs a lesson on how to Google.
[QUOTE=proboardslol;45713243]Oh that makes a lot of sense. So how would you deal with velocity? if, for example, the slope is like 7 in one instance and 2 in another, how do you tell the object to only move at the speed of 1 unit per second, regardless of slope?[/QUOTE] Not quite sure if I'm understanding your example correctly. If I understand what you're saying, then that has to do with your timestep more than velocity. [editline]16th August 2014[/editline] Actually I think I get what you're saying now. In programming slopes aren't generally represented by the old y = mx+b way you learn in math class. Typically, velocity is stored in two separate variables - horizontal velocity and vertical velocity. Thus, you could update your object like so (not accounting for the timestep): xPos += xVeloc; yPos += yVeloc; If xVeloc is set to 5, your object will be moving at five units per frame on the horizontal axis in the east direction. Negative numbers will move west. If yVeloc is set to 2, it will move north at two units per second, and so on. Finally, if yVeloc were 2 and xVeloc were 5, you'd have a slope of 2 over 5, or 0.4. The "speed" question you asked is why using separate horizontal and vertical velocity variables rather than a single slope variable is important - If xVeloc were 4 and yVeloc were 10, you'd still get the same slope of 0.4. However, the object is moving faster at 4 units east per frame and 10 units north per frame. So it's the same slope, but at a different speed.
[QUOTE=proboardslol;45713243]Oh that makes a lot of sense. So how would you deal with velocity? if, for example, the slope is like 7 in one instance and 2 in another, how do you tell the object to only move at the speed of 1 unit per second, regardless of slope?[/QUOTE] you'll need to get the delta of the time between frames, here are some good links on the subject [url]http://gafferongames.com/game-physics/fix-your-timestep/[/url] [url]http://gamedev.stackexchange.com/questions/1589/fixed-time-step-vs-variable-time-step[/url] [editline]16th August 2014[/editline] unless I misunderstood what you're asking
[QUOTE=proboardslol;45713243]Oh that makes a lot of sense. So how would you deal with velocity? if, for example, the slope is like 7 in one instance and 2 in another, how do you tell the object to only move at the speed of 1 unit per second, regardless of slope?[/QUOTE] use velocity X and Y, not slope :V Then you can normalize it properly
[QUOTE=Bumrang;45713390]unless I misunderstood what you're asking[/QUOTE] I [i]think[/i] he was asking how to move along the same slope at different speeds, which I answered above. Timestep theory isn't generally taught in beginner programming lessons :v:
Timesteps are really easy to grasp in like 5min so once you learn them that might help you like he said :V
[QUOTE=Map in a box;45713455]Timesteps are really easy to grasp in like 5min so once you learn them that might help you like he said :V[/QUOTE] Yeah timesteps are pretty important in the subject too :v: In any case proboard, questions like this go in [url=http://facepunch.com/showthread.php?t=1250528]this thread[/url] from now on. Read up on those timestep links that Bumrang posted, too.
Sorry, you need to Log In to post a reply to this thread.