• What Are You Working On? - August 2014
    1,181 replies, posted
[QUOTE=utilitron;45794197]My wife was not impressed with my porting code. Me: check this out! Her: it looks the same as the last time you showed me... Me: yea, but now it's on an entirely different programming language Her: ohhh, big woop.[/QUOTE] I hate it when people ask to see what I'm working on, I show them, and they say it looks the same. WHAT I CHANGED WAS NOT VISUAL! V:v:V
[QUOTE=sarge997;45794304]I hate it when people ask to see what I'm working on, I show them, and they say it looks the same. WHAT I CHANGED WAS NOT VISUAL! V:v:V[/QUOTE] I usually tell them exactly what I am working on until they ask the right questions. "Show me what you are working on" usually gives them a console window.
mastersrp - is there literally any advantage to using C rather than C++ in game programming?
[QUOTE=Dr. Evilcop;45794642]mastersrp - is there literally any advantage to using C rather than C++ in game programming?[/QUOTE] Simplicity of the mind, and simplicity of the code. Besides, it's more a matter of taste really, some prefer to use C++ for it's OOP functionality and such, others, like myself, prefer the more simpler and accurate way of writing code that is C. Performance wise it is likely to be the same, and a lot of C code is compatible with C++, mostly. So as I said, mostly just taste really. Benefits come only from C++ if you prefer the methods of C++.
I see what you're saying. I've never really tried non-OOP programming, so I couldn't really say :v:
Just because C isn't an OO language doesn't mean you can't do OO stuff.
[QUOTE=Cold;45795038]Just because C isn't an OO language doesn't mean you can't do OO stuff.[/QUOTE] Yes, but you have to admit having OOP as a first class language feature certainly helps.
[QUOTE=Cold;45795038]Just because C isn't an OO language doesn't mean you can't do OO stuff.[/QUOTE] Ah, didn't know that. I haven't dwelled much outside my little world of Java yet. I'll read the works of Stroustrup and Meyers that are on my bookshelf...eventually. [editline]25th August 2014[/editline] Unrelated, has anyone else heard of [url=http://llvm.org/]LLVM[/url]? I found it while researching emulators and AOT compilation, and stumbled upon a guy who recompiled SMB for NES to a native x86 Linux program using the LLVM toolchain. It's a kind of abstraction layer for compilers - front ends like C++ (with full C++11 support), Java, C, Javascript, and other language's code gets compiled to LLVM byte code. Then, the LLVM byte code is compiled to native code for a variety of platforms such as ARM, x86, and others. In addition, you can write your own front ends and back ends - [url=https://github.com/kripken/emscripten]there's even a third party back end that allows compiling to Javascript[/url]. To my knowledge you have to use compatible libraries, which it provides - but any library written completely in one of the front-end languages should compile with LLVM just fine. I know at least [url=https://github.com/kripken/box2d.js/]Box2D[/url] and [url=https://groups.google.com/forum/#!topic/emscripten-discuss/3Fs0uWdtBRc]Bullet[/url] are two third party libraries that people have successfully compiled with it.
Guh. I finally managed to understand some of the math behind ray tracing (with the help of Overv), and actually got a mostly-working ray tracer up and running. Perhaps now I can try and get reflections and such to work. Nothing incredible, but I'm proud of it. [thumb]http://i.imgur.com/cAg3Wxi.png[/thumb]
[img]http://i.imgur.com/lXRtejt.png[/img] I uhh.... what???
Your system uses , as seperator. try this: double.TryParse(num, CultureInfo.InvariantCulture, out D)
[QUOTE=Dr. Evilcop;45794941]I see what you're saying, but game programming without OOP sounds like absolute hell to me :v: For complex games, anyways.[/QUOTE] OOP isn't that big of a deal. There are many game systems that don't rely on it. Component based systems are a notable example. C lacks much more than just OOP though.
[QUOTE=Darwin226;45795806]OOP isn't that big of a deal. There are many game systems that don't rely on it. Component based systems are a notable example. C lacks much more than just OOP though.[/QUOTE] Component systems are still pretty object oriented. Each component can be easily represented as an object. And the game object they go on is also easily representable as, well, an object. That's not to say they require OOP - no doubt you could still get along just fine without OO features. It's just that OOP can make some things very convenient.
After many hours and frustrating nights, I finally got vehicles working! [vid]http://a.pomf.se/ustncw.webm[/vid] [url=https://github.com/Spanfile/Bridge-Fart]GitHub project page :>[/url]
C# calls locales cultures? Oh wow. [editline]25th August 2014[/editline] [QUOTE=Darwin226;45795806]OOP isn't that big of a deal. There are many game systems that don't rely on it. Component based systems are a notable example. C lacks much more than just OOP though.[/QUOTE] Component systems suck though
[QUOTE=Map in a box;45795906] Component systems suck though[/QUOTE] You have no idea how wonderful they are :D Depends on programmer preference I suppose, but done right they can really help make things very modular.
[QUOTE=Map in a box;45795906] Component systems suck though[/QUOTE] I don't think so, but I'm sure you have your reasons. What component based systems did you work with? How did they suck?
[QUOTE=KillaMaaki;45795839]Component systems are still pretty object oriented. Each component can be easily represented as an object. And the game object they go on is also easily representable as, well, an object. That's not to say they require OOP - no doubt you could still get along just fine without OO features. It's just that OOP can make some things very convenient.[/QUOTE] This is the same thing as before where an argument against Haskell for game programming was "objects are the most natural mapping to the real world". Yes. They are. But just because you have objects doesn't mean you're doing OOP. OOP usually means class hierarchies and that's what component systems don't really leverage since they're in most part flat. [editline]25th August 2014[/editline] [QUOTE=Map in a box;45795906] Component systems suck though[/QUOTE] That's a pretty strong statement that I don't think the majority would agree with. Care to share what's wrong with them?
[QUOTE=Darwin226;45796152] OOP usually means class hierarchies and that's what component systems don't really leverage since they're in most part flat. [/QUOTE] I use plenty of inheritance with components. It's quite powerful when you combine the two.
[QUOTE=Vampired;45793005][img_thumb]http://i.imgur.com/wrXLwSJ.png[/img_thumb] I don't get to make games much any more but I finished my Ludum Dare submission last night. It's a JS game written using Phaser js which is pretty cool. [url=http://www.ludumdare.com/compo/ludum-dare-30/?action=preview&uid=15096]Click here to see entry[/url]. Hopefully you can figure out how to play it, although it's not a new concept. Some things are not 100% because I didn't have time, I would have liked to add more levels, better AI and better sounds and music. Let me know what you think though.[/QUOTE] This is fun :D
[QUOTE=KillaMaaki;45796343]I use plenty of inheritance with components. It's quite powerful when you combine the two.[/QUOTE] You can use whatever suits you best. I'm just saying that components work fine without inheritance.
I just wrote the [url=https://github.com/Rohansi/Mond/blob/522701c9ae7eb75655999d528f12020cffc0f8f1/Mond/Compiler/Lexer.cs]Mond tokenizer[/url] in Mond, then made made it tokenize itself. Here's a gist with the source and output: [url]https://gist.github.com/Rohansi/f179907430eab9f776af[/url]
-
Components often depend on eachother so often its pointless to not use inheritance. At most one could use mixins
[QUOTE=Map in a box;45797625]Components often depend on eachother so often its pointless to not use inheritance. At most one could use mixins[/QUOTE] That doesn't seem to follow, how do dependencies make components a less useful proposition than using inheritance?
[QUOTE=danharibo;45797648]That doesn't seem to follow, how do dependencies make components a less useful proposition than using inheritance?[/QUOTE] Because you mine as well use inheritance with those dependencies
[QUOTE=Map in a box;45797659]Because you might as well use inheritance with those dependencies[/QUOTE] Not if you abstract the dependency.
The discussion about the advantage/disadvantage of the use of components dates back to the mayans jesus christ guys this will lead us nowhere close to an answer because there is none. EDIT: wording
[QUOTE=AtomiCal;45797936] jesus christ guys this will lead us nowhere close to "the" answer.[/QUOTE] We'll never get to "the" answer, because there is none.
[url]http://will.kirk.by/labs/whoownstwitchtoday/[/url] Although I hardly think $arr[array_rand($arr)]; is really worthy of being a whole post on here.
Sorry, you need to Log In to post a reply to this thread.