• What are you working on? v16
    5,004 replies, posted
I just created my first program in C++! It prints Hello World! :buddy:
[QUOTE=yumi_cheese;28837170]I've been working on attempting to get a nice openGL development environment within Linux. Of course after installing display drivers, I can no longer boot Ubuntu, siiiiigh.[/QUOTE] Download Ubuntu 11.04, it has the latest (I think) open source drivers. They're generally more reliable.
[QUOTE=Dlaor-guy;28835250]I didn't understand a single word of this post so I'm going to rate it Programming King :v:[/QUOTE] Well you've got some bools and some ushorts which i can only imagine is some sort of arab version of a swimming pool and swimming shorts. He's returning some of the ushorts because they aren't in his size (size 0). Pretty simple really.
[QUOTE=Jookia;28837342]Download Ubuntu 11.04, it has the latest (I think) open source drivers. They're generally more reliable.[/QUOTE] >11.04 Also, depends. Nouveau is less reliable than Nvidia, but the open-source Radeon drivers are good.
[QUOTE=yumi_cheese;28837170]I've been working on attempting to get a nice openGL development environment within Linux. Of course after installing display drivers, I can no longer boot Ubuntu, siiiiigh.[/QUOTE] Boot up in single-user mode, you should get a tty without X. From there, take a look at /etc/X11/xorg.conf; when my driver was screwed it was almost always that file. If you can't get it to work you can still re-install mesa or something from there to get back to your desktop environment.
Does anyone know where I can upload videos at 60fps, short of dumping them on an FTP somewhere? also, where did all my posts go :saddowns:
Finally managed to get the farseers debug view working [img]http://img215.imageshack.us/img215/9044/38536086.jpg[/img] Does anyone know of a fix for the 1 pix bug in farseers? ow did you fix it Dlaor-Guy? Also Level editor works fine in mono :DDD That was one of the main things i wanted with the level editor [img_thumb]http://img41.imageshack.us/img41/3622/screenshotdc.png[/img_thumb]
[QUOTE=yumi_cheese;28837170]I've been working on attempting to get a nice openGL development environment within Linux. Of course after installing display drivers, I can no longer boot Ubuntu, siiiiigh.[/QUOTE] Same thing happened with me and fedora. I just installed kmod-nvidia and verbose mode says that its appereantly incompatible with my GTX 560 :bang: . So I boot into command line with the boot option '3' and uninstall the driver. Then I reboot and it looks like it's still there :smith: .
You can add and read level descriptions now! Also more symbols for names and descriptions. [img_thumb]http://filesmelt.com/dl/descriptions.png[/img_thumb] [B][url]http://stabyourself.net/physicsR32.love[/url][/B]
[QUOTE=ZeekyHBomb;28837562]Boot up in single-user mode, you should get a tty without X. From there, take a look at /etc/X11/xorg.conf; when my driver was screwed it was almost always that file. If you can't get it to work you can still re-install mesa or something from there to get back to your desktop environment.[/QUOTE] Could you perhaps explain to me how to do any of that?
[QUOTE=Richy19;28837637]Does anyone know of a fix for the 1 pix bug in farseers? ow did you fix it Dlaor-Guy?[/QUOTE] I don't have this "1 pix bug" you speak of. Everything sits right next to each other in my game, so you're probably doing something wrong.
[QUOTE=DeadKiller987;28837745]Same thing happened with me and fedora. I just installed kmod-nvidia and verbose mode says that its appereantly incompatible with my GTX 560 :bang: . So I boot into command line with the boot option '3' and uninstall the driver. Then I reboot and it looks like it's still there :smith: .[/QUOTE] You can use the [url=http://www.nvidia.com/object/linux-display-amd64-270.26-driver.html]beta driver[/url] until a gold release is available. [QUOTE=DeadKiller987;28837788]Could you perhaps explain to me how to do any of that?[/QUOTE] Doesn't Ubuntu create a GRUB entry for that anymore? Anyways, a quick googling showed me that you can do that by adding the word single to the kernel options, so when you're in GRUB edit the kernel entry and just put 'single' without quotes to the end and boot. You can use a cli-editor like nano to edit the xorg.conf. You can also look if you have the nvidia-xconfig utility, which tries to write a fitting xorg.conf for you, I think that worked fine for me.
[QUOTE=Dlaor-guy;28837858]I don't have this "1 pix bug" you speak of. Everything sits right next to each other in my game, so you're probably doing something wrong.[/QUOTE] The problem with mine is that if all the blocks are 32x32 and the player is 32x32 then he cant move Im guessing your doesnt have this problem as your using a ball thats smaller than the size of your blocks Yes as i thougt using a ciircle instead of a rectangle fixes all of my problems. Oh well i guess the player could be some kind of mecha that urns into a ball to move like sonic
[QUOTE=ZeekyHBomb;28837883]You can use the [url=http://www.nvidia.com/object/linux-display-amd64-270.26-driver.html]beta driver[/url] until a gold release is available. Doesn't Ubuntu create a GRUB entry for that anymore? Anyways, a quick googling showed me that you can do that by adding the word single to the kernel options, so when you're in GRUB edit the kernel entry and just put 'single' without quotes to the end and boot. You can use a cli-editor like nano to edit the xorg.conf. You can also look if you have the nvidia-xconfig utility, which tries to write a fitting xorg.conf for you, I think that worked fine for me.[/QUOTE] Does it matter that I use Fedora 14 and not Ubuntu? EDIT: Facepunch seems slow suddenly. EDIT2: Also as long as you are helping me fix linux, I've just installed another copy of Win7 on the same drive as Fedora, but on a different partition. Now if I boot from that drive it just bots windows. How do I get grub back?
[QUOTE=Richy19;28837918]The problem with mine is that if all the blocks are 32x32 and the player is 32x32 then he cant move Im guessing your doesnt have this problem as your using a ball thats smaller than the size of your blocks Yes as i thougt using a ciircle instead of a rectangle fixes all of my problems. Oh well i guess the player could be some kind of mecha that urns into a ball to move like sonic[/QUOTE] Or you could reduce the physics box to be 31x31?
Yea but then gaps apear and it makes it possible for the player to get stuck on the walls also it makes the drawing inacurate
C++ is so easy to learn.
[QUOTE=DeadKiller987;28837976]Does it matter that I use Fedora 14 and not Ubuntu? EDIT: Facepunch seems slow suddenly. EDIT2: Also as long as you are helping me fix linux, I've just installed another copy of Win7 on the same drive as Fedora, but on a different partition. Now if I boot from that drive it just bots windows. How do I get grub back?[/QUOTE] Nah, the single-user mode is a kernel option. The easiest to get GRUB back is via a LiveCD and then executing grub2-install. You should find a bunch of tutorials on the internet about that problem though.
[QUOTE=Mr.T;28838245]C++ is so easy to learn.[/QUOTE] I disagree, C++ memory management is one of the most annoying things.
[QUOTE=ZeekyHBomb;28838408]Nah, the single-user mode is a kernel option. The easiest to get GRUB back is via a LiveCD and then executing grub2-install. You should find a bunch of tutorials on the internet about that problem though.[/QUOTE] Thanks for the help :buddy:
[QUOTE=Mr.T;28838245]C++ is so easy to learn.[/QUOTE] [img]http://lbrandy.com/blog/wp-content/uploads/2010/03/c++.png[/img] [url]http://lbrandy.com/blog/2010/03/never-trust-a-programmer-who-says-he-knows-c/[/url]
He forgot memory leaks :]
[QUOTE=Maya2008;28838831]He forgot memory leaks :][/QUOTE] You'll know all about those if you know C. C++ makes memory management a lot easier by introducing RAII.
Eclipse(?) just did something extremely screwy; I changed a Gallery to a LinearLayout in my xml layout file and got a class cast exception when I tried to cast that resource as a LinearLayout in the program (it still claimed it was Gallery in the exception). Ended up deleting the file, restarting project, cleaning build, and then it worked.
-snipNextPage-
Got the actual map creation done :D [img_thumb]http://img862.imageshack.us/img862/1688/63822644.jpg[/img_thumb]
[QUOTE=Mr.T;28838245]C++ is so easy to learn.[/QUOTE] It's not difficult at all, but it takes a lot of time to really get to grips with all the concepts. For the first couple of months it's unlikely that you'll understand everything you're typing. It's the same with other languages too really but one thing that really gets people is pointers. You only really understand them properly when you've made bigger apps (I always used to wonder what the point of them was, and the heap, but then you gain an understanding of why you can't use the stack for everything and why shallow copies are problematic in lots of circumstances)
I'm working on a top down shooter, I've posted it before but I never seem to get much input on it from others.:sad: Anyway, here is a picture: [IMG]http://i869.photobucket.com/albums/ab255/Yournameisinvalid21/TopDownShoota.png[/IMG] [B] You can play it here:[/B] [url]http://www.newgrounds.com/dump/item/e4b2ca143e13d1b5a562da2310b2c0f8[/url] (Press arrow keys to move the grey box, WASD to move the player) (Also, My favorite weapon so far is the knife without a texture) [B] Also, unrelated, particles in flash yo'[/B] [url]http://www.newgrounds.com/dump/item/946665a0dd50a0c232c23d616afe2f0b[/url]
Threading is amazingly easy in C#, you just have to make sure the lambdas don't catch any local reference variables: [code]var magnificationTasks = new List<Task>(); unsafe { var sourcePointer = (uint*)sourceData.Scan0.ToPointer(); var hqx2Pointer = (uint*)hqx2Data.Scan0.ToPointer(); var hqx3Pointer = (uint*)hqx3Data.Scan0.ToPointer(); var hqx4Pointer = (uint*)hqx4Data.Scan0.ToPointer(); var width = sourceImage.Width; var height = sourceImage.Height; magnificationTasks.Add( Task.Factory.StartNew(() => { HqxSharp.Scale2(sourcePointer, hqx2Pointer, width, height, trY, trU, trV, trA, wrapX, wrapY); })); magnificationTasks.Add( Task.Factory.StartNew(() => { HqxSharp.Scale3(sourcePointer, hqx3Pointer, width, height, trY, trU, trV, trA, wrapX, wrapY); })); magnificationTasks.Add( Task.Factory.StartNew(() => { HqxSharp.Scale4(sourcePointer, hqx4Pointer, width, height, trY, trU, trV, trA, wrapX, wrapY); })); } Task.WaitAll(magnificationTasks.ToArray());[/code] I'm caching the RGB to YUV lookup table in the background now, so you won't have to wait after first loading an image anymore. Download: [url]http://dl.dropbox.com/u/5013896/forum/Facepunch/Programming%20WAYWO/Tamschitty%20Resizer%200.1.zip[/url] I also made this (not directly supported by the resizer): [img]http://dl.dropbox.com/u/5013896/forum/Facepunch/Programming%20WAYWO/science3x.gif[/img] The artifacts around the edges are because of the anti-aliasing in conjunction with .gif's 1 bit alpha.
You're not doing any kind of inter-thread communication, which means it's going to be easy in any language. For CPU intensive tasks like that where you're using threads for parallelism, scale the amount of threads to the amount of CPUs (cores). On machines with less than 4 cores, your code is actually just going to make it slower. edit: Nevermind, the TPL will do that kind of optimization for you.
Sorry, you need to Log In to post a reply to this thread.