pouët.net

Go to bottom

Easy lookup/access to members in "an array" of different datatypes if possible

category: code [glöplog]
rudi, have you tried using
Code:const
?
added on the 2012-02-14 16:32:32 by sagacity sagacity
Oh GOD, you are over-engineering, rudi. Just stop. Forget your "neat" idea. It's not neat at all.
added on the 2012-02-14 16:48:28 by kusma kusma
Maybe it's not the answer you're looking for and it may seem obvious but you don't need a demoengine to make a demo, especially not if (from what I understand) you haven't coded any yet.
Make a couple demos first, don't worry about the code being clean and elegant, and with all the knowledge and problems faced design a system that simply will make the process easier. If you do it the other way around you'll waste a lot of time on something that probably won't be of any help because you're facing problems you didn't know that existed in the first place.
The key is what plek said, code what you need, not what you think you may need.

After you've done 2 or 3 demos you'll know exactly what you need, then you can code a demoengine straight to the point and masturbate at the code all you want.
added on the 2012-02-14 16:52:14 by ithaqua ithaqua
ithaqua <3
added on the 2012-02-14 16:53:39 by superplek superplek
i thought std::vector was evil?
kusma: if i managed to get to solskogen we can talk this over a beer.
Quote:
After you've done 2 or 3 demos you'll know exactly what you need, then you can code a demoengine straight to the point and masturbate at the code all you want.

ithaqua: how many demos do you think ive coded in the past? forget about the crappy quality. i know what i need, i need this. you are funny man! i won't face any problems with my idea. the only problems i can think of is the compiler and syntax itself!
added on the 2012-02-14 17:40:00 by rudi rudi
so now you're taking on ithaqua as well? you don't really know when to stop, do you? :)
added on the 2012-02-14 17:40:58 by superplek superplek
right now, ill stop. because im hungry for pizza. cu later.
added on the 2012-02-14 17:43:11 by rudi rudi
not a pro in c++. i can barely handle that dynamic cast stuff. but I'd think that construct might work if the compiler stays awake. but i think those scattered pointer arithmetics and memory accesses from the variable index to the value might kill the performance. I'd not do it like that. some good allocated structs and types that have a good size on the cache might be better. they 're controllable and easier to route. maybe I'm even just to dumb to learn extended c-slang and do it the simple way. :/
added on the 2012-02-14 17:46:52 by yumeji yumeji
yumeji: what you're saying makes a *lot* more sense than most of what we've seen here, really.
added on the 2012-02-14 17:52:02 by superplek superplek
holy shit Ithaqua is alive :D
added on the 2012-02-14 17:53:24 by Gargaj Gargaj
ARISE! \o/
added on the 2012-02-14 18:02:56 by Deus Deus
Yeah, then again: People, it's a demo system. Perhaps some stuff is being generated per frame and then the GPU does all the work. And most of you here are talking of vtable overhead, cache misses and branch prediction like any of today's CPUs actually gave the slightest fuck about it. Seriously. In Wz4 we have a bytecode interpreter running _per operator_ (ok, for all ones that have an animation script) every frame and it still comes up at the bottom of the profiler result.

How about optimizing only where it matters because that's also a very important part of the process of making a demo about it. Seriously, should I ever get into demo engine programming again I'd probably do it in C# and do all the demanding stuff in the GPU anyway.
added on the 2012-02-14 19:11:46 by kb_ kb_
(I'd still use a generic container and a base interface instead of what Jcl does tho :D)
added on the 2012-02-14 19:13:28 by kb_ kb_
kb: you're absolutely right. but you can't blame people for reasoning from a professional point of view where such stuff in a huge codebase actually *can* matter, when running your game or what have you on a stupid ppc cpu. especially when people make incorrect statements it's no crime to set the record straight, much like chris pontius did on the russian police.

but again, you're right. demos. i can hardly believe how crappy my early 200s solutions were but hey, it rendered polies (*). tadaa.


* - and avis.
added on the 2012-02-14 19:16:29 by superplek superplek
2000s
added on the 2012-02-14 19:16:37 by superplek superplek
enrique: puta puta puta! ;)
we missed our change to booze in valencia, dammit ;)
Pouetization when you need it. provided by Maali. ;)
added on the 2012-02-14 19:19:24 by raer raer
maal is an ass
added on the 2012-02-14 19:21:30 by superplek superplek
LOOK I DID IT AGAIN
added on the 2012-02-14 19:21:39 by superplek superplek
Quote:
Seriously, should I ever get into demo engine programming again I'd probably do it in C# and do all the demanding stuff in the GPU anyway.


Like struct :)
added on the 2012-02-14 19:39:40 by ferris ferris
Yeah well, I still visit Pouet, it's just that I don't post that often :D
added on the 2012-02-14 19:42:34 by ithaqua ithaqua
i'll go for bisual vasic
added on the 2012-02-14 19:42:46 by superplek superplek
ithaqua! <3
added on the 2012-02-14 19:47:09 by leijaa leijaa

login

Go to top