• What are you working on? V2
    2,001 replies, posted
Well, how about checking every line for an exceeding character? So you have a width of the box, say 20. So you check the amount of characters on every line, if it has more than 20 characters, check the next line to see if it has less than 20, if it does, add the character that is overflowing to the line with free space. If the line doesn't have free space, then make it check the next line so that that one may also move a character. And so on. [editline]10:14PM[/editline] That might be overkill. I sort of wrote that off the top of my head, and no I think of it, there aer better ways to do it.
[QUOTE=nos217;16699397]Well, how about checking every line for an exceeding character? So you have a width of the box, say 20. So you check the amount of characters on every line, if it has more than 20 characters, check the next line to see if it has less than 20, if it does, add the character that is overflowing to the line with free space. If the line doesn't have free space, then make it check the next line so that that one may also move a character. And so on. [editline]10:14PM[/editline] That might be overkill. I sort of wrote that off the top of my head, and no I think of it, there aer better ways to do it.[/QUOTE] yeah, that's basically how it was supposed to handle it, but it was really messy (which is why it didn't work in the first place); I've since thrown it away and will be making function for moving characters.
Ah right.
Still working on my build system. I've switched from CMake to python. CMake was having a hard time handling multiple systems and cross compiling all for one project. So I'm writing a horrible CLI parody of CMake. Just color wise, it'll print out the percentage of all files in the module (some modules are for certain platforms. i.e. why would I need to handle shaders for the PSP or NDS?), as well as color code the text in the output. It's going well so far. I've got the color print message working for Mac, Windows, and Linux (as long as it's bash). Here's a really simple example: [code] from color import * cprint('Some text for fun!', red) [/code] will print "Some Text for fun" in red. :D There's a small bug on windows, where everything will remain the color until you switch to the next one but if I try to reset it, it blanks out the screen. Frankly, I don't care though. It suits my needs. Anyways right now however, I'm setting up a template for each platform/module. This project has increased in scope dramatically, but I once wrote a "makefile" in python that was a bit easier to run than make, and it came out to like 14 kb :S But that was when I first learning python (4 years ago) I might release it but as of right now I have nothing more than snippets to show.
-snip I was late-
Got stencilling and clip planes working. Clip planes seem kind of spazzy. Sometimes they work, sometimes they don't. Always work with D3DCREATE_SOFTWARE_VERTEXPROCESSING. Probably need to update my drivers. I'm drawing during the scene here, which isn't really any good, unless I use a 2nd depth buffer. Probably better to render this shit to a texture. [img]http://img36.imageshack.us/img36/6240/15aug2009001.jpg[/img] [img]http://img35.imageshack.us/img35/9032/14aug2009011.jpg[/img]
At first, for clipping I used to fudge the near clip plane. However, that produced inconsistent depth values given the same view point (obviously due to the near clip plane being changed), so I transitioned to doing all my clipping in the pixel shader. Works great.
I am considering that, but it seems like it'd be a low slower..
[QUOTE=garry;16702337]I am considering that, but it seems like it'd be a low slower..[/QUOTE] On modern hardware, not really. What are you using right now, near clip plane fudging? It's a single dot product and addition and a clip() call (no conditions or anything).
I'm currently beginning work on an Extended Sprite Class for SDL, I'm sick of having to do all this other shit just to get animated sprites. Will post work in a few hours.
[QUOTE=nullsquared;16703296]On modern hardware, not really. What are you using right now, near clip plane fudging? It's a single dot product and addition and a clip() call (no conditions or anything).[/QUOTE] DX's clip plane.. [url]http://msdn.microsoft.com/en-us/library/bb174426(VS.85).aspx[/url]
[QUOTE=garry;16703981]DX's clip plane.. [url]http://msdn.microsoft.com/en-us/library/bb174426(VS.85).aspx[/url][/QUOTE] Oh. User clip planes. Those are implemented in the FFP the same way you'd do them in a shader, you have absolutely nothing to lose by doing it on the shader. I thought you were messing with the near clip plane of the projection matrix, which would indeed be faster than user clip planes.
ok, now you can insert text. [IMG]http://i429.photobucket.com/albums/qq12/the1trueryandaniels/wordwrap_edit2.png[/IMG] Next up: real [I]word[/I] wrapping.
[QUOTE=nullsquared;16694351] :bang:[/QUOTE] boost::ptr_container takes ownership of pointees, no? Correct me if I'm wrong, I'm really just using references as syntactic sugar and creating objects out of thin air here as temporary practice to run things through its paces - in a system like this, there really isn't much need to create copies the same object over and over again with a loop.
[IMG]http://i429.photobucket.com/albums/qq12/the1trueryandaniels/wordwrap_real.png[/IMG] now editing is broken :D
SDL == ? [img]http://www.facepunch.com/fp_ratings.php?postid=16666579&rating=12[/img]
A graphics library
It does more than that.
[QUOTE=HubmaN;16717213]It does more than that.[/QUOTE] It's like directX, but entirely software, and not very useful for graphics or sound. I see a lot of people make the same false equation of direct3d with directx
[QUOTE=Cathbadh;16717441]It's like directX, but entirely software, and not very useful for graphics or sound.[/QUOTE] what
A: You do realize that the point of that post was to acquire dumb ratings through the ratings exploit, as shown by the image next to the text. But it seems to have been blocked now; there's only one dumb rating, resulting from that thread. [editline]09:49AM[/editline] B: [QUOTE=Cathbadh;16717441]graphics or sound[/QUOTE] So it's not useful for much of anything? (other than input)
[IMG]http://i429.photobucket.com/albums/qq12/the1trueryandaniels/wordwrap_real_edit.png[/IMG] next up: scrolling
Progress! [img]http://cubeupload.com/files/27d400swordfaightpic.png[/img] Including mouse-controllable fireballs! Pressing the hotkey allows you to steer and blow up your fireball at a target. I'll make it extinguish after 5 seconds of airtime. Will be used for physics puzzles (for burning ropes). [img]http://cubeupload.com/files/28a200swordfaightpic2.png[/img] I added some snazzy glow effects and made the environment a bit bigger as well.
[QUOTE=BMCHa;16717829] So it's not useful for much of anything? (other than input)[/QUOTE] It's unparalleled for input and cross-platform window management. However, the graphics and sound parts are incredibly simple and don't offer you much power or control. If you are happy with processor-intensive 2d unscalable graphics and basic stereo sound effects where you only want to control the volume, then by all means use SDL for those too. Personally, I'd rather use openGL and openAL respectively.
[QUOTE=Namelezz!;16718186]Progress! [img]http://cubeupload.com/files/27d400swordfaightpic.png[/img] Including mouse-controllable fireballs! Pressing the hotkey allows you to steer and blow up your fireball at a target. I'll make it extinguish after 5 seconds of airtime. Will be used for physics puzzles (for burning ropes). [img]http://cubeupload.com/files/28a200swordfaightpic2.png[/img] I added some snazzy glow effects and made the environment a bit bigger as well.[/QUOTE] Man you work fast, looking pretty sweet. I'm rewriting my 2d engine to use a different system than it is now (which is utter crap) and I think after the 1 week fp game challenge I might write a particle engine.
[QUOTE=Namelezz!;16718186]Progress! [img]http://cubeupload.com/files/27d400swordfaightpic.png[/img] Including mouse-controllable fireballs! Pressing the hotkey allows you to steer and blow up your fireball at a target. I'll make it extinguish after 5 seconds of airtime. Will be used for physics puzzles (for burning ropes). [img]http://cubeupload.com/files/28a200swordfaightpic2.png[/img] I added some snazzy glow effects and made the environment a bit bigger as well.[/QUOTE] Wow, that looks awesome!
[QUOTE=Cathbadh;16718213]It's unparalleled for input and cross-platform window management. However, the graphics and sound parts are incredibly simple and don't offer you much power or control. If you are happy with processor-intensive 2d unscalable graphics and basic stereo sound effects where you only want to control the volume, then by all means use SDL for those too. Personally, I'd rather use openGL and openAL respectively.[/QUOTE] Not everyone requires (or supports) hardware accelerated "flexible" graphics. My pong clone doesn't need to run at 42235432 FPS nor does it need to use pixel shaders and dynamically rotate and scale everything on the screen. SDL is good for what it is [b]S[/b]IMPLE [b]D[/b]irect-media [b]L[/b]ayer. It does its job great. Just because you don't understand what its purpose is doesn't mean shit.
[img]http://www.cubeupload.com/files/a2e200wordwrapscroll.gif[/img]
FUCK YEA SCRIPTED TRIGGERS [img]http://imgkk.com/i/n4Pc2U.png[/img] [img]http://imgkk.com/i/ieW7Mx.png[/img] [img]http://imgkk.com/i/NLqV5W.png[/img] [lua] function testOnEnter(trigger, ent) trigger:setMaterial("red") end function testOnExit(trigger, ent) trigger:setMaterial("green") end [/lua]
[QUOTE=nullsquared;16720900]Not everyone requires (or supports) hardware accelerated "flexible" graphics. My pong clone doesn't need to run at 42235432 FPS nor does it need to use pixel shaders and dynamically rotate and scale everything on the screen. SDL is good for what it is [b]S[/b]IMPLE [b]D[/b]irect-media [b]L[/b]ayer. It does its job great. Just because you don't understand what its purpose is doesn't mean shit.[/QUOTE] Not sure what you are arguing about since you clearly agree with my post. If you don't want to do anything fancy in the way of graphics and sounds, then by all means use SDL!
Sorry, you need to Log In to post a reply to this thread.