• What are you working on? V2
    2,001 replies, posted
[QUOTE=compwhizii;17115547]Live demo: [url]http://compwhizii.net/EventStats/new/index.html[/url][/QUOTE] Hey, where'd you get those icons from?
I found a nice list at [url]http://iconpot.com/[/url] but I use the Function and Developer set.
Where's the better place to put a struct? In the header file or in the cpp file? It's only used in this one class.
Initially I put the declaration in the header file, and the definition in the cpp file, but including into other files didn't go over so well with it for some reason, so I ended up putting it all in the header file. Header files are really only for stuff that has to be used in several different files, it saves the copy pasting. In your case, it really shouldn't matter.
Ok, thanks.
If a struct is specific to a class I define it in the class itself. That way, if you do eventually need to use it outside, you can just change its scope from private to public and use it as myclass::mystruct.
Isn't the struct data type just there to provide backwards compatibility with C?
[QUOTE=Overv;17119934]Isn't the struct data type just there to provide backwards compatibility with C?[/QUOTE] Offtopic but fabulous avatar
[QUOTE=Overv;17119934]Isn't the struct data type just there to provide backwards compatibility with C?[/QUOTE] In a way yes, you can do the same things with classes. But people tend to use them to represent open containers of data with public members, whereas classes tend to be used with strong encapsulation. It's not a written rule, however.
The only technical difference between struct and class is that members in a struct default to public
[QUOTE=compwhizii;17115547]Live demo: [url]http://compwhizii.net/EventStats/new/index.html[/url][/QUOTE] I get 404's when I click on the mod names.
[QUOTE=Ortzinator;17120357]I get 404's when I click on the mod names.[/QUOTE] That's expected, I took a copy paste of the generated list from Version one: [url]http://compwhizii.net/EventStats/[/url]
[QUOTE=garry;17120324]The only technical difference between struct and class is that members in a struct default to public[/QUOTE] Unless you're talking C# ^^ (In which case structs are managed by values, classes by reference)
A question for you guys Say you have an object called barrel, in the barrel you can contain items, each barrel can be set to contain different items. You then have an NPC, he has some items to put in barrels, how would you search for which barrel he could use? The two likely solutions would be 1) Have a list of all barrels, check each one to see if you can store the item 2) Have a dictionary where barrels are stored under what you can contain in them, e.g Water: Barrel 1, Barrel 3 Food: Barrel 2, Barrel 3 Leather: Barrel 1 Then access the dictionary under what item you are storing. What what would you guys do?
I would use the first one.
Wow, nice website compwhizii. Really nice. [img]http://www.facepunch.com/fp/rating/wrench.png[/img]
[url]http://justdevs.com/[/url] a lil experiment by me & Manadar, forum/website is my code :)
[QUOTE='-[ Fizzadar ]-;17122866'][url]http://justdevs.com/[/url] a lil experiment by me & Manadar, forum/website is my code :)[/QUOTE] Well at least the title doesn't say those 2 words from your Pokemon RPG :v: Even though it's simple, it looks pretty nice.
[QUOTE=iPope;17122492]A question for you guys Say you have an object called barrel, in the barrel you can contain items, each barrel can be set to contain different items. You then have an NPC, he has some items to put in barrels, how would you search for which barrel he could use? The two likely solutions would be 1) Have a list of all barrels, check each one to see if you can store the item 2) Have a dictionary where barrels are stored under what you can contain in them, e.g Water: Barrel 1, Barrel 3 Food: Barrel 2, Barrel 3 Leather: Barrel 1 Then access the dictionary under what item you are storing. What what would you guys do?[/QUOTE] Let the barrel itself keep a list of what it can hold. It's the barrels business not yours! Then you can do things like barrel.canHold( item ); barrel.getHoldableItems();
Still working on my fucking build system. At this point I've scratched the project several times over, and I'm just going to write a simple python script to compile everything. There will be a batch file so someone can call it from Visual Studio/Codeblocks/whatever on windows. Trying to target multiple systems when you only have half of them sucks :(
I've just relearned classes. It all makes so much more sense the second time round, and I can now get on with making multiple enemies etc. Yass.
To continue with my useless programs, I wrote a program which creates a mosaic of a bigger picture using smaller pictures. (Inspired by that WoW one) [img]http://filesmelt.com/downloader/output11.png[/img][img]http://filesmelt.com/downloader/output3.png[/img] Took me about 4 hours, still a lot to fix (Like why is firefox so red?) :(
crop you mother fucker pretty cool [B]edit:[/B] Thanks
holy shit hahaha
[QUOTE=Maurice;17128981]To continue with my useless programs, I wrote a program which creates a mosaic of a bigger picture using smaller pictures. (Inspired by that WoW one) (As we can see in the Chrome one, Google is made up of cash, liberty and awards) Took me about 4 hours, still a lot to fix (Like why is firefox so red?) :([/QUOTE] Does it work this way? : 1) You select a list of images (in this case the emoticons) which will compose the converted images. 2) The program calculates the "average r,g,b" of each image. (Loops through all the pixels then calculates the average) 3) You load the image to be converted. 4) For each pixel in the image, the program chooses the most appropriate image from the previous list. If not, how does it work?
[QUOTE=SupahVee;17129104]Does it work this way? : 1) You select a list of images (in this case the emoticons) which will compose the converted images. 2) The program calculates the "average r,g,b" of each image. (Loops through all the pixels then calculates the average) 3) You load the image to be converted. 4) For each pixel in the image, the program chooses the most appropriate image from the previous list. If not, how does it work?[/QUOTE] Exactly like that. Good about step 1 is that I can replace them with any set of images at any time. I'm thinking about dithering the picture. Not sure. I thought it would be pretty easy to program but it was harder than I thought. Mainly because autoit is shit.
[img]http://img.meteornet.net/uploads/1dbjndvv/ss.png[/img] Done a chat box! The messages here are relayed through the server, so you know that shit works. The text box and the blue fading thing background image are hidden until you press tab, then they fade in. You can hide it by pressing tab once more or escape in which case everything fades out but the text stays, so it behaves just like source.
[QUOTE=Catdaemon;17129317][img]http://img.meteornet.net/uploads/1dbjndvv/ss.png[/img] Done a chat box! The messages here are relayed through the server, so you know that shit works. The text box and the blue fading thing background image are hidden until you press tab, then they fade in. You can hide it by pressing tab once more or escape in which case everything fades out but the text stays, so it behaves just like source.[/QUOTE] I could totally see this being used to make a roguelike :v:
[QUOTE=Catdaemon;17129317][img]http://img.meteornet.net/uploads/1dbjndvv/ss.png[/img] Done a chat box! The messages here are relayed through the server, so you know that shit works. The text box and the blue fading thing background image are hidden until you press tab, then they fade in. You can hide it by pressing tab once more or escape in which case everything fades out but the text stays, so it behaves just like source.[/QUOTE] Curious to know, is that directX?
[IMG]http://i429.photobucket.com/albums/qq12/the1trueryandaniels/infiniteloop.png[/IMG]
Sorry, you need to Log In to post a reply to this thread.