pouët.net

Go to bottom

Where to submit opensource demoscene related code?

category: general [glöplog]
Could somebody donate a load_texture function with SDL and OpenGL? :o
added on the 2009-08-13 20:50:11 by pera pera
pera: http://nehe.gamedev.net/ and 2000 other websites have that kind of stuff.
added on the 2009-08-13 20:51:49 by keops keops
kammu: well, to begin with, you should have come to LX++. second, I agree with everyone that states that you should make a demo. you are an excellent musician and if your code is good then ask some gfx dude - we have pretty good ones over here in .pt - and make a bloody demo.

it seems that we have more people interested in the demoscene than sceners themselves. I don't understand why people don't bother to release, specially if they have the skills.

so in short: go make a demo about it.
added on the 2009-08-13 20:53:10 by jeenio jeenio
and the avatar you're using is mine :)
added on the 2009-08-13 20:53:28 by jeenio jeenio
on sources of demos and their engines...

demoscene is one of the few areas where "not invented here" is not an antipattern since it's just all about personal skills and booze.

that's all to why demosceners do not tend to like the opensource community.
keops: I didn't notice the sdl version of lesson 6 :$
added on the 2009-08-13 21:04:56 by pera pera
oh, thanks Pantaloon. I've been searching for that macro, cheers!
added on the 2009-08-13 21:13:45 by Hyde Hyde
np Hyde, i might make this into a monthly macro give away.
added on the 2009-08-13 21:18:12 by pantaloon pantaloon
rulz!
added on the 2009-08-13 21:18:40 by Hyde Hyde
^^ :*)

Optanes: When it comes to actual demos, you are probably right. Although I don't think that your point has anything to do with opensource in particular or would you rather buy a closed source engine for 1 symbolic $ and use that? pbly not, I guess.

We're talking about tools here, right ?

I think that a good demotool should not be tied to a specific engine.
(I'm thinking of maybe a resourcemanager and most important an editor for timelines,envelopes/animations, not a texture generator or synth)
It should work similar to MIDI for example, with the demo engine being the "synth". Communication between engine and editor could be done over TCP/IP (HTTP?).

I picture something like demopaja, just open. Maybe simpler (i.e. without an engine).

Has someone already tried this ?

Do you think it would be worth the trouble ?
added on the 2009-08-13 21:31:15 by xyz xyz
Myself I see demos as instruments, meant to be played.
added on the 2009-08-13 21:36:49 by _-_-__ _-_-__
pera: now you have no excuse not to make a demo about it ;)
added on the 2009-08-13 21:50:08 by keops keops
i much agree with iq and others: code in itself is useless, tips and tuts are useful.
and yes, the scene is a nice case of that 'not invented here' trend, and that's good. I mean, we don't produce just to be productive, but also to learn and what good is it when all you learn is copypasting code and using existing libraries?
To take myself as an example, I've been refusing to use SDL to code on GP2X. Sure I haven't released any demo yet, but once I do, well, that one i'm gonna be proud, and I'm gonna know how every bits of it works! This also helps to learn how to structure code. Once you've been writing and rewriting a hundred libraries you start to know how to do it (including tabs), as well as what is worth putting in a lib and what is better left in the main.cpp ...
so yeah, learning is good ;) using existing code is unleet, but can help get the job done.
and source code .. usually only the noobs request it, others look either elsewhere or for something else.
added on the 2009-08-13 22:02:45 by BarZoule BarZoule
I've always been open to help people out with stuff, but I must say that giving out code is the worst stuff you can do, it's much better to explain the algorithm and then help them sort out the problems.

but if anyone wants some source, just ask.
added on the 2009-08-14 05:40:13 by thec thec
hermes: person A will want different features than person B, so the interface is changed to allow both things, needing twice as much development and making everything twice as cluttered.

A bit like any Linux GUI, basically :)
added on the 2009-08-14 09:53:23 by sagacity sagacity
Quote:

There is no demoscenish Sourceforge, because code sharing is not a big enough part of demoscene culture to need one. Arguably it *should* be, but that's a whole other debate. The demoscene websites that do exist are only interested in finished releases (which, in the case of a demotool, probably means that its usefulness needs to be proven with a prod).


To me this is one of the biggest reasons for lack of newcomers (and to some extend progression in general) in the demoscene:
Back in the mid-90s for me and many friends the Hornet source code archive was one of the most inspirational things that teached us "how to do things" in demos. It's not about copy-and-pasting code, it's about getting an impression of the kind of techniques used in demo-effects in general. Back then, this were for example: interpolation, look-ip tables/pre-calc, asm tricks, texture gradients, innerloop layouts etc.

It was highly motivating to see some new upload on the archive that showed some impressive stuff to learn from.
Oftentimes there also was no source code but just executables of certain effects (e.g. fuzzel's shadow-mapping, etc.) that had a huge motivating effect.

I agree that tutorials are very helpful and not providing source code forces you to first find a solution yourself - but if results are far from what other sceners achieve and you don't have a source of information then this quickly leads to demotivation.

So point is: IMO we need such kind of archive/repository again!

(I think the above point is also very relevant for the discussion over here.)
added on the 2009-08-14 10:40:14 by arm1n arm1n
pera:

Code: #define NO_SDL_GLEXT #include <sdl_opengl.h> #include <sdl_image.h> #include <map> #include <string> #include "konfiguration.h" #include "grafikfiler.h" #include "glext.h" namespace { std::map<std::string, GLuint> cache; } namespace grafikfiler { void anvend(snor s) { glBindTexture(GL_TEXTURE_2D, s); } snor hent(const char* filnavn) { doktor::journal("+ Hent: "); doktor::journal(filnavn); doktor::journal("\n"); if (cache.find(filnavn)!=cache.end()) { doktor::journal("Læser fra cache\n"); return cache[filnavn]; } glEnable(GL_TEXTURE_2D); GLuint texture; // This is a handle to our texture object SDL_Surface *surface; // This surface will tell us the details of the image GLenum texture_format; GLint nOfColors; if ( (surface = IMG_Load(filnavn)) ) { // Check that the image's width is a power of 2 if ( (surface->w & (surface->w - 1)) != 0 ) { doktor::journal("warning: image.bmp's width is not a power of 2\n"); } // Also check if the height is a power of 2 if ( (surface->h & (surface->h - 1)) != 0 ) { doktor::journal("warning: image.bmp's height is not a power of 2\n"); } // get the number of channels in the SDL surface nOfColors = surface->format->BytesPerPixel; if (nOfColors == 4) // contains an alpha channel { if (surface->format->Rmask == 0x000000ff) texture_format = GL_RGBA; else texture_format = GL_BGRA; } else if (nOfColors == 3) // no alpha channel { if (surface->format->Rmask == 0x000000ff) texture_format = GL_RGB; else texture_format = GL_BGR; } else { doktor::journal("warning: the image is not truecolor.. this will probably break\n"); // this error should not go unhandled } // Have OpenGL generate a texture object handle for us glGenTextures( 1, &texture ); // Bind the texture object glBindTexture( GL_TEXTURE_2D, texture ); gluBuild2DMipmaps(GL_TEXTURE_2D, nOfColors, surface->w, surface->h, texture_format, GL_UNSIGNED_BYTE, surface->pixels); glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR ); glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR_MIPMAP_LINEAR ); } else { farvel(SDL_GetError()); } // Free the SDL_Surface only if it was successfully created if ( surface ) { SDL_FreeSurface( surface ); } cache[filnavn] = texture; doktor::journal("- Hent\n"); return texture; } };
dictionary:

hent = load
anvend = use
læser = reading
fra = from

etc...
I do remmember died flipcode archives:
http://www.flipcode.com/archives/articles.shtml

and also the died cfxweb
www.cfxweb.net

also there is in gamedev.net
http://www.gamedev.net/reference/list.asp?categoryid=70

the Denthor's Asphyxia Tutorials
http://www.gamedev.net/reference/list.asp?categoryid=40

I do remmember searching in hugi and pain mags.. for the code session to learn new tricks.

As a coder, what give me an impulse for creation is to try a new effect or technic.. that probably why in old school there has lots of demos with the same effecs "horm holes, plasmas,.." and so on... people learn the tutorial.. and want try in in his democode.

I think some scene repository of open-whatever stuff is need that gets in one place the knowlledge.

Also my self, I would like try some experimental code.. and make some article with it.
That C64 site is pretty neat.
added on the 2009-08-14 11:14:16 by raer raer
KammutierSpule: How about you starting your own site? If you complain about not having web service provider for the purpose then go apply to untergrund.net for an account.

Btw. would actually be nice to have this kind of site. Mostly I'd like to be lazy enough to not to implement (framework) stuff from scratch to some demo productions and so on. Also nice ideas and wicked effects and learning from them is always nice.
added on the 2009-08-14 11:22:23 by waffle waffle
macaw: code in english ffs :D
added on the 2009-08-14 16:05:32 by thec thec
thec: nah, it's actually more challenging to write code in Danish since I sort of have to "make up" the Danish term for stuff (e.g. handle => snor) etc.
yet another "SNIPPET"..
[bbcode]
struct Environment
{
Platform platform;
BuildMode buildMode;
bool debuggerConnected;
};

DEMOLITION_CORE_API bool getEnvironment(Environment& environment);

[/bbcode]
added on the 2009-08-15 12:51:51 by pantaloon pantaloon
ohh, i knew i would fail.
added on the 2009-08-15 12:52:07 by pantaloon pantaloon

login

Go to top