pouët.net

Go to bottom

64k intro C++ code

category: general [glöplog]
templates vs no templates, c++ vs c... Really, I wouldn't mind at all what coding style I use... 20 kb or 22 kb of code doesn't really make a difference imho, the real problem is how you are going to fill 44k of data. I would not concentrate on megaoptimizing the code, but in writing an intro instead.
added on the 2009-04-27 11:33:28 by iq iq
what iq said.

I have only made a couple of (crappy three-day production) 64k's, but in my first attempt I didn't do anything particularly different than what I've done for demo's apart from not using STL. I had plenty of templates, lots of OOP and so on, but in the end, I didn't have a chance in hell to fill it up with content (it ended up at 40kb).

The problem isn't getting the code size down, it's filling it with (interesting) data.
added on the 2009-04-27 11:41:24 by wb wb
iq: You only have to look at a few recent 1k intros to see what difference those extra 2 kb could make. ;)
added on the 2009-04-27 13:01:01 by doomdoom doomdoom
You'd need a lot of free time to code a 64k like it was a 1k/4k. :p
added on the 2009-04-27 13:03:04 by wb wb
nah, it's not a linear thing. 64k is A LOT more than 16 times 4k. I strongly believe 1k will not make that much difference in a 64k and it's a "waste of time" to start fighting for it before you actually have an intro.
added on the 2009-04-27 13:42:38 by iq iq
i find it better to butcher data, music, graphics, etc. before doing excessive size optimization on code in 64k.
I totally agree with macaw.
added on the 2009-04-27 14:42:34 by decipher decipher
Quote:
templates vs no templates, c++ vs c... Really, I wouldn't mind at all what coding style I use... 20 kb or 22 kb of code doesn't really make a difference imho, the real problem is how you are going to fill 44k of data. I would not concentrate on megaoptimizing the code, but in writing an intro instead.


I *do* concentrate on writting and intro :) Templates are only matter of convenience.

Quote:
I have only made a couple of (crappy three-day production) 64k's, but in my first attempt I didn't do anything particularly different than what I've done for demo's apart from not using STL. I had plenty of templates, lots of OOP and so on, but in the end, I didn't have a chance in hell to fill it up with content (it ended up at 40kb).

Quote:
i find it better to butcher data, music, graphics, etc. before doing excessive size optimization on code in 64k.

I have a complete design of the intro and it will either be exactly 64k or a little over the limit, and I am worried about code size, beacuse I really don't want to throw anything out. Time will show.
added on the 2009-04-27 18:10:32 by vestige vestige
That old saying "pre-mature optimization is the root of all evil" comes to mind. :p

It might be a good idea to just keep the size limit at the back of your head at first, and then adjust stuff along the way (when it comes to code, that is).

You don't know how big the thing will be until you actually do it. ;)
added on the 2009-04-27 18:17:27 by wb wb
post-mature optimization is the leaf of the greatest evil
added on the 2009-04-28 10:42:11 by rmeht rmeht
What Meht said.
added on the 2009-04-28 10:56:27 by torus torus
Two questions:

What about UPX?
And, how do you optimize gcc stuff?

I played with the idea of a 96k game for BP10 and i just dont want to use that compiler made in Redmond. ;)
LOL MICRO$OFT
added on the 2009-04-28 12:10:42 by sagacity sagacity
It's a good compiler, and I'm pretty sure kkrunchy is both better than UPX and not made by evil people either.
added on the 2009-04-28 12:14:55 by Preacher Preacher
upx is not very good any more. use kkrunchy for 64k and crinkler for 4k.
@macaw:
kkrunchy is Wintendo only and so its out.

@Preacher:
vcc is Wintendo only and so its out. ;)

@supersagacity:
Some people use open source out of conviction.
And some people distrust megacorps.
Think about that and then come back with a non-trollish reply.

and some people just want to make demos with the best possible resources and dont give a shit about opensource or not. :)
added on the 2009-04-28 12:35:32 by smash smash
uh-oh, I smell a windows vs. *nx thread emerging!

There are better packers than UPX for linux too, btw. Not that I remember their name though, I am after all a ms slut. :p

However, I do remember checking one out a while ago which surpassed UPX, I'll see if I can find it again.
added on the 2009-04-28 12:38:27 by wb wb
Quote:
Think about that and then come back with a non-trollish reply.


Says the guy who used the word "Wintendo" in the very same post. Twice. Because it's so funny.
added on the 2009-04-28 12:39:17 by kb_ kb_
Quote:
Some people use open source out of conviction.
And some people distrust megacorps.
Think about that and then come back with a non-trollish reply.


Bwahahahahahaha!.... wait.... BWAHAHAHAHAHA!...
added on the 2009-04-28 12:40:05 by Puryx Puryx
@Kontor:
That would be nice, thanks.
Ill try my luck googling it too.

@Kopuli:
Thats reflex. ;)
USE REAL HARDWARE -- COMMODORE 64!
added on the 2009-04-28 12:50:12 by rudi rudi
Quote:
I'm pretty sure kkrunchy is both better than UPX and not made by evil people either.

Muaahaha. Bwahahaaa. BWAHAAhahaah. MUAHAHAHAHAA!!!

Time to stroke my white cat and mumble "now I got them exactly where I want them".
added on the 2009-04-28 13:19:29 by ryg ryg
Quote:
@Kopuli:
Thats reflex. ;)


That makes you a better person HOW exactly?
added on the 2009-04-28 13:20:37 by kb_ kb_
Quote:
Quote:

@Kopuli:
Thats reflex. ;)

That makes you a better person HOW exactly?

I never said that that makes me a better person.
Now get over it already or swing in into some healthy Windows/Linux bashing. :)

@rydi:
Could do that, it would even fit easily into said 96k game compo then, even if the game is mainly made with cc65. I could even run over the binary with exomizer.

login

Go to top