• What are you working on? February 2012
    3,497 replies, posted
  • Avatar of NorthernGate
  • Just about to start on my component implementation, but I needed to touch up my quad tree so I wouldn't have to go back to it later on (hopefully). [img]http://puu.sh/fmQz[/img] Was very annoyed that XNA didn't have a float Rectangle which made the quad tree display a little weird due to rounding issues with normal rectangles, so I made my own and It's looking a lot better IMHO. All entities aside from the face aren't being drawn (that's why the quad tree has other nodes, but nothing there)
  • Avatar of Maurice
  • Man I've been so lazy. First time since like 5 versions that I'm not in OP.
  • Avatar of supersnail11
  • Cross-posting from the Game Programming Competition, because it might be useful to some of you guys. [QUOTE=supersnail11;34499320]Kongregate high scores scraper. [code] http://blogcake.x10.mx/kongregatescore.php [/code] Parameters: id - Kongregate Game ID. Find it with Firebug or Chrome's equivalent. Example: [img]http://i.imgur.com/sR3KI.png[/img] type - 0 is Weekly, 1 is All Time, and 2 is Today, leave blank for weekly. Return values: no_scores - No high scores for the selected time period no_gameid_supplied - Self explanatory If all goes well, you'll get a newline (\n) separated list of values in the format "username;score" You're welcome.[/QUOTE]
  • [QUOTE=icantread49;34498397]my only suggestion is, don't get too caught up in complicated "messaging systems" make strong use of PIMPL, keep your header files clean, and just include whatever component you need to interact with: [cpp] #include "GameTransformable.h" // a minimal header file with no private variables or anything GameTransformable* trans = Parent()->Get<GameTransformable>(); trans->Position.x += 5; // etc. [/cpp][/QUOTE] It's not always as simple. Have you tried implementing parenting in a component based system? For example, one shape might have the MouseInteraction component but it's parent doesn't, yet when the mouse goes over the shape, it's parent also intersects with the mouse because the shape is it's child. Unfortunately, the parent doesn't need the MouseInteraction component to do what it does but you have to add it anyway so it can tell you if child intersected. It all turns into a giant clusterfuck very fast when you have to include a ton of components just because they must support everything their children support. It's either that or having to deal with unintuitive functionality.
  • Avatar of i300
  • [QUOTE=NorthernGate;34499324]Just about to start on my component implementation, but I needed to touch up my quad tree so I wouldn't have to go back to it later on (hopefully). [img]http://puu.sh/fmQz[/img] Was very annoyed that XNA didn't have a float Rectangle which made the quad tree display a little weird due to rounding issues with normal rectangles, so I made my own and It's looking a lot better IMHO. All entities aside from the face aren't being drawn (that's why the quad tree has other nodes, but nothing there)[/QUOTE] What exactly are quad trees used for?
  • Avatar of Maurice
  • [QUOTE=i300;34499532]What exactly are quad trees used for?[/QUOTE] Efficient collision checking.
  • [QUOTE=i300;34499532]What exactly are quad trees used for?[/QUOTE] They partition space very efficiently enabling you to remove a huge amount of objects from the list of candidates that might intersect. Instead of checking every one with every one, you only need to check each one and it's neighbors.
  • Avatar of icantread49
  • [QUOTE=Darwin226;34499513]It's not always as simple. Have you tried implementing parenting in a component based system? For example, one shape might have the MouseInteraction component but it's parent doesn't, yet when the mouse goes over the shape, it's parent also intersects with the mouse because the shape is it's child. Unfortunately, the parent doesn't need the MouseInteraction component to do what it does but you have to add it anyway so it can tell you if child intersected. It all turns into a giant clusterfuck very fast when you have to include a ton of components just because they must support everything their children support. It's either that or having to deal with unintuitive functionality.[/QUOTE] uh what? no i have not run into that what do you mean by parenting? and why are you doing it at the entity level? that defeats the purpose of using a component based design to begin with!
  • Avatar of i300
  • [QUOTE=Darwin226;34499602]They partition space very efficiently enabling you to remove a huge amount of objects from the list of candidates that might intersect. Instead of checking every one with every one, you only need to check each one and it's neighbors.[/QUOTE] Brilliant. I'm probably going to go home and make one of the-[B]WAIT[/B]. Time to make one in Love on my Mac.
  • [QUOTE=i300;34499532]What exactly are quad trees used for?[/QUOTE] [img]http://images.devs-on.net/Image/gRxCcZ2qJndQYJT-Region.png[/img]
  • Avatar of Darkest_97
  • While you guys are all making your fancy quad trees and mobile facepunches, I was doing the knapsack problem in java for school. Here have some sets that add up to 438: [IMG]http://dl.dropbox.com/u/19301242/Pics/DSG/NDJXXPXQKRYH.png[/IMG]
  • grid-press concept; every last tile you see is a physics object only when they need to be. when things collide with them, they turn into physics objects, otherwise they're simply tiles tiles can be "popped" out of the grid, and placed back in, as well as move freely when they're out and about i showed it off way back - it's not technically a quad-tree, but it is a bsp with a graphing system that's octal based and provides 64 children per-node
  • Avatar of neos300
  • I'm working more on the map format for my game, and I was wondering what I should use? It's a 2D side scrolling game, so I don't need anything really heavy weight like a BSP tree, but is it worth it to go with a quad tree?
  • Avatar of r0b0tsquid
  • [img]http://i.imgur.com/y0Ei4.png[/img] table.key syntax works for evaluation now, but not for assignments yet. I think I'll leave that for tomorrow, I'm feeling pretty tired right now :/ [editline]1st February 2012[/editline] After parsing, this is identical to table["key"].
  • Avatar of Chandler
  • I'm currently looking at tcl. It's an old as hell, but man what I wouldn't give for a build system written in that language. Hell someone could just replace the CMake language and NO NO NO NO NO. I'm not doing that. Never again. Never. Again. (To be honest though, tcl does have some pretty sweet constructs for a command language, and it's definitely a million times better than the CMake syntax)
  • Avatar of esalaka
  • The real issue with CMake is that it's trying to replace proper functionality with macros and shit. I mean, it's just too confusing to get stuff to work in CMake. Couldn't there be a simple build system you could write scripts for to, for example, filter dependencies from files (Parsing #include statements) in any language you want (say, sed)? Or at least use filters, as in programs you pipe shit into and parse shit out of.
  • Avatar of Maurice
  • I'm having fun and you can't stop me. [img]http://i.imgur.com/1NacJ.gif[/img]
  • Avatar of Chandler
  • [QUOTE=esalaka;34500444]The real issue with CMake is that it's trying to replace proper functionality with macros and shit. I mean, it's just too confusing to get stuff to work in CMake. Couldn't there be a simple build system you could write scripts for to, for example, filter dependencies from files (Parsing #include statements) in any language you want (say, sed)? Or at least use filters, as in programs you pipe shit into and parse shit out of.[/QUOTE] That's what I was trying to do with my own, but it became too much of a mess, and if you're sticking to just C/C++ or using sed, you're making it pretty tough to work with/on Windows. It also doesn't make it easier if you're trying to create a set of content pipeline tools that can be run through automation. Stuff like MSBuild is pretty neat, since it's actually comparable to an XML schema, but it's a PITA to write XML by hand. I think if CMake had a fork that didn't use their really terrible language, and came with a bunch of builtin stuff (like for instance tcl!), it would be a hell of a lot easier to work with, and then the only issues people might have are "Why is everything prefix notation?!". The developers of CMake originally had a bunch of tcl scripts and then started to write CMake and just didn't want to use what tcl was at the time (really bad, and really slow. I think this was before tcl had a bytecode compiler of sorts, and didn't have arrays, dictionaries, or proper lists) Obviously in hindsight this was a dumb move on their part, and one of the things I like about tcl over CMake is that you can place a variable name into a call anywhere, and not just when setting variables (e.g.) [code] proc build_core {} { puts "Yo son, you're buildin' the CORE" } proc build_other {} { puts "yup" } foreach {module} { core other } { build_$module } [/code] It's a bad example, but I spend a lot of time in CMake just setting stuff to other stuff in a for loop then trying to do work in said loop as much as possible. This ends up affecting my actual project layout, so it gets very annoying very quickly. [QUOTE=@@;34500466]Use premake, I love it! C:[/QUOTE] Unfortunately, I get issues with premake4 and OS X Lion, which is one of my dev platforms, and it currently doesn't have decent Qt4 support (it's only available in the betas, which is pretty haphazard), nor does it support user-made toolchains out of the box, so I'd spend a lot of time writing lua scripts when CMake sort of does all of this out of the box already. And it looks like the developer is getting paid to focus on Visual Studio support at the moment, so I don't think I'll be seeing an update where premake perfectly fits my needs for quite some time. If I weren't so adamant about using gcc, clang, and msvc on linux, mac, and win respectively, it'd probably be a lot easier for me, but I mean, PSH, when the fuck have I ever gone that route, right? Just a small edit, but if I had others to work with on getting something that replaced CMake's language entirely with Tcl, and removed the really out there generators (e.g., Visual Studio 6, etc.) I'd probably go ahead and hop onto that project. Of course the only issue becomes one of "What build system do we use to build this fork?" (And the answer would probably have to be CMake :v:)
  • Avatar of BlkDucky
  • [QUOTE=Maurice;34500487]I'm having fun and you can't stop me. [img]http://i.imgur.com/1NacJ.gif[/img][/QUOTE] lakito.gif [editline]1st February 2012[/editline] it really bothers me, if you hadn't guessed by now
  • Avatar of Maurice
  • [QUOTE=BlkDucky;34500879]lakito.gif [editline]1st February 2012[/editline] it really bothers me, if you hadn't guessed by now[/QUOTE] [img]http://i.imgur.com/1Rdr8.png[/img] [editline].[/editline] [img]http://i.imgur.com/BAFjr.png[/img]
  • Avatar of T3hGamerDK
  • [QUOTE=esalaka;34500444]The real issue with CMake is that it's trying to replace proper functionality with macros and shit. I mean, it's just too confusing to get stuff to work in CMake. Couldn't there be a simple build system you could write scripts for to, for example, filter dependencies from files (Parsing #include statements) in any language you want (say, sed)? Or at least use filters, as in programs you pipe shit into and parse shit out of.[/QUOTE] I've considered writing a build system that would use AngelScript for addons and for the build system itself. But it's probably too much overkill, and lua seems to be more than enough.
  • [QUOTE=icantread49;34499663]uh what? no i have not run into that what do you mean by parenting? and why are you doing it at the entity level? that defeats the purpose of using a component based design to begin with![/QUOTE] It means that each entity (or if you prefer, each TransformationComponent) has a parent matrix. It's the model matrix of it's parent. That means that when you scale, rotate or move the parent, the child does so as well. In a sense, the child's coordinate system becomes bound to the parent with (0,0) being at the parent's center. All that boring stuff. The problem is, parenting doesn't only apply to transformations. It also applies to alpha, the order in which components are updated, mouse interaction. All sorts of things. In an inheritance based system it works like a charm. Not because of some magic but because you don't aim for minimalism and can load a base class with some extra functionality. I realize this all probably doesn't make any sense. It's really getting late The point is, it's as easy to complicate stuff in a component based system as it is in an inheritance based one. Component based systems might be easier to manage in general but they definitely shouldn't be taken as a cure for all code architecture issues ever.
  • Why was the Programming Jokes thread closed? Was it due to it being big and a new month or something?
  • Avatar of BlkDucky
  • [QUOTE=Map in a box;34501351]Why was the Programming Jokes thread closed? Was it due to it being big and a new month or something?[/QUOTE] yes edit: wait, no. I thought it was over 2000 or 3000 posts before threads are autolocked. eh
  • If so, I can make a Feb edition [editline]1st February 2012[/editline] awesome ninja is awesome
  • Avatar of esalaka
  • [QUOTE=Chandler;34500857]If I weren't so adamant about using gcc, clang, and msvc on linux, mac, and win respectively, it'd probably be a lot easier for me, but I mean, PSH, when the fuck have I ever gone that route, right?[/QUOTE] TBH that's the best solution since you'll be supporting the most common toolchains out-of-the-box if you provide those three.
  • [QUOTE=BlkDucky;34501197][img]http://dl.dropbox.com/u/3659637/howdareyou.png[/img][/QUOTE] holy shit this is outdated. gparent's needs to be [url=http://i.imgur.com/xzZYp.jpg]updated[/url]. [editline]lmao[/editline] [code]0852p <gparent> man 0852p <gparent> you're one weird kind of fellow 0852p <gparent> do you masturbate to my pics too 0853p <gparent> honestly get help man[/code]