@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4



Comments:

<0> There is no way to produce 2 SDL windows in a program using SDL alone, is there?
<0> since SDL_SetVideoMode gets rid of the other surface
<0> I'm guessing that in order to do that, I would need to interact with the underlying window system
<0> (Delicious! :( )
<0> heh
<1> i don't see why one would need more then a window for an app you'd use SDL for
<2> TehZorroness, no, doesn't look like that
<2> why do you need 2 windows?
<2> You'd need to use 2 separate apps
<2> maybe you could let 2 apps interact through some port
<0> well, what I'm working on a video surface cl*** for an engine and I'm trying to make it so it is as flexable as possible (not limit everything to only one instance, ect)
<0> but having two video surfaces for a game isnt worth all that trouble, so that can really be put off for some years
<2> mh, maybe you should give the cl*** a reference to the instantiating cl***
<0> I was pretty much pondering what it would take to achieve :)
<3> Can I convert a sdl_rect to a new sdl_surface somehow?
<2> why not just copy the content from the sdl_rect (and the source surface) to a new surface?



<2> create a new surface
<2> and blit the surface on it
<2> err, the rect
<3> this is what I mean
<3> how do I do that please?
<2> You have a SDL_Surface with an SDL_rect pointing to a certain section, right?
<3> yes
<2> do you have 2 SDL_rects..? I usually have a source & destination rect
<3> yes I do
<2> what's so hard then?
<3> I have this lib that rotates surfaces and it says when I want to apply it.. cannot convert from sdl_rect to sdl_source
<2> point dstrect.x & .y to 0
<3> and that will do it?
<2> and .w & .h to image->w & image->w
<2> and srcrect coordinates to the place you want
<2> and then blit it
<2> SDL_BlitSurface(image, &srect, display, &drect);
<2> (where image is the new surface, in this example)
<2> and you're done
<3> I see.. thanks
<3> you reckon it slows down the api?
<1> rotate surface? via software?
<1> how slow is it?
<3> not slow for small sprites
<1> i'd really consider opengl for that
<3> I love opengl but I cannot use it here
<1> prerender the sprites then
<1> it's what I use :)
<1> to get pseudo3D
<3> you mean into cache?
<1> well since i render them from blender directly i don't have to do that
<1> i have the spritesheets already
<1> but you could cache them
<1> or save them to a file
<1> only differenc would be loading speed vs disk space
<3> that's right
<3> cache I would prefer though
<3> with rotations I wouldnt know how many of those sprite sheets I would really need
<3> could get huge
<1> well it depends on what you are doing
<1> if it rotates pretty fast you don't need as many
<1> also fewer depending on size
<1> i use 36 for up to 70x70 pixel objects
<3> I want to have at least 60 sprites every 6 degrees or so
<1> that rotate reasonably fast
<1> above 70x70 pixel objects i'll probably go to 81 or more
<1> but I have yet to get that far :P
<3> :)
<1> but you'll do much better this way then realtime
<1> although it'll be slightly choppy if you don't get enough samples
<1> you just have to run tests
<3> isnt it time consuming to do sprite sheets?
<1> i make mine by scripts
<1> i just need the 3d model
<1> then i have two scripts to convert it to a sprite sheet
<3> thats very handy
<1> one renders it and the other fuses the renders together in a spritesheet
<1> but I only do this once with the model
<3> you wrote it yourself?
<1> my friend did the render plugin for blender
<1> i did the rest: )



<3> on ogl right?
<1> he ****s at coding :)
<1> yeah
<1> SDL + OpenGL
<1> but at compile time you can use pure SDL if you want
<3> I had a game runnning on OGL with software rotation of 20 spaceships at once.. it was reasonably fast
<3> but had a good cpu though
<3> 64x64 sprites
<1> well i can have 30 spaceships + 100 explosions + 100 lasers and it runs fine :)
<1> what's funny though
<1> is that most of the CPU goes to making cool stars
<1> in the background
<1> giving it a liquidy effect
<3> I know.. I noticed :)
<1> i'll have to rethink that though
<3> I made an random star generator for that
<3> pixels here and there
<1> i did too :)
<1> each with different brightness
<1> that moves at a different speed
<1> relative to brightness
<1> but it devours CPU
<3> the map that I was originally loading from nasa.com had 600 kb and it slowed me down to 45 fps
<1> heh
<1> I just use pixels :)
<1> but i have to get around to nebula
<1> and stuff like that
<1> but i'm pretty alpha :)
<3> what font lib did you use
<3> ?
<1> SDL_ttf
<1> i haven't done much text work though
<3> was is reasonably fast with lot of text>
<3> ?
<1> it seems pretty scary for multi-line input
<3> ahh okay
<1> well for what I do it's more then fast enough
<3> I had m***ive problems because orgininaly I wanted to code it for net gaming
<3> but then I did it with this stupid quake font in gltexfont
<1> my goal is not net gaming :)
<1> not in the 1.0 release at least
<1> i'm just writing a clone game from my youth
<1> and going to make it nicer
<3> Maybe I should do that sprite sheet.. how big are they?
<3> you did that in 3d?
<1> nah
<1> here, look
<1> https://trac.bobbens.dyndns.org/naev/attachment/wiki/Screenshots/0.4.2-1.png
<1> that screenshot is missing explosions, but it isn't too old: )
<3> w8
<3> wouldnt load from here.. I am on holiday in China and the site is banned :P
<1> hehe
<1> dyndns.org is banned from china
<1> because anyone can hosta webserver locally
<3> yap
<1> it's my home server :)
<1> shame though
<1> you have no proxy?
<3> no
<3> just got dls
<1> shame
<3> anywho.. I ****ed up my spaceship roleplay game because of didn't like to use std:vector and wrote my own ****ty vector cl***
<1> bad move :P
<3> beginners luck
<3> was ambitious though.. 20k line of code
<1> well i'm a beginner at this
<1> i'm at 10k :)
<1> but it needs alot of work
<3> actually if you wanna know photon torpedos fkced it up
<3> wanted to make it by physical law with auto aiming etc + physical laws
<3> long story forget bout it
<1> i'm actually rewriting my physics engine now
<3> how so
<1> thinking about using rk4


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #sdl
or
Go to some related logs:

remove mysql-bin.000003
azurus disappears
#kde
cpufreq ubuntu analyzing CPU 0: no or unknown cpufreq driver is active on thi
inurl:ubuntu 810e
#kernel
christor combos
*** buffer overflow detected ***: conky terminated
perl chdir with *
#web



Home  |  disclaimer  |  contact  |  submit quotes