[QUOTE=paindoc;52219209]crash during release mode.[/QUOTE]
I pretty much always run in release to avoid dealing with the situation where debug works and release doesn't and you have no idea why.
[QUOTE=alien_guy;52224400]I pretty much always run in release to avoid dealing with the situation where debug works and release doesn't and you have no idea why.[/QUOTE]
I can't remember what it is but there's some compiler setting or warning level to indicate uninitialised variables.
I've come to always set an initial value since chasing one too many bugs caused by this. If the cost of setting the initial value is too great you've done something wrong. Plus by now any optimisers should optimise out an unused initial value, or setting to a value that isn't used.
For example the following
[code]
int foo = 1;
...
foo = 10;
...
[/code]
Would become equivalent to
[code]
...
int foo = 10;
...
[/code]
[QUOTE=Facepalm Man;52224558]I can't remember what it is but there's some compiler setting or warning level to indicate uninitialised variables.
I've come to always set an initial value since chasing one too many bugs caused by this. If the cost of setting the initial value is too great you've done something wrong. Plus by now any optimisers should optimise out an unused initial value, or setting to a value that isn't used.
For example the following
[code]
int foo = 1;
...
foo = 10;
...
[/code]
Would become equivalent to
[code]
...
int foo = 10;
...
[/code][/QUOTE]
I still don't quite understand why people don't initialize variables to what they're going to be from the start, either. It makes more sense to me to set it to whatever you're going to need from the get-go and be done with it. Needless to say it makes following certain tutorials (as I'm still learning) somewhat more difficult to follow.
[QUOTE=Zero-Point;52224586]I still don't quite understand why people don't initialize variables to what they're going to be from the start, either. It makes more sense to me to set it to whatever you're going to need from the get-go and be done with it. Needless to say it makes following certain tutorials (as I'm still learning) somewhat more difficult to follow.[/QUOTE]
Usually it's done in cases when the variable needs to be in an outer scope when the data it gets set to is in an inner scope.
[QUOTE=Ott;52224623]Usually it's done in cases when the variable needs to be in an outer scope when the data it gets set to is in an inner scope.[/QUOTE]
Even then, the compiler shouldn't throw a warning if the variable is initialised properly.
If it's only conditionally initialised, then the better fix is to add more scopes if that's really necessary to get rid of the warning.
[QUOTE=Ott;52224623]Usually it's done in cases when the variable needs to be in an outer scope when the data it gets set to is in an inner scope.[/QUOTE]
It still costs nothing measurable to just set everything to default values, and there's usually a better way to express such logic anyway.
The issues I often see is that the first implementation of the code is correct, but then the code changes, for example another 'else if' is added which doesn't account for the variable and then boom. Hard to reproduce edge-case bug.
Not having to initialise all variables is something I put to backwards compatibility when it actually might have mattered for performance in the 90's. And you wouldn't want old code to break would you?
I often dream of a strict C++ compiler which only allows C++11 onwards standard.
Sometimes there's no good default value.
[editline]13th May 2017[/editline]
And sometimes it does cause something measurable to default initialize everything.
[QUOTE=WTF Nuke;52224766]Sometimes there's no good default value.
[/QUOTE]
Zero is usually good. Or {} for a struct. Anything is better than whatever junk your compiler uses for uninitialised values, because then you can at least debug your code consistently with release.
[QUOTE]
[editline]13th May 2017[/editline]
And sometimes it does cause something measurable to default initialize everything.[/QUOTE]
Those are a special case and not the norm. And in those cases yes, do what is necessary to ensure maximum speed but be very damn careful that your code is correct.
My best advice is that assume the code is not such a bottleneck and be safe and readable first, and optimise later when you've identified the expensive parts of your code.
No arguments about it being a good idea most of the time, but I was just trying to say that backwards compatibility is not the only reason you can have uninitialized values.
[QUOTE=WTF Nuke;52224821]No arguments about it being a good idea most of the time, but I was just trying to say that backwards compatibility is not the only reason you can have uninitialized values.[/QUOTE]
Fair. There's always a reason for most things still allowed in C++, but my point is in this case they're not the majority.
My way of advice is to assume this would be a premature optimisation until you prove an actual bottleneck. When you know it is performance critical in your specific case then yes do whatever is necessary.
PSA: Don't update VS 2017 from 15.1 to 15.2 (26430.6) as the TeamExplorer package (does anyone actually use that?) is fucked and it will brick your install. Reinstalling also doesn't work because the package stops the install finishing.
[QUOTE=helifreak;52225087]PSA: Don't update VS 2017 from 15.1 to 15.2 (26430.6) as the TeamExplorer package (does anyone actually use that?) is fucked and it will brick your install. Reinstalling also doesn't work because the package stops the install finishing.[/QUOTE]
Hasn't happened to me, what workloads do you have installed?
And thanks for the input on that bug, that helps clarify quite a bit more. Also, when it comes to uninitialized values that why the "auto" keyword can be so nice, since it forces you to actually initialize the object. The only problem I have with vulkan in that regard is primarily that some of the create info structs are so huge and populated that it's [I]really[/I] easy to miss something. Looking at you, Mr. "vkGraphicsPipelineCreateInfo" ([U]10[/U] pointers to other info structs, some of which have 12-13 fields)
[QUOTE=paindoc;52225177]Hasn't happened to me, what workloads do you have installed?[/QUOTE]
I had universal apps, .NET desktop, desktop C++, ASP.NET & Web, Python, C++ for Linux, and .NET Core.
Got it to work after nuking the package cache in program data and unticking universal apps. Doubt it's related to the universal apps.
I'd say their servers just sent a corrupted package and they didn't bother putting hash checks in place.
i have a quite strange behavior with vulkan ...
on my desktop machine it runs fine... (amd 480rx)
on my notebook it first shows the output in the window, then freezes the whole machine and whole screen becomes black ... (amd apu with radeon 8200)
my first idea was that the driver could be outdated but nope... new one also crashes...
thx amd!
why dumb ? even the cube demo crashes on that machine so it must be a driver issue.
[QUOTE=Pappschachtel;52226904]i have a quite strange behavior with vulkan ...
on my desktop machine it runs fine... (amd 480rx)
on my notebook it first shows the output in the window, then freezes the whole machine and whole screen becomes black ... (amd apu with radeon 8200)
my first idea was that the driver could be outdated but nope... new one also crashes...
thx amd!
why dumb ? even the cube demo crashes on that machine so it must be a driver issue.[/QUOTE]
Does your GPU even support vulkan? I don't think it does.
[QUOTE=helifreak;52225087]PSA: Don't update VS 2017 from 15.1 to 15.2 (26430.6) as the TeamExplorer package (does anyone actually use that?) is fucked and it will brick your install. Reinstalling also doesn't work because the package stops the install finishing.[/QUOTE]
Recently did that update path, think you got unlucky?
[QUOTE=Pappschachtel;52226904]i have a quite strange behavior with vulkan ...
on my desktop machine it runs fine... (amd 480rx)
on my notebook it first shows the output in the window, then freezes the whole machine and whole screen becomes black ... (amd apu with radeon 8200)
my first idea was that the driver could be outdated but nope... new one also crashes...
thx amd!
why dumb ? even the cube demo crashes on that machine so it must be a driver issue.[/QUOTE]
[QUOTE=mastersrp;52227115]Does your GPU even support vulkan? I don't think it does.[/QUOTE]
list of Vulkan compatible AMD products directly from AMD's website:
AMD Radeon™ R9 Series graphics
AMD Radeon™ R7 Series graphics
AMD Radeon™ R5 240 graphics
AMD Radeon™ HD 8000 Series graphics for OEM systems (HD 8570 and up)
AMD Radeon™ HD 8000M Series graphics for notebooks
AMD Radeon™ HD 7000 Series graphics (HD 7730 and up
AMD Radeon™ HD 7000M Series graphics for notebooks (HD 7730M and up)
AMD A4/A6/A8/A10-7000 Series APUs
AMD A6/A8/A10 PRO-7000 Series APUs
AMD A6/A8/A10/FX™ 8000 Series APUs
AMD E1/A4/A10 Micro-6000 Series APUs
AMD E1/E2/A4/A6/A8-6000 Series APUs
AMD A4-1200, A4-1300 and A6-1400 Series APUs
AMD E1-2000, E2-3000, A4-5000, A6-5000, and A4 Pro-3000 Series APUs
The Radeon 8200 probably doesn't support Vulkan even though it belongs to the 8000 series(? I can't find it listed, the 8000 series starts at 83xx afaik). I wouldn't call Pappschachtel dumb for not knowing that but I would say it answers the question.
What's the exact model of APU in your notebook?
Somehow when trying a cube map skybox + sphere with skybox reflections demo last night, I managed to fuck up as hard as one possibly can:
- the sphere was as big as a skybox should be, and was turned inside out so that the texture faced inwards
- the skybox was tiny, and the mesh was inside out in that weird way things are when back-face culling is set incorrectly
- despite making sure to make the small tweaks to the various matrices required to render, all of the input is still mirrored
I'm not sure how I did that, but I think I'm going to just skip this example :v:
[editline]14th May 2017[/editline]
AND gpus have weird queue family setups
[QUOTE=paindoc;52227518]Somehow when trying a cube map skybox + sphere with skybox reflections demo last night, I managed to fuck up as hard as one possibly can:
- the sphere was as big as a skybox should be, and was turned inside out so that the texture faced inwards
- the skybox was tiny, and the mesh was inside out in that weird way things are when back-face culling is set incorrectly
- despite making sure to make the small tweaks to the various matrices required to render, all of the input is still mirrored
I'm not sure how I did that, but I think I'm going to just skip this example :v:
[editline]14th May 2017[/editline]
AND gpus have weird queue family setups[/QUOTE]
I like my skyboxes to be planes.
[QUOTE=F.X Clampazzo;52227510]list of Vulkan compatible AMD products directly from AMD's website:
The Radeon 8200 probably doesn't support Vulkan even though it belongs to the 8000 series(? I can't find it listed, the 8000 series starts at 83xx afaik). I wouldn't call Pappschachtel dumb for not knowing that but I would say it answers the question.
What's the exact model of APU in your notebook?[/QUOTE]
It seems to be really hard to tell if Vulkan/DX12 works on older gpu's (GeForce GTX 560M in my case). Everywhere I check, including [url=http://www.geforce.com/hardware/notebook-gpus/geforce-gtx-560m/specifications]Nvidia's site[/url] says I support DX12 but even on the latest drivers DX12 throws device creation errors.
[QUOTE=helifreak;52225087]PSA: Don't update VS 2017 from 15.1 to 15.2 (26430.6) as the TeamExplorer package (does anyone actually use that?) is fucked and it will brick your install. Reinstalling also doesn't work because the package stops the install finishing.[/QUOTE]
Visual Studio 2017 right now is a hot steaming pile of shit, it has crashed over a 100 times for me in 2 weeks. TeamExplorer and version control is completely broken, project view glitches, and most of my plugins are crashing.
[QUOTE=Llamalord;52227788]Visual Studio 2017 right now is a hot steaming pile of shit, it has crashed over a 100 times for me in 2 weeks. TeamExplorer and version control is completely broken, project view glitches, and most of my plugins are crashing.[/QUOTE]
Stuff like this fascinates me and makes me wonder what went wrong inside the team making it.
[QUOTE=Adelle Zhu;52227814]Stuff like this fascinates me and makes me wonder what went wrong inside the team making it.[/QUOTE]
I think it's just the usual shit with MS' softare. You have to do some stupid shit just to install .net 3.5 on 7/8 and their ""offline"" installer still tries to connect to the internet, so you have to install using DISM with your install CD. There's also vague errors that don't tell you shit and nothing you do could ever fix them.
i was getting burned out of working on my MS Paint game, Bulletin. So I decided to take a few days off to work on something completely different
[t]http://i.imgur.com/KPe3zFv.jpg[/t]
[t]http://i.imgur.com/EXoZJ7kg.jpg[/t]
[t]http://i.imgur.com/sbgYJ4D.jpg[/t]
[t]http://i.imgur.com/2kER0LU.jpg[/t]
[t]http://i.imgur.com/wzkjnep.jpg[/t]
[URL="http://bonickhausen.tumblr.com/post/160307553241"]here's a short video. i don't know how to link tumblr videos.[/URL]
i even gave it a name!
[t]http://i.imgur.com/PcIvG0Z.jpg[/t]
funny thing is, all I used on this game/artsythingy were free assets from the unity asset store, so that weird face you see all over the game is actually just a julius caesar bust i found on the first page of the free assets page on the asset store lol
It'd be an action-puzzle-FPS-platformer heavily inspired by HL1 mods such as Half-Quake and Afraid of Monsters: Director's Cut. I managed to make a character controller that handles just like HL1's character controller, with air strafing and all that jazz. Had to come up with my own raycast collision system for that.
But now the burnout is over and I'm back at Bulletin. I wish I had more time to work on both projects simultaneously, but oh well. It's already bad enough as it is: staying at college from 6 AM to 1 PM, then at work till 8 PM, then homework and lo and behold it's already 10 PM. I'm not getting much sleep but I believe that there's no other way around it. Gotta find some time to work on the game i guess.
Anyway, enough ranting! here are some new bulletin screenshots:
[t]http://i.imgur.com/d8Tx7pD.png[/t]
[t]http://i.imgur.com/zKUoFyi.png[/t]
[t]http://i.imgur.com/4gtYHbA.png[/t]
[t]http://i.imgur.com/vakdbc7.png[/t]
[t]http://i.imgur.com/dDixgFc.png[/t]
[t]http://i.imgur.com/Zi9O0fn.png[/t]
[t]http://i.imgur.com/xcKAL0N.png[/t]
I spent the last few days optimizing the shit out of the game. One of my main problems is the fact that I want to have high quality pixel perfect realtime shadows for everything in the game, and that's not really an easy task.
I also spent some time studying and writing some more dialog. I think I'm getting the hang of it.
Thing is, I failed: I had established that I'd release the game's demo on June and a kickstarter campaign on July, but that's not going to happen. I'm not getting enough time to work on the game so I'm gonna have to push that back to December. So... yeah.
[QUOTE=JohnnyOnFlame;52224258]Got a better image!
[t]http://i.imgur.com/8H5pvdc.png[/t]
Also a star scoreboard:
[img]http://i.imgur.com/cc21xEf.png[/img]
I'm so glad I enrolled in this elective, learned a bunch about web apis and stuff. Had fun too.[/QUOTE]
That doesn't seem right. Doesn't Berkin have more than a thousand stars from Rant?
[img]http://carp.tk/$/firefox_2017-05-14_23-09-05.png[/img]
So... is that a mouth or a nose?
[QUOTE=Tamschi;52228313]That doesn't seem right. Doesn't Berkin have more than a thousand stars from Rant?[/QUOTE]
Stars are only accounted if they were given by someone inside the sampled network, otherwise they're dropped.
[editline]14th May 2017[/editline]
Hence why the majority have very little stars.
Because the driver doesn't know that it's not working, as far as it knows it works, except clearly it doesn't. Driver problems are hell imo, especially with older hardware.
[QUOTE=cartman300;52228329][img]http://carp.tk/$/firefox_2017-05-14_23-09-05.png[/img]
So... is that a mouth or a nose?[/QUOTE]
yes
Sorry, you need to Log In to post a reply to this thread.