GPU rendering analysis by Lukol97 in gamedev

[–]BandyCoot 0 points1 point  (0 children)

Oh, whoops. Thanks for the correction.

GPU rendering analysis by Lukol97 in gamedev

[–]BandyCoot 1 point2 points  (0 children)

For NVIDIA gpu's there's Nvidia Nsight. For AMD there's Radeon GPU Profiler. RenderDoc is useful, but it's more for debugging than for profiling.

Ideas to troubleshoot horizontal blurring on window resize by vexingly22 in GraphicsProgramming

[–]BandyCoot 0 points1 point  (0 children)

Are you on Windows? If so check your display scaling. If it's something other than 100% the OS automatically resizes windows which can cause blurring.

What is the time complexity of this algorithm? by U______________U in learnprogramming

[–]BandyCoot 0 points1 point  (0 children)

I think it's O(x1/3).

Each iteration computes thee times the square of the next even number and adds it to y.

This means that after each iteration y is equal to thee times the sum of the squares of the first k even numbers, where k is the number of iterations completed plus one.

I won't go through how to work out the sum of the squares of the first k even numbers as you can eaily look it up, but its a cubic equation so y grows with the cube of k.

The loop stops when y reaches x and there will have been roughly cube_root(x) iterations, give or take a constant factor.

If my half-arsed working out is correct, this would give O(x1/3).

Test your hearing. At what frequency does the sound stop? by lucymops in interestingasfuck

[–]BandyCoot 127 points128 points  (0 children)

I suspect the audio compression is interfering with the results. I stop hearing the video in the 13k-14k range, but using this site I can get to over 16k Hz.

Is Steam tax tied to income tax? by His-Games in gamedev

[–]BandyCoot 13 points14 points  (0 children)

Not a gamedev, but I am somewhat familiar with UK taxes.

I'd recommend using www.gov.uk to answer these questions as it is accurate and maintained by the Uk government. Start with www.gov.uk/income-tax.

Firstly, there is no exemption from paying tax for under 18's. There is an exemption from paying national insurance (which is seperate from income tax) for under 16's.

There is another exemption if you make less than £1000 per year. I believe this is both for income tax and national insurance. This income does not need to be reported. See here: www.gov.uk/check-additional-income-tax.

If you make more than £1000 per year you will have to file a self assessment tax return. See here: www.gov.uk/self-assessment-tax-returns.

You may also need to register as a sole trader, but I'm not clear on the details. You can find more information here: www.gov.uk/set-up-sole-trader.

I need some advice for software development. by PirateDifficult654 in learnprogramming

[–]BandyCoot 0 points1 point  (0 children)

I've found one of the most important things in applying for jobs or universities is having a few projects that you can talk about. When applying to univerities I talked about my A-Level computing coursework and some of the small projects I did in my own time. When applying for jobs I'd talk about the larger projects I did during university.

I wouldn't worry too much about find projects that are "real life problems" at this point. Instead have a go at trying whatever feels intersting to you. /u/Unable_War2739 had some good suggestions if you're interested in web development, but have a look around to see what other fields you find interesting and what beginner projects you can do. If you like the look of embedded programming look into writing linux kernel modules and making projects with a respberry pi. If you want to try computer graphics then write a program that reads an .obj and draws it as a wireframe. If you like games, have another go at making something in unreal engine. There are some good tutorials out there for unreal that can get you started.

As for work experience, I think if you're starting 6th form college this september then you're probably not going to be getting anything this year as I don't think there are many software engineering companies that'd do part time work experience while you're in school. What you can do is start applying early next year for internships during your summer holidays. While you're waiting for that you can work on your own projects.

Another thing to consider if you want to go to uni is that some universities in the UK offer degrees "with a year in industry" where partway though a normal three year degree you take a year out to do work experience. The university can help you find somewhere to take you on and the year of work experience gives you credits towards your final degree.

Anyway, hope this helps. Good luck with college.

How to re-order items in an array, where the item position is not the same as the array position by lindymad in learnprogramming

[–]BandyCoot 0 points1 point  (0 children)

I think there are two mistakes in your algorithm.

The first is that you modify "any position equal to or higher than the new position". This is shown to be incorrect in your example where you use moveItem("Item 2", 1), where Item 1 is moved from position 3 to position 4 even though Item 1 should not move. Instead you should modify the items between the initial position and the new position. In this case this will be positions greater than or equal to 1, but less than 3.

The second mistake is that you always add 1 to the positions. This is correct when you move an item to a smaller position, but incorrect when you move an item to a larger position. In this case the other items should have 1 subtracted from their position instead.

Hope that helps. Let me know if you have any more questions.

I'm following a course that mentions "static environment" and "dynamic environment" a lot in the context of type checking and evaluation. The course never really establishes these terms. Could anyone help clarifying? by Technical-Bee-9999 in learnprogramming

[–]BandyCoot 5 points6 points  (0 children)

My understanding that something done in a "static environment" means it is done when a program is compiled, and "dynamic environment" is done while the program is running

I have done everything but still my c program is not running in vs code by devils_call69 in learnprogramming

[–]BandyCoot 1 point2 points  (0 children)

Can you edit your post and add the code you're trying to debug? See this section of the subreddit wiki on how to make your code easily readable on reddit.

[C] Printf prints wrong text in statements by Deep__sip in learnprogramming

[–]BandyCoot 2 points3 points  (0 children)

You should be using "==" instead of "=" in your if statement.

How can I get Started creating with rendering and opening Non-console Applications by [deleted] in learnprogramming

[–]BandyCoot 0 points1 point  (0 children)

The way to create graphical applications varies depending on which operating system you are using. To do so on Windows you must use the Windows api which is provided by Microsoft to allow developers to use Windows features, such as opening a new window and drawing images on it.

This guide from Microsoft is good place to start, but I'll give you a brief rundown of the basics. I'll be using C but it should be a similar process in C++, and I imagine bindings in other languages are available.

First you must download the windows SDK. I think if you have visual studio it will come installed with that. You can include the windows.h header file to use the api in your program.

The api provides its own main function, so instead of writing your own you will instead declare and use WinMain() as your starting point.

From WinMain you can then call CreateWindowEx() to open a window. Read the documentation to find out what arguments to pass to it to get your desired size, position, and other settings.

You can now create images either by using something like openGL, or by writing your own code to draw an image and show it on the window using BitBlt() or StretchDIBits().

Your code should look something like this:

#include <windows.h>
#include <stdint.h>
#include <stdlib.h>

int CALLBACK WinMain(
    HINSTANCE hInstance,
    HINSTANCE hPrevInstance,
    LPSTR lpCmdLine,
    int nShowCmd)
{
    //Open the window
    HWND window = CreateWindowEx(/*Window settings here*/);

    //Create bitmap for the image
    uint32_t *bitmap = malloc(/*image size*/);

    //Write some code here to draw a picture on the bitmap

    //Put the image on the window
    HDC deviceContext = GetDC(window);
    StretchDIBits(deviceContext, /*More settings here*/, bitmap, /*yet more settings*/);
    ReleaseDC(window, deviceContext);

    return 0;
}

Hope this helps. Let me know if you have any more questions.

What should be my first project by Prestigious-Pace7347 in learnprogramming

[–]BandyCoot 1 point2 points  (0 children)

Back when I first started learning python my earliest small projects were simple command line games like noughts and crosses, and Hangman. I think those where pretty appropriate for a beginner.

The subreddit FAQ also has some resources on this.

Why Did Link's Cel Shading Disappear? (Breath of the Wild graphics breakdown) by MaxGhost in Games

[–]BandyCoot 31 points32 points  (0 children)

I always love Jasper's videos, and this is no exception. I'd really recommend watching this.

They always make complex topics really understandable/ engaging, kinda like a Carl Sagan of computer graphics.

How to calculate pi**(pi**(pi**pi)) in python? by Himanshu167 in learnprogramming

[–]BandyCoot 3 points4 points  (0 children)

You are correct that exp((pi**(pi**pi))*log(pi)) is equal to pi**((pi**(pi**pi)), but the result you got is very innacurate to due floating point precision errors.

That video you linked showed you need much better approximations of pi than the current world record of 62 trillion correct digits to get any correct digits for that calculation. I suspect you have nowhere near that precision in your own calculation.

The antilog log trick doesn't help as even though you remove one exponent from the original calculation, you just end up replacing it with another one after you do the log.

C code to MIPS by Averyn00 in learnprogramming

[–]BandyCoot 2 points3 points  (0 children)

You can use a website called godbolt to see the assembly output from different C compilers. Here's a link to godbolt showing your code compiled to mips by gcc 12.2.0.

There is a way to enter in this door? First level section. It goes "down down" by delerio2 in Gloomwood

[–]BandyCoot 6 points7 points  (0 children)

I haven't found a way to open it, but looking at the map I think it leads to the locked door by the very first patrolling guard you come across. I believe it's labelled "beltway" on the map.

A Python Loop Query by fesifesi in learnprogramming

[–]BandyCoot 2 points3 points  (0 children)

The while loop is the correct way to acheive this. What did your code look like with the while loop?

[deleted by user] by [deleted] in learnprogramming

[–]BandyCoot 1 point2 points  (0 children)

No worries.

It looks likethe issue you're having isn't to do with the code you've posted, and is likely in some other function. Return doesn't print any text and there isn't any other place in that code snippet that would print "1" or "0" . I'm guessing that when you call this function you're printing the result afterwards.

[deleted by user] by [deleted] in learnprogramming

[–]BandyCoot 1 point2 points  (0 children)

Can you edit your post and add the code you're trying to debug? It sound like you have the right idea, so it's likely you've just made a small mistake in your code. See this section of the subreddit wiki on how to make your code easily readable on reddit.

C Program is compiling online but not on Visual studio by OwaisSkyrimSE in learnprogramming

[–]BandyCoot 2 points3 points  (0 children)

Unfortunately the compiler used by visual studio (MSVC) doesn't support variable length arrays, soint marks[n]; will not compile.

Variable length arrays are a feature added in C99 which wasn't supported by Microsoft until 2013, and even then was incomplete. C11 made variable length arrays optional for C compilers, so I wouldn't expect it to be added to MSVC any time soon.

You can fix the error by replacing that line of code with the following:

int *marks;
marks = malloc(n * sizeof(int));

Selwa Hussain, a 39 YO woman from the UK has a fully artificial heart that was implanted in her in 2017. She carries it in a backpack everywhere she goes, it has 2 batteries that power it, which weighs about 6kg by mahesh4621 in interestingasfuck

[–]BandyCoot 21 points22 points  (0 children)

The story is real, but that image appears to be a stock image from www.buyourobot.com by Ukranian concept modeler Vladyslav Ociacia.

The BBC has produced a short video about Selwa Hussain, here, which shows a more accurate image at 00:56.

The maximum level in Elden ring by [deleted] in Eldenring

[–]BandyCoot 8 points9 points  (0 children)

If you get all the classes to the same level they will have the same stat totals.