• What are you working on? v16
    5,004 replies, posted
[QUOTE=ace13;28951063]Seems like GWEN doesn't like correctly clipping my cached control, here are two pictures of the clip function replaced to draw the clip region: [img_thumb]http://ace.haxalot.com/pictures/random/zscreen/GAME_D-2011-04-02_19.10.47.png[/img_thumb] [img_thumb]http://ace.haxalot.com/pictures/random/zscreen/GAME_D-2011-04-02_19.12.30.png[/img_thumb] Everything except the main control seems to get correct clipping, but since the main control hosts the other ones they get clipped as well... My clipping code if it helps: [cpp] void SFML::StartClip() { Gwen::Rect rect = ClipRegion(); float scale = Scale(); sf::IntRect view = m_pWindow->GetViewport(m_pWindow->GetView()); int x = floor(float(rect.x) * scale), y = floor(float(rect.y + rect.h) * scale), w = floor(float(rect.w) * scale), h = floor(float(rect.h) * scale); glScissor(x, (view.Top + view.Height) - y, w, h); glEnable(GL_SCISSOR_TEST); } void SFML::EndClip() { glDisable(GL_SCISSOR_TEST); } [/cpp] I can add that the clipping works perfectly on non-cached controls.[/QUOTE] Looks like it's adding the DFrame coords twice. Does it happen when you set a non frame control as the one being cached to a RT?
Just came back from ECOO boardwide, asians beat me. :( I came in 26th out of 60, the top 13 continue to regional. The other team (of asians, surprisingly) from my school came in 52nd. :V Problems 1 and 2 were shit easy then problem 3 came along and I could only get some of the sample results to work (spent 1.5 hours debugging). We decided to just get what we could from it, and we ended up getting perfect. Problem 4 needed trig or some shit which i didn't really remember (fuck you Austech). Did the competition on a Pentium 3 laptop in VC++ 5 (no documentation or code completion), close enough.
Oh god, I just fixed something, but I have no idea how what I did fixed it. Whenever that happens it makes me very nervous. [editline]2nd April 2011[/editline] Ohhhhh... My problem involved dividing something by tangent and subtracting that from something else. So then, when I set it just to not subtract anything when tangent was infinity, it worked. I feel so relieved.
Something that you just coded caused something else to be fixed. Unintended side effects are bad, revert to a previous commit.
[QUOTE=bean_xp;28952895]Third year[/QUOTE] What course? My girlfriend has just dropped out of Hull Uni for a job.
Jesus, is there anybody that doesn't go to hull? :P
[QUOTE=Shrapnel :3;28953850]Jesus, is there anybody that doesn't go to hull? :P[/QUOTE] I only know of 3 people from around here. Myself, you(?), bean_xp(?), and birkett is from across the water I believe.
[QUOTE=SamPerson123;28952212]Yes! I just got my first person maze working! It uses ray casting. [img_thumb]http://i120.photobucket.com/albums/o181/SamPerson12345/firstpersonmaze.png[/img_thumb] It's curved a bit too much right now, I think.[/QUOTE] That curve is nothing. Just look at my abomination: [img]http://i55.tinypic.com/2ai0s5i.png[/img]
[QUOTE=Overv;28950855]I just thought about how you need a different utility to view info about different files. For example Hammer to see what's in a .vmf file, an image viewer for image files, Visual Studio for .sln and .vcxproj files and an archive utility for .zip and .rar files. What if someone made a single program that shows info about every type of file? It doesn't have to have the same functionality as the program made for the file, but it could work like this: [list][*][b].vmf[/b] - Show list of used entities and amounts, map dimensions, brush amount, lighting and name of the skymap. [*][b].sln[/b] - Show a list of projects, configurations and which version of VS is needed to open it. [*][b].dll[/b] - View exported functions (and compiler).[/list] Do you think this would be feasible and/or useful enough?[/QUOTE] Proof of concept: [img]http://dl.dropbox.com/u/5013896/forum/Facepunch/Programming%20WAYWO/RawFile/ProofOfConcept.png[/img] Plugins ...are loaded from any subfolder of the Plugins folder. ...register themselves for a list of data types (strings). ...have full control over the layout of their node. There can be more than one plugin per data type, in wich case the program tries them out until one works. Files are handled by the plugin that has registered for their extension, in this case ".txt". Adding automatic plugin download to this should be less than 50 lines of code. Code for the .txt plugin: [code]using System; using System.Collections.Generic; using System.Linq; using System.Text; using RawFileInterface; using System.Windows.Controls; using System.IO; namespace txtPlugin.RawPlugin { public class TxtPlugin : IRawPlugin { bool IRawPlugin.TryGetControl(out Control control, System.IO.Stream stream, long offset, long? length) { if (length == null) { length = stream.Length - stream.Position; } try { using (var memStream = new MemoryStream()) { stream.Seek(offset, SeekOrigin.Begin); for (long i = 0; i < length.Value; i++) { memStream.WriteByte((byte)stream.ReadByte()); } control = new TextBox() { HorizontalScrollBarVisibility = ScrollBarVisibility.Auto, VerticalScrollBarVisibility = ScrollBarVisibility.Auto, Text = Encoding.ASCII.GetString(memStream.ToArray()) }; return true; } } catch { //Fail silently. } control = null; return false; } string[] IRawPlugin.DataIdentifier { get { return new string[] { ".txt", "ASCII" }; } } Func<string, System.IO.Stream, long, long?, Control> IRawPlugin.ControlRequest { set { return; } } } } [/code] Edit: I added an about Control to the interface and changed the length to long. Let me know if you have suggestions on this.
Carl's-Old-WWE-Game-XNA Progress: [hd]http://www.youtube.com/watch?v=9criyolYVfs[/hd] Entrance lights, video, music are now all scripted. The music over-runs between scenes because I've been lazy and it's only stopped in the destructor, not when the scene ends. Will probably start on Pyro/particles next.
[QUOTE=_Undefined;28953743]What course? My girlfriend has just dropped out of Hull Uni for a job.[/QUOTE] Computer science of course, "Cave modelling and rendering" is my dissertation title. Also I'm fairly certain there are a few more from hull uni I've seen around the boards, though I forget their aliases.
[QUOTE=CarlBooth;28954215]Carl's-Old-WWE-Game-XNA Progress: [hd]http://www.youtube.com/watch?v=9criyolYVfs[/hd] Entrance lights, video, music are now all scripted. The music over-runs between scenes because I've been lazy and it's only stopped in the destructor, not when the scene ends. Will probably start on Pyro/particles next.[/QUOTE] I've never liked the WWE game type. All you do is mash buttons and watch morons kill eachother for peoples amusement. I've never liked WWE itself either.
[QUOTE=_Undefined;28953928]I only know of 3 people from around here. Myself, you(?), bean_xp(?), and birkett is from across the water I believe.[/QUOTE] I might be, got a place just need to decide
[QUOTE=garry;28952920]Looks like it's adding the DFrame coords twice. Does it happen when you set a non frame control as the one being cached to a RT?[/QUOTE] Non-frame controls don't seem to have the problem, no. Even then, on frame controls it's not the frame itself but the content that gets clipped away. I tried a bare Gwen::Controls::WindowControl, that too had the same problem. [img]http://ace.haxalot.com/pictures/random/zscreen/SS-2011-04-02_22.53.55.png[/img] My thought is that since the cached control is rendered to [0, 0] instead of it's real position it somehow messes it up. Example video (First 20 seconds is with a non-cached control): [media]http://www.youtube.com/watch?v=nOHBIrqL-hE[/media] The properties control seems to render in a different way to the rest seeing as when one of those is on screen it redraws all the time. Which also makes me wonder why the frame isn't redrawn on hovers and some other events.
I wanted to try out SFML networking but then I found out the .Net binding doesn't have one. :( I can't find any good .Net networking tutorials either.
System.Net.Sockets
[QUOTE=Frugle;28954907]I wanted to try out SFML networking but then I found out the .Net binding doesn't have one. :( I can't find any good .Net networking tutorials either.[/QUOTE] If you want to work with pure sockets then the built in .Net classes have quite extensive tutorials for them. Otherwise you have several higher level network libraries, [url=http://code.google.com/p/lidgren-network-gen3]lidgren[/url] for example.
[QUOTE=bean_xp;28954638]Computer science of course, "Cave modelling and rendering" is my dissertation title. Also I'm fairly certain there are a few more from hull uni I've seen around the boards, though I forget their aliases.[/QUOTE] I'm usually in the ITBM when it's "booked" by SEED, bitches be lookin' at me strange but you know I don't care. Were you involved in the 24 hour game dev?
[quote=Rohan] Problem 4 needed trig or some shit which i didn't really remember ([b]fuck you Austech[/b]). [/quote] Suck it bitch, I told you it would come in handy some time. I'll still be willing to teach some stuff though if you want. :P
[QUOTE=Frugle;28954907]I wanted to try out SFML networking but then I found out the .Net binding doesn't have one. :( I can't find any good .Net networking tutorials either.[/QUOTE] Use Lidgren! [url]http://code.google.com/p/lidgren-network-gen3/[/url] It's amazing, it implements reliable transmission with UDP packets, so you get the best of both worlds. Does everything for you. There are examples on the wikis and in the repo.
I just made it so there's a portal at the end that takes you to another, larger maze. [img]http://i120.photobucket.com/albums/o181/SamPerson12345/mazeportal.png[/img]
I'm about to finish the project I have due this friday for uni. Don't you just love it when you're "in the zone" and programming goes really well? Don't you just hate it when you only get to that state at 2am?
Haven't you ever just felt like running onto a primed mine? [img]http://i.imgur.com/vwVVr.png[/img]
[QUOTE=Quark:;28959465]Haven't you ever just felt like running onto a primed mine? [img_thumb]http://i.imgur.com/vwVVr.png[/img_thumb][/QUOTE] The tile colour scheme looks very familiar.
Hehe. :)
[QUOTE=Quark:;28959465]Haven't you ever just felt like running onto a primed mine? [/QUOTE] Every day, my friend. Every day...
[QUOTE=DrLuke;28959786]Every day, my friend. Every day...[/QUOTE] Why would you do that? D: [b]Edit:[/b] Oh, as for what I've been working on, I got buildings working well in my game. You can take things outside and put it inside, and vice versa. And all items in buildings save in there. I also have some people that sell you stuff inside their shops. I might do a video on it after I get done playing Sim City for on the SNES. It's been holding up my progress though. :(
[QUOTE=DrLuke;28959786]Every day, my friend. Every day...[/QUOTE] Minesweeper helps, but it just isn't the same. :frown:
Speaking of mines.. [img]http://gyazo.com/ec2286e6f940b709cc8d0297a7fb188d.png[/img] The mines blink and if you step on them you turn into a fine mist. The goal is to get to the pool at the moment, though I may add more mines.
[QUOTE=xAustechx;28957033]Suck it bitch, I told you it would come in handy some time. I'll still be willing to teach some stuff though if you want. :P[/QUOTE] Your YouTube videos on trig were useless. Plus, I tried doing the question a while ago and didn't even get it working.
Sorry, you need to Log In to post a reply to this thread.