pouët.net

Go to bottom

4k and VC++ 2005

category: code [glöplog]
Why most of the projects related with the demoscene is under VC++ 2005?
I was reading some 1k/4k's source code and they are using VC++ 2005... Is it something about the executable size?
Why not using more recent versions of the VC++?

Sorry if it sounded like a stupid question. I'm just trying to understand the workflow of a 4k prod. And, by the way, if you have some article about it, it would be very helpful.

Thanks in advance
added on the 2011-01-27 18:16:36 by Danguafer Danguafer
Probably just because people are lazy when it comes to upgrading.
added on the 2011-01-27 18:18:02 by kusma kusma
Isn't there any existing article about 4k demo workflow?
added on the 2011-01-27 18:29:57 by Danguafer Danguafer
the work flow of a 4k is pretty straight forward:

1) go here http://www.iquilezles.org/www/material/isystem1k4k/isystem1k4k.htm
2) go here http://4klang.untergrund.net/
3) go here http://www.crinkler.net/
4) code :)
kusma may be about right :)

there are of course some minor differences between compiler versions but that only makes a few bytes. its more important to have the correct compiler options set when creating a 4k.

speaking of which, the compiler option /QIfist has been deprecated since vs2005. Dont know if its still available in e.g. 2010, but i dont think thats a real reason to stick to 2005 :)
added on the 2011-01-27 18:33:46 by gopher gopher
You'll be fine using a more recent version, just be sure to know (as gopher said) your compiler options and set accordingly.
added on the 2011-01-27 18:46:32 by ferris ferris
qifist still gives me warnings when building in the most recent vc++ express - but i think it still works.

random blabla on making 4k
Ferris: Which compiler options should be set accordingly? Any hints, links?

Thanks
Thank you all, it was very welcome. :)
added on the 2011-01-27 19:33:28 by Danguafer Danguafer
No problem!

VS2010:
Config prop's:
- General
- Project defaults
- Character set: not set (reverts to ASCII)
- Whole program optimization: No whole program optimization
- C/C++
- Optimization:
- Optimization: Minimize size (/01)
- Enable intrinsic functions: Yes (/Oi)
- Favor size of speed: Favor small code (/Os)
- Precompiled headers:
- Precompiled header: Not using precompiled headers (not necessary for size, but these are useless for such small projects and will likely only cause trouble)
- Linker
- Manifest file
- Generate manifest: No (/MANIFEST:NO)
- Debugging
- Generate debug info: No

Should be all you need. Afaik, though, iq's frameworks already have proper options set, so you may not need to worry about these at all :)
added on the 2011-01-27 19:45:43 by ferris ferris
apologies, didn't keep the extra spaces I added.

Code: Config prop's: - General - Project defaults - Character set: not set (reverts to ASCII) - Whole program optimization: No whole program optimization - C/C++ - Optimization: - Optimization: Minimize size (/01) - Enable intrinsic functions: Yes (/Oi) - Favor size of speed: Favor small code (/Os) - Precompiled headers: - Precompiled header: Not using precompiled headers (not necessary for size, but these are useless for such small projects and will likely only cause trouble) - Linker - Manifest file - Generate manifest: No (/MANIFEST:NO) - Debugging - Generate debug info: No
added on the 2011-01-27 19:47:57 by ferris ferris
Ah and silly me, forgot the most important one :D

Linker->Input->Ignore all default libraries: Yes (/NODEFAULTLIB)
added on the 2011-01-27 19:49:02 by ferris ferris
Erm...

http://www.iquilezles.org/www/material/isystem1k4k/isystem.zip

The link is broken D:
added on the 2011-01-27 20:20:00 by Danguafer Danguafer
why yes, yes it is :/
added on the 2011-01-27 20:29:02 by ferris ferris
version I have laying around my hd, I hope iq doesn't mind. Keep checking his site though for when it's updated.
added on the 2011-01-27 20:30:44 by ferris ferris
- Optimization: Minimize size (/01)
- Enable intrinsic functions: Yes (/Oi)
- Favor size of speed: Favor small code (/Os)

not neccessarily :)

at least i found out in my projects that it makes the compiler produce code which is far less self similar. the uncompressed filesize is reduced a lot, but after compression it ends up bigger than just disabling optimization completely and let crinkler do its magic.
its always a matter of trial and error, this is my recommendation though:

- Optimization: Disabled (/0d)
- Enable intrinsic functions: Yes (/Oi)
- Favor size of speed: Neither

added on the 2011-01-28 14:58:07 by gopher gopher
In addition to what gopher said, sometimes enabling size-optimisations on Visual Studio makes Crinkler sad. At those times you have two options:
1. Mentor to the rescue.
2. Good luck getting out of the mumbo jumbo of coding for a specific configuration.
added on the 2011-01-28 15:09:49 by decipher decipher
And now! Go make a demo about it, or intro :)
added on the 2011-01-28 16:26:10 by maytz maytz
All: thank you for hints and clarifications:)
Quote:
- Enable intrinsic functions: Yes (/Oi)

Shouldn't that cause the code size to grow?
added on the 2011-01-28 18:12:30 by raer raer
this might be helpful as well.
added on the 2011-01-28 18:28:11 by Defiance Defiance
Rare: Nope. The compiler knows very well about the intrinsics. So, in fact it might take into account the necessities of an intrinsic function, it might inline it by directly embedding the assembly instructions that make up the function, or at extreme cases it might even replace the whole thing with a completely insane code snippet you most likely wouldn't think of. Happened before. :)

The point is, the compiler doesn't need to treat an intrinsic like a function from an unknown library. It's not a black box of voodoo and magic. It's something the compiler knows about like the back of its hand… So to speak.

So, in fact, using intrinsics is more likely to drop the size than to inflate it.
added on the 2011-01-28 19:13:24 by decipher decipher
i am eager to see another one coming!
just keep in mind its for fun!
You´ll have some nice-looking visuals and (maybe) fitting audio infront of you, worth to get released, watched and even rated very soon!
( while the rating is obviously done NOT only by coders, so even if you achieve sth in code never done before you wont get what you deserve, as there are many ppl in the scene that dont code and so they vote on other criterias! never let yourself get into a bad mood due to a bad comment...its alright ;) )

AND: we should implement some sort of STICKY for the BBS for sure ;)
( sorry, garg! )
also, talking about intrinsics:

http://www.xyzw.de/c190.html
Awesome.
added on the 2011-01-28 22:29:10 by raer raer

login

Go to top