• What Are You Working On? April 2015
    1,741 replies, posted
Well whats happening that is unexpected? You didn't tell us what the problem you were having is.
[QUOTE=Socram;47636040]Well whats happening that is unexpected? You didn't tell us what the problem you were having is.[/QUOTE] Sorry didn't point it out precisely: [code] swapObjects (ref arrayToSort [i], ref arrayToSort [i + 1]); //got error here: System.ArrayTypeMismatch; //Source array type cannot be assigned to destination array type[/code]
[QUOTE=proboardslol;47636072]Sorry didn't point it out precisely: [code] swapObjects (ref arrayToSort [i], ref arrayToSort [i + 1]); //got error here: System.ArrayTypeMismatch; //Source array type cannot be assigned to destination array type[/code][/QUOTE] if you are doing i+1, then it should be"arrayToSort.Length-2"
Ahh I believe I see it; I don't believe it to be a true runtime error (though it did occur in run-time), It seems to be that C#'s polymorphism only works one way; i.e: I can assign an object to an inherited class, such as: [code] Object a = new String; [/code] and I can do [code] Object a = new String; String b = a; //as long as Object a is a String at runtime [/code] but, I can't implicitly assume that when assigning references abstractly, as in: [code] private static void swap(ref Object a, ref Object b){ Object tmp = a; a = b; b = tmp; } [/code] Since I guess C# has no way of knowing if a and b are the same object in the assignment? This is all conjecture, but whatever the reason, I fixed this by doing: [code] public static void bubbleSortObjects(Object[] arrayToSort){ Boolean doneSorting = false; while (!doneSorting) { doneSorting = true; for (int i = 0; i < arrayToSort.Length-1; i++) { if (String.Compare (arrayToSort [i].ToString (), arrayToSort [i + 1].ToString ()) > 0) { Console.WriteLine (arrayToSort [i].ToString () + " " + arrayToSort [i + 1].ToString ()); //temporary objects to swap and then return the values back to the array Object a = arrayToSort [i], b = arrayToSort [i + 1]; //swap temp objects, not array points swapObjects (ref a, ref b); //return temporary values back to array points arrayToSort [i] = a; arrayToSort [i + 1] = b; doneSorting = false; } } } } [/code]
Space game for school is going well till, just finished the skydome! [thumb]http://i.imgur.com/Xnp4Drf.png[/thumb]
Why don't you just take an array of strings as the argument?
[QUOTE=proboardslol;47635728]Don't call it tetris. The tetris company will sue you. Call it brick gravity simulator 2015[/QUOTE] I thought they could only sue if you sell it. Also they'll have fun getting a whole lot of zero from me.
[QUOTE=NixNax123;47636133]Why don't you just take an array of strings as the argument?[/QUOTE] if I do that, and I have a bunch of Objects I'd like to sort, I'd have to make a separate String[] which stores all the names (or whatever string values represent each object), and then would sort them. However, that only sorts their names, and not their references, so if I try to access the original Object[], it would still be out of order.
If you know that a is a string you can do this: [code]string b = a as string;[/code] You can also check the type like this: [code]b is string[/code]
I managed to finally implement a grid for my viewports. [t]http://i.imgur.com/bT9AJ3F.png[/t] I really [B]don't like[/B] that the lines won't get smaller as they get further away from the camera, they just look [I]sooo[/I] bad. I'll probably just make the grid toggleable for the 3D view because of this. At the very least, it works just as intended for the orthographic/2d views.
[QUOTE=Karmah;47636286]I managed to finally implement a grid for my viewports. [t]http://i.imgur.com/bT9AJ3F.png[/t] I really [B]don't like[/B] that the lines won't get smaller as they get further away from the camera, they just look [I]sooo[/I] bad. I'll probably just make the grid toggleable for the 3D view because of this.[/QUOTE] Can't you just make the lines a texture and draw it to a plane?
[QUOTE=Ott;47636289]Can't you just make the lines a texture and draw it to a plane?[/QUOTE] I've contemplated that, but I'm not totally confident in texture/image manipulation yet. I could of course pre-make the grid in paint or something, but the grid spacing can change on keystroke, so I'd rather not make a whole bunch of pictures and load them over and over again
[IMG]http://puu.sh/hx7dX/2056ed784a.png[/IMG] It's now sprite based! They're all custom made, you can probably tell. haha
I'm still alive. My chemistry exam today inspired me to bring all the goodness of the periodic table into my native language. [img]http://i.imgur.com/hcNT2rs.png[/img] [img]http://i.imgur.com/tTe8AXU.png[/img]
[QUOTE=Karmah;47636299]I've contemplated that, but I'm not totally confident in texture/image manipulation yet. I could of course pre-make the grid in paint or something, but the grid spacing can change on keystroke, so I'd rather not make a whole bunch of pictures and load them over and over again[/QUOTE] Just draw the lines to a texture (or a canvas, depending on your framework).
skyspheres, next: camera [thumb]http://i.imgur.com/OkwkTPB.png[/thumb]
I recently made a blog post about how to use lua efficiently in a custom built game engine: [url]http://zachary.nawar.org/blog/efficiently-using-lua-in-your-game-engine[/url] Hopefully someone on here will find some use of it.
[QUOTE=Fantym420;47636142]I thought they could only sue if you sell it. Also they'll have fun getting a whole lot of zero from me.[/QUOTE] It's mostly about protecting their trademark. You can't just make a "mario cart" clone and call it "mario cart" and put it online.
[QUOTE=Mega1mpact;47636974]It's mostly about protecting their trademark. You can't just make a "mario cart" clone and call it "mario cart" and put it online.[/QUOTE] Names and such are trademarks, so no, you can't. However, if you create characters that look like Mario, you can still be sued for using their IP. Not sure what would be considered copying them and what wouldn't, but if you made a game in the same style but all custom made that look nothing like Mario kart, and you still have the same game mechanics, they can't sue you.
Also my school project which we just finished: [video=youtube;lQhubD6pPxY]http://www.youtube.com/watch?v=lQhubD6pPxY[/video] [URL]https://www.youtube.com/watch?v=lQhubD6pPxY[/URL] (what happened to embedding youtube)
[QUOTE=proboardslol;47636121]It seems to be that C#'s polymorphism only works one way[/QUOTE] It's [url=https://msdn.microsoft.com/en-us/library/aa664572%28v=vs.71%29.aspx]array covariance[/url]. You should be [url=http://ideone.com/aczdem]using generics[/url] for this.
[QUOTE=sarge997;47634771][B]Noodle Simulator.[/B] [IMG_thumb]http://i.imgur.com/YcosR8t.png[/IMG_thumb] [B][I][URL="http://a.pomf.se/yapiau.mp4"]Video[/URL][/I][/B] [sp]I don't know what I'm doing with my life anymore.[/sp][/QUOTE] collab bro?!?! [video=youtube;hkyegFnFl9w]http://www.youtube.com/watch?v=hkyegFnFl9w&feature=youtu.be&t=45s[/video] haha seriously that looks great, the [URL="http://www.leapmotion.com"]Leap Motion Controller[/URL] would be good fun with it I think, you should check it out. Having to pick individual noodles out of the bowl & dangle them over your head to eat them.
[QUOTE=andrewmcwatters;47635000]It's kinda surprising how slow real-world IPv6 transition rates have been. I hope that more aggressive moves are made in the near future to move people onto the newer version.[/QUOTE] It's not really suprising. It brings no improvements and is a complete fucking abomination, and then there's things like Mobile IPv6 which are simply completely insane.
[QUOTE=andrewmcwatters;47635000]It's kinda surprising how slow real-world IPv6 transition rates have been. I hope that more aggressive moves are made in the near future to move people onto the newer version.[/QUOTE] When we actually start running out of IPv4 address space, there will be plenty of economical intensive to move to ipv6. Until then there is no reason to do so, only need to make when it actually happens it doesn't hit very hard. (also adaption on the server end pretty reasonable, and the only reason why so many sites don't support it, is because people are too lazy to setup their AAAA records)
[QUOTE=bunguer;47630689]Not related to the lighting but there's a strong style clash between the character and the background, the pixel density is very different.[/QUOTE] I'm a bit late but I think the character is actually Dragon Knight from Dota 2 so I'm guessing it's just a placeholder at the moment.
[video=youtube;YMPzDiraNnA]http://www.youtube.com/watch?v=YMPzDiraNnA[/video] Just watched this video. You know what? Fuck all, I'm going back to Unreal. I'll stop begging for help, crash everything, and struggle and crawl until it compiles, because that's what I was doing wrong, this is how it meant to be. Self-taught. That video is the best thing that happened to me in a straight few months. I feel so motivated right now. Honestly, I recommend that video to all [I]beginners[/I], not just programming but every kind of.
Just spent all night on A* pathfinding. And it still doesn't work the way I want it. Things get stuck, path-finding dies in certain spots. bleh/damnit
Here are some renders from the art we're implementing in our game. This is not rendered in the game engine, but the art looks cool nonetheless. [t]http://i.imgur.com/wwwfuW1.png[/t] (other post incoming by teammate) [t]http://i.imgur.com/hlAFwwD.jpg[/t] (this is what it actually looks like on the PS4, without fancy shaders and lighting)
[t]http://i.imgur.com/CXIsDhl.png[/t] It's a game where you can kill Nikola Tesla as Einstein.
[QUOTE=PelPix123;47636777][media]http://soundcloud.com/kaybeccab/debussy[/media] Showing off the soundboard and sympathetic resonance. Totally dry. The reverb you hear is from the soundboard, cabinet, and string reso. [editline]1st May 2015[/editline] Purgatory creek midi test: [media]http://soundcloud.com/kaybeccab/pianotest[/media][/QUOTE] This is absolutely incredible. I thought it was a real piano all the time.
Sorry, you need to Log In to post a reply to this thread.