• What do you need help with? V. 3.0
    4,884 replies, posted
How do I compile that code?
[QUOTE=thisBrad;33377615]Anyone have experience with Ogg theora encoding? I don't know why my encoded Ogg doesn't work properly in Chrome: [vid]http://triebr.com/Test.ogv[/vid] If your not using chrome, it looks like this: [IMG]http://i.imgur.com/LQveU.png[/IMG][/QUOTE] It looks like the image is YUV decomposed, with the U and V channels at a different scale.
I've installed: gettext dev gettext runtime glib dev glib runtime gtk+ runtime pkg-config dev pkg-config runtime Into C:\mingw and it still stops at the same point. Hm... What package does intl.dll come from?
gettext
I'm stumped.
I have some math in my program that needs to be lightning fast, so I was wondering if converting it to assembly would speed it up. [code]ret.Y = 16+ ((0.183*rgb.red) + (0.614*rgb.green) + (0.062*rgb.blue)); ret.Cb = 128 + ((-0.101*rgb.red) + (-0.339*rgb.green) + (0.439*rgb.blue)); ret.Cr = 128 + ((0.439*rgb.red) + (-0.399*rgb.green) + (-0.040*rgb.blue)); [/code] This code needs to be executed billions of times per second. Would assembly make a significant difference? Would a GPU accelerated math library help? Or are those better for very large equations? edit: I'm now using a lookup table which made it a lot faster. If anyone has any suggestions, they are still welcome :) [QUOTE]It looks like the image is YUV decomposed, with the U and V channels at a different scale.[/QUOTE] Yeah, I found out Chrome only supports full size luma frame, and 1/2 chroma frames. I guess it completely ignores the theora header :v:
[QUOTE=thisBrad;33381181]I have some math in my program that needs to be lightning fast, so I was wondering if converting it to assembly would speed it up. [code]ret.Y = 16+ ((0.183*rgb.red) + (0.614*rgb.green) + (0.062*rgb.blue)); ret.Cb = 128 + ((-0.101*rgb.red) + (-0.339*rgb.green) + (0.439*rgb.blue)); ret.Cr = 128 + ((0.439*rgb.red) + (-0.399*rgb.green) + (-0.040*rgb.blue)); [/code] This code needs to be executed billions of times per second. Would assembly make a significant difference? Would a GPU accelerated math library help? Or are those better for very large equations? edit: I'm now using a lookup table which made it a lot faster. If anyone has any suggestions, they are still welcome :)[/QUOTE] Is this in C? If it is and you're compiling through gcc -- that compiler's optimization always blows me away. I think I'd have a hard time optimizing something like a simple equation better than gcc already does. If anything, it sounds like LUTs are your best choice. [editline]a[/editline] Also, I'm not entirely sure of this, but I would imagine that on most architectures, performing bitwise-OR with 0x80 and 0x10 would use a clock cycle or two less than adding respectively 128 and 16. But don't quote me on this.
I decided to check out lxml, since I kept reading that lxml is better than beautifulsoup. I can't seem to find out to search for an element WITH a class. Google says that I should use xpath('//element[@class="classname"]') but that doesn't return anything.
[QUOTE=thisBrad;33381181]I have some math in my program that needs to be lightning fast, so I was wondering if converting it to assembly would speed it up. [code]ret.Y = 16+ ((0.183*rgb.red) + (0.614*rgb.green) + (0.062*rgb.blue)); ret.Cb = 128 + ((-0.101*rgb.red) + (-0.339*rgb.green) + (0.439*rgb.blue)); ret.Cr = 128 + ((0.439*rgb.red) + (-0.399*rgb.green) + (-0.040*rgb.blue)); [/code] This code needs to be executed billions of times per second. Would assembly make a significant difference? Would a GPU accelerated math library help? Or are those better for very large equations? edit: I'm now using a lookup table which made it a lot faster. If anyone has any suggestions, they are still welcome :) Yeah, I found out Chrome only supports full size luma frame, and 1/2 chroma frames. I guess it completely ignores the theora header :v:[/QUOTE] Compile with optimizations for more modern architectures. For gcc (and probably clang) you can use something like -O2 -march=pentium4 and perhaps -mfpmath=sse if you're compiling for 32-bit platforms.
I'm currently learning the basics of C++, what tutorials/books/etc. should I look up? What other programming languages are useful to learn about as well?
[QUOTE=Phycosymo;33384687]I'm currently learning the basics of C++, what tutorials/books/etc. should I look up? What other programming languages are useful to learn about as well?[/QUOTE] Well they're [i]all[/i] useful in one situation or another. What applications did you have in mind?
[QUOTE=ROBO_DONUT;33385241]Well they're [I]all[/I] useful in one situation or another. What applications did you have in mind?[/QUOTE] I don't know, something that is widely used, like Java?
Anyone know if its possible to get the frametime with GLFW?
[QUOTE=Phycosymo;33388890]I don't know, something that is widely used, like Java?[/QUOTE] Well that's still not very descriptive. I'll rattle off a few and what they're generally good for. Like you mentioned, Java is popular. It's generally used for application development. It's really dedicated to the OOP paradigm and the syntax is generally conducive to code reuse. C# is newish, popular around here, and is also used for application development. C is the grandfather of all modern languages (but it is still being actively updated and revised!), it's typically used for embedded development, low-level systems programming, and libraries, but it is also frequently used to develop applications. Python is a very expressive interpreted language with a very large standard library. It can be used for rapidly prototyping and developing applications, to quickly test an idea, or to kludge something together to solve a one-time problem. It has a very good C api which allows you to write low-level or time-critical modules in C/C++ easily. One of its unique features is 'duck-typing', meaning that any object can be used in place of any other object as long as it provides all the necessary methods ("if it looks like a duck, and it quacks like a duck, it's a duck", as the saying goes). It has an active community and a rich philosophy (the state of being 'pythonic') to go along with the language. Lua is an elegantly simple language which has distilled the programming toolset into only its most essential pieces. It provides functions, numbers (only one type for both integer and floating-point), strings, and an extremely flexible (and fast) hash-table implementation. The JIT version of Lua, LuaJIT, is one of very few languages which can rival C or C++ in terms of execution speed. It is typically embedded as a scripting language in a larger application or framework, but it can easily be applied to other situations. Ruby borrows a lot of ideas from other languages, like Python and Perl, and has made some of its own refinements. It aims to be powerful and object-oriented. It is probably most popular within the web-development community (due to the success of Ruby on Rails), but that is by no means its only purpose. And there's no shortage of others, Javascript, Perl, Lisp, Go, D, etc. I'm quite partial to C and Python, myself, and I've been meaning to learn Go for a while.
I'd also like to point out that Lua is completely written in ANSI C (C90) and thus really doesn't have any specialized libraries or functions by default. On the other hand, this makes Lua usable in any system that provides the C standard library, potentially even on embedded devices.
[QUOTE=esalaka;33390492]I'd also like to point out that Lua is completely written in ANSI C (C90) and thus really doesn't have any specialized libraries or functions by default. On the other hand, this makes Lua usable in any system that provides the C standard library, potentially even on embedded devices.[/QUOTE] It does provide the basics, like file I/O. It's humorous to note that this is enough to make Lua a full-featured language on Plan 9. I think making [i]everything[/i] accessible from a file-system node is one thing they really did right, that other operating systems could have learned from if momentum wasn't causing them to plow haphazardly in pointless directions. Also, I think LuaJIT has an FFI, so anything that would be accessible to C or C++ is accessible to from LuaJIT code without the need for specific bindings.
If someone could help me with this: [url]http://gamedev.stackexchange.com/questions/20080/collisions-not-working-as-intended[/url] It would be VERY nice!
[QUOTE=ROBO_DONUT;33390183]Well that's still not very descriptive. I'll rattle off a few and what they're generally good for. Like you mentioned, Java is popular. It's generally used for application development. It's really dedicated to the OOP paradigm and the syntax is generally conducive to code reuse. C# is newish, popular around here, and is also used for application development. C is the grandfather of all modern languages (but it is still being actively updated and revised!), it's typically used for embedded development, low-level systems programming, and libraries, but it is also frequently used to develop applications. Python is a very expressive interpreted language with a very large standard library. It can be used for rapidly prototyping and developing applications, to quickly test an idea, or to kludge something together to solve a one-time problem. It has a very good C api which allows you to write low-level or time-critical modules in C/C++ easily. One of its unique features is 'duck-typing', meaning that any object can be used in place of any other object as long as it provides all the necessary methods ("if it looks like a duck, and it quacks like a duck, it's a duck", as the saying goes). It has an active community and a rich philosophy (the state of being 'pythonic') to go along with the language. Lua is an elegantly simple language which has distilled the programming toolset into only its most essential pieces. It provides functions, numbers (only one type for both integer and floating-point), strings, and an extremely flexible (and fast) hash-table implementation. The JIT version of Lua, LuaJIT, is one of very few languages which can rival C or C++ in terms of execution speed. It is typically embedded as a scripting language in a larger application or framework, but it can easily be applied to other situations. Ruby borrows a lot of ideas from other languages, like Python and Perl, and has made some of its own refinements. It aims to be powerful and object-oriented. It is probably most popular within the web-development community (due to the success of Ruby on Rails), but that is by no means its only purpose. And there's no shortage of others, Javascript, Perl, Lisp, Go, D, etc. I'm quite partial to C and Python, myself, and I've been meaning to learn Go for a while.[/QUOTE] Thank you, that was what I was asking for.
AS3, please. Thread [url]http://www.facepunch.com/threads/1142345[/url]
Jookia is a bro, he helped me out with libcaca.
I was wondering, I'm trying to learn C# for my games development unit at college and I don't know if I should start by learning C# making console applications, or if I should be making Win32 apps or what.
[QUOTE=The DooD;33406485]I was wondering, I'm trying to learn C# for my games development unit at college and I don't know if I should start by learning C# making console applications, or if I should be making Win32 apps or what.[/QUOTE] How you get input and output is entirely irrelevant when learning to program. Programming is the problem-solving processes you develop, not the UI toolkit you use.
Can you make a template struct? something like [cpp]template T struct vector { T x, T y }[/cpp]
I believe you could, yes. Although it would obviously be [cpp]template <typedef T> struct vector { T x, T y }; [/cpp]
And [cpp]T x; T y; // or T x, y;[/cpp] If that's C++ that is.
[QUOTE=ZeekyHBomb;33406885] If that's C++ that is.[/QUOTE] In case you were unaware, there are no templates in C.
[QUOTE=thisBrad;33377615]Anyone have experience with Ogg theora encoding? I don't know why my encoded Ogg doesn't work properly in Chrome: [vid]http://triebr.com/Test.ogv[/vid] If your not using chrome, it looks like this: [IMG]http://i.imgur.com/LQveU.png[/IMG][/QUOTE] uh? [img]http://dl.dropbox.com/u/220354/Non-Game%20Screenshots/inchrome.JPG[/img] using chrome
[QUOTE=demonguard;33408189]uh? [img]http://dl.dropbox.com/u/220354/Non-Game%20Screenshots/inchrome.JPG[/img] using chrome[/QUOTE] He's saying that if you're viewing in Firefox and have no idea WTF he's talking aboot, it looks like the latter screenshot. The problem was solved already, I think.
[IMG]http://i1095.photobucket.com/albums/i474/Jordan_Oyenusi/help.png[/IMG] Why is this happening ?
[QUOTE=joyenusi;33408959][IMG]http://i1095.photobucket.com/albums/i474/Jordan_Oyenusi/help.png[/IMG] Why is this happening ?[/QUOTE] "bullets" is a reference to an object which hasn't been set to an object instance yet. When a reference doesn't point to an object it's called a null reference. When you try to access an object through a null reference, you get a NullReferenceException. If bullets is a list of Bullet objects then you need to set it to a new list at some point in your program, as you do with regular objects. [code] bullets = new List<Bullet>(); [/code]
Sorry, you need to Log In to post a reply to this thread.