• What are you working on? v16
    5,004 replies, posted
[QUOTE=eXiv2;28452794]What would be a good way to learn C++?[/QUOTE] By jumping straight in and giving it your all.
Books? Tutorials? Youtube?
[QUOTE=high;28452159]How do you download/checkout System.Data.SQLite? I have been looking on their site and can't find out how :(. [url]http://system.data.sqlite.org/index.html/doc/trunk/www/index.wiki[/url][/QUOTE] Push log in, type in "anonymous" as the username and the ASCII password thing as the password. Go to Timeline, click on the latest revision. Push "ZIP archive". (Alternatively, install [url=http://fossil-scm.org]Fossil[/url] to check the repository out.)
[QUOTE=eXiv2;28453063]Books? Tutorials? Youtube?[/QUOTE] Have you any prior experience with programming?
It's a bit overdue, but here's our level editor. There's also a video of our game's recent updates, but since Devin did all of the physics stuff and wanted to record that video, he'll be posting that video here tomorrow morning, it'll be his first post. [hd]http://www.youtube.com/watch?v=Y6btr2G9OiI[/hd] [editline]6th March 2011[/editline] also, my camera seemed to have a hard time focusing on the screen, I don't know why, it was focusing just fine earlier with my Aria, which was recorded closer to the camera.
[QUOTE=caesium;28453272]Have you any prior experience with programming?[/QUOTE] Barely. Did some PHP, Lua and C#, so I know the logic behind most things, but I can't remember most things for the life of me.
[QUOTE=gparent;28448780]At least you got an easy one. Maybe there's harder stuff =/ How are you handling memory alignment?[/QUOTE] I don't. When the memory block is first created it allocates a memory pool of a specified size, and creates a single memory block descriptor at the start of it, that has the whole block of memory as its own chunk of memory. Example: You allocate a 512 byte memory block. A memory block descriptor is placed at Offset 0 in that block, holding the following information: [cpp] Size = 500 // The descriptor itself is 12 bytes in size Previous = NULL // This is the first descriptor Locked = false // Can be used. ID = MEMBLOCKID // I use this to see if the pointer people are looking for in the memory block is actually a descriptor. [/cpp] When you then need a 100byte chunk of memory, instead of calling malloc(100), you do Memory->Alloc( 100 ), which looks through the descriptors for a chunk of the size you need. Since the first chunk in our case is 500 bytes, and not locked, we'll grab some of that. This is done by setting the first descriptor's size to our needed size (100 bytes), and placing a new memory descriptor at end of the chunk we've just allocated, pointing back to this descriptor, and having a size set of what is left of the whole pool, which in our case is 388 bytes (100 bytes + 2 descriptors of 12 bytes each).
[QUOTE=TerabyteS;28445425]What would be the best way to programmatically copy a file (c++) from a location to another? fopen should be pretty slow, if I'm not mistaken, is there any other way? [editline]6th March 2011[/editline] Woop 2000 posts, now I just need to wait till June![/QUOTE] [url]http://www.boost.org/doc/libs/1_46_0/libs/filesystem/v3/doc/index.htm[/url] You might like to give that a try. Essentially all the filesystem interaction will be an operating system level service, so you could try looking up the win32/posix commands to do what you want. Or just use boost to provide a cross platform wrapper. For any serious C++ at all, I would very much recommend using boost: it's like the standard library it should have had, and it actually slightly improves the language features! I love foreach, and the function pointer syntax is also very useful. Also, I'm 99.5% sure you couldn't fuck with the MFT. The operating system simply wouldn't give you access, and even if it did, trying to manually duplicate the filesystem calls on it would be a ridiculous amount of work, and an absolute recipe for disaster! Modern filesystems are complicated.
Is it possible to write a BMP in memory during a cycle to then feed it to sfml? Would it be fast? [editline]6th March 2011[/editline] Is bmp image creation in c++ explained anywhere? Can't find it.
[QUOTE=TerabyteS;28453502]Is it possible to write a BMP in memory during a cycle to then feed it to sfml? Would it be fast? [editline]6th March 2011[/editline] Is bmp image creation in c++ explained anywhere? Can't find it.[/QUOTE] [url]http://www.sfml-dev.org/documentation/1.4/classsf_1_1Image.htm[/url] The image class already appears to contain GetPixel() and SetPixel() methods
I can't find any real good tutorials for C++, does anyone have a favorite website or something for learning?
[QUOTE=bromvlieg;28452289]Whats the code your using?[/QUOTE] [url]http://pastebin.com/sVDY2Q2N[/url]
[QUOTE=eXiv2;28454062]I can't find any real good tutorials for C++, does anyone have a favorite website or something for learning?[/QUOTE] [url]http://learncpp.com[/url] seems good for beginners.
[QUOTE=Darwin226;28454166][URL]http://pastebin.com/sVDY2Q2N[/URL][/QUOTE] Instead of using IPAddress.Parse( "0.0.0.0" ), use IPAddress.Any and instead of NetworkStream use BinaryReader and BinaryWriter there so much easyer to use (System.IO) and for the cl side replace [cpp] TcpClient client = new TcpClient( Dns.GetHostEntry( IPAddress.Parse( ipToConnect ) ).HostName, 13000 ); [/cpp] with [cpp] TcpClient client = new TcpClient(); client.Connect(IPAddress.Parse("127,0,0,1"), 13000) [/cpp]
Yep... Connecting to localhost work but why doesn't it work through internet?
I made a scrollable & zoomable viewer of my Minecraft map thingy: [media]http://dl.dropbox.com/u/11782997/minecraftmapviewer.png[/media] It's missing alpha blending and it has crappy textures and I realized it's never going to work well this way even if I fix those. This could be done better using hardware acceleration. Hooray, I'm never reaching gold now.
[QUOTE=Spoco;28454694]Hooray, I'm never reaching gold now.[/QUOTE] In Dec. 2009 when they announced the Gold upgrade thing, I only had 450 posts. 10 months later I had Gold. It's not impossible.
[QUOTE=Darwin226;28454494]Yep... Connecting to localhost work but why doesn't it work through internet?[/QUOTE] i dont know what Dns.GetHostEntry returns, but it might just return an invalid ip format, or you dint forward your port correcly IPAddress.Parse only accepts ***.***.***.***, so no google.com or something in that format, i think thats where your dns thingy comes in, however i have no idea how the dns thing works xD
Well I tried connecting to my IP using Connect(), nothing. I'll check my forwarding.
I'm sure I've seen this before... on FP. [url]http://coding-experiments.blogspot.com/2009/02/evolving-first-lady-of-internet.html[/url]
Fixed some stuff: [media]http://dl.dropbox.com/u/11782997/minecraftmapviewer2.png[/media] It's fast enough at that zoom level, but if I zoom out, it starts getting slower and consumes huge amounts of memory. Oh well, I'm probably gonna abandon this. I can't be bothered to deal with those blocks with additional data for orientation or different texture and stuff. I don't get why Notch made the texture file like that. They don't seem to be in any particular order or anything, so I had to make a list by hand to map data values to texture positions.
[QUOTE=Spoco;28456719]I don't get why Notch made the texture file like that.[/QUOTE] You can basically replace "the texture file" with anything in Minecraft's code :v: [editline]6th March 2011[/editline] Also, it sucks that SFML doesn't provide text aligning. Now I have to do it all by myself :smith: [img]http://i.imgur.com/CAfbD.png[/img]
Heh, learning java is fun. :v: [code]import java.util.Scanner; class girlyclass { public static void main(String args[]){ System.out.println ("What's your name?"); Scanner NameVariable = new Scanner(System.in); System.out.print (NameVariable.nextLine()); System.out.println (" is a girls name."); } } [/code]
Hi everyone, this is Devin from Lightning Development Studios. You may have seen our previous posts in this thread by Robert (robmaister12). Well, one of the biggest changes has been to completely revamp (and rewrite LOTS of times) our physics engine. And its finally done. Well, sort of. There are just a few small bugs left, but they should be fixed within the next couple days-we wanted to get a video out now because we were all together and we accomplished a lot that day (yesterday). Robert should post another video demoing the XML-parsing level editor up here soon. EDIT: Video Fixed [media]http://www.youtube.com/watch?v=AJko14kzKBA&feature=channel_video_title[/media]
SFML does support text aligning. When you've created the String2D object and set the font and text properties, you can use obj.GetRect() or something like that to get the size (if using SFML.Net). Once you know the size, it's an easy calculation to center it.
[QUOTE=devthered;28457102]Hi everyone, this is Devin from Lightning Development Studios. You may have seen our previous posts in this thread by Robert (robmaister12). Well, one of the biggest changes has been to completely revamp (and rewrite LOTS of times) our physics engine. And its finally done. Well, sort of. There are just a few small bugs left, but they should be fixed within the next couple days-we wanted to get a video out now because we were all together and we accomplished a lot that day (yesterday). Robert should post another video demoing the XML-parsing level editor up here soon. <iframe title="YouTube video player" width="640" height="390" src="http://www.youtube.com/embed/AJko14kzKBA" frameborder="0" allowfullscreen></iframe>[/QUOTE] Use media tags: [noparse][media][/media][/noparse]
[QUOTE=thomasfn;28457114]SFML does support text aligning. When you've created the String2D object and set the font and text properties, you can use obj.GetRect() or something like that to get the size (if using SFML.Net). Once you know the size, it's an easy calculation to center it.[/QUOTE] That's exactly what I'm going right now. What I meant was, being able to align text by doing something like... [cpp]String2D t = new String2D("TEST"); t.AlignMode = AlignMode.Center; [/cpp]
if anyone was interested. [media]http://www.youtube.com/watch?v=AJko14kzKBA&feature=player_embedded[/media]
[QUOTE=BlkDucky;28457145]Use media tags: [noparse][media][/media][/noparse][/QUOTE] Thanks. Sorry, im new to facepunch.
[media]http://www.youtube.com/watch?v=QLqyDloGm9U[/media]
Sorry, you need to Log In to post a reply to this thread.