|
Schmerm posted:Here's a nonportable way I use to generate temporary breakpoints, that works only on x86: You can also use code:
|
# ? Jun 1, 2013 01:07 |
|
|
# ? May 27, 2024 03:39 |
|
Got another question for you guys. So I had my game level load background objects, then the player, and then foreground objects. That way I can have the player, for example, walk behind trees on the bottom of the screen and walk in front of trees at the top of the screen. I realized I needed something more dynamic though, because if I have a tree in the center of the screen -- I want the player to be infront of it while he is below its center, and then behind it when he is above it. The only solution I came up with is to re-add objects to the stage that the player interacts with, depending on his relative Y coord: if(player.y > object.y) level.addChild(object.y) else level.addChildAt(object.y, 0) This works great as long as the object is alone. But if I have an arrangement of objects that are overlapping, they zip above and under each other as the player interacts with them. So how do I change the objects arrangement relative to the player, without changing it's arrangement relative to other objects? Or should I be changing the players arrangement instead? Maybe I'm coming at this all wrong. Actionscript's child system is kind of confusing.
|
# ? Jun 1, 2013 03:12 |
|
Baldbeard posted:Got another question for you guys.
|
# ? Jun 1, 2013 04:52 |
|
I just discovered that Steam Overlay only works in OpenGL and DirectX. I use SDL. Is it possible to just init OpenGL and put a transparent rectangle thing in-front of my game that doesn't do anything and then just go back to SDL for everything else? It sounds loving stupid, but it might be the easiest way to do this.
|
# ? Jun 1, 2013 08:14 |
|
Mug posted:I just discovered that Steam Overlay only works in OpenGL and DirectX. I use SDL. Maybe? It'd add overhead though. A few SDL games on steam just don't offer overlays. Not the worst thing in the world if you have a windowed mode. People usually don't necessarily want to use the overlay in a fast paced game anyway.
|
# ? Jun 1, 2013 08:50 |
|
Mug posted:I just discovered that Steam Overlay only works in OpenGL and DirectX. I use SDL. I just tested it out with Eversion on Steam which uses SDL and the overlay is fine. The Gripper fucked around with this message at 10:24 on Jun 1, 2013 |
# ? Jun 1, 2013 10:20 |
|
Doesn't work for me and the steam apps documentation says it only works on gl and directx. I'll fiddle more.
|
# ? Jun 1, 2013 10:51 |
|
Speaking of SDL, I just wasted more hours than I'm willing to admit converting (the useful parts of) a mediocre SDL1.2 font/text rendering library to work with SDL2. On the bright side, at least I can finally appreciate how huge a leap forward SDL 2 is over previous versions. I mean, just look at the differences!code:
code:
|
# ? Jun 1, 2013 11:19 |
|
Mug posted:Doesn't work for me and the steam apps documentation says it only works on gl and directx. I'll fiddle more. SDL2 uses OpenGL and DirectX under the hood, while 1.2 and previous used software acceleration. You'd have to force SDL 1.2 to do hardware acceleration and that could open up a can of worms for you.
|
# ? Jun 1, 2013 11:32 |
|
Mug posted:I just discovered that Steam Overlay only works in OpenGL and DirectX. I use SDL. It ignores all the advantages of hardware rendering, but at least it gives you an OpenGL output that can be picked up by Steam, capture software, etc. without having to rip your code apart (it's what we did for OpenXcom ). You might make it an option though because there always tends to be someone with lovely hardware that doesn't play well with OpenGL. SupSuper fucked around with this message at 15:21 on Jun 1, 2013 |
# ? Jun 1, 2013 15:15 |
|
SupSuper posted:SDL1.2 should automatically use DirectX/OpenGL if your screen is a hardware surface (edit: apparently you have to use SDL_putenv("SDL_VIDEODRIVER=directx") on Windows but it's not guaranteed to give good results), but if that doesn't work, the "easiest" solution is to just enable OpenGL, render all your screen contents to a separate surface (instead of the SDL screen surface as it'll no longer work), and pass that on to OpenGL as a textured quad on the screen. This code sample should get you started. Doing the simple putenv didn't seem to work I can do the latter, but I had a really limited understanding of how the backend SDL stuff is working so all I really managed to do was get the program to initialize a white screen then instantly close. Maybe I'll leave it for now and get back to importany things.
|
# ? Jun 1, 2013 17:13 |
|
Waiting with bated breath for the game dev challenge thread to open up. Eager to get this ball rolling
|
# ? Jun 1, 2013 17:32 |
|
syntaxrigger posted:Waiting with bated breath for the game dev challenge thread to open up. Eager to get this ball rolling First year this year! Where does the thread go COBOL games or somewhere else?
|
# ? Jun 1, 2013 18:37 |
|
syntaxrigger posted:Waiting with bated breath for the game dev challenge thread to open up. Eager to get this ball rolling I slept in this morning. It was glorious.
|
# ? Jun 1, 2013 19:05 |
|
Thanks Shalinor! Sleeping in is the bees knees. Please put the link in this thread
|
# ? Jun 1, 2013 19:12 |
|
thegasman2000 posted:First year this year! Where does the thread go COBOL games or somewhere else? My first year as well, really excited to have an excuse to make a game that isn't a part of a 48 game jam.
|
# ? Jun 1, 2013 20:35 |
|
SA GameDev 8 is on
|
# ? Jun 1, 2013 23:19 |
|
I was thinking based on suggestions in The Other Game Design thread to use Unity/Futile for 2D game design, would it be worth picking up any reference books for Unity and if so what would people recommend? My 'local' bookstore has Professional Unity and C#: Multi-Platform 3D Game Development, any good?
|
# ? Jun 2, 2013 03:13 |
|
Raenir Salazar posted:I was thinking based on suggestions in The Other Game Design thread to use Unity/Futile for 2D game design, would it be worth picking up any reference books for Unity and if so what would people recommend? My 'local' bookstore has Professional Unity and C#: Multi-Platform 3D Game Development, any good? If you're looking to do Unity/Futile, a Unity book won't help much since all of your work will be in C# and not the Unity UI.
|
# ? Jun 2, 2013 04:34 |
|
xzzy posted:Tomorrow is May 31st in the US. I swore the thread got posted a few weeks before the theme annoucement, but I just found the thread now so hooray.
|
# ? Jun 2, 2013 05:33 |
|
Not quite a finished dealio, but here's what I've been working on for the past few days. linked because it seems chrome doesn't like big gifs or something? The objective is real-time lighting. The traditional way of doing that in 2D would be to use a stencil-buffer method, that is, for each light, project all geometry away from the center point (to get the "shadows") and render that to the stencil buffer, and then re-render the scene. That method requires you to do at least two passes (including re-rendering the entire scene, usually) for every light. In contrast, what I've come up with is an algorithm for directly computing the single polygon making up the light's visible area. It's like a more complicated version of the Graham scan, but still runs in O(n log n) (where n is the number of corners of world geometry on-screen, roughly). The cool thing is because we're calculating the lit area, rather than the shadows, the lighting draws are then additive instead of stencil-based, so I can render the entire lighting for arbitrarily many lights in just one draw call. Edit: here's it running with a limited radius, which is maybe more obvious what's going on. linked because it seems chrome doesn't like big gifs or something? The best thing is this is perhaps the densest algorithm I've ever written and it basically worked the first time I ran it, although I had spent the past day or two thinking very carefully and drawing lots of diagrams seiken fucked around with this message at 16:37 on Jun 2, 2013 |
# ? Jun 2, 2013 12:42 |
|
So the mushroom is whats giving off the light right? By a more complex Graham Scan you're kinda just basically going around corners of the local geometries until your back to where you started and voila, that's your lighting (and by extension, everything else is shadow?)? e: Also for some reason that last picture freezes my browser to scroll over it.
|
# ? Jun 2, 2013 16:02 |
|
Raenir Salazar posted:So the mushroom is whats giving off the light right? Yeah. The idea is pretty simple at a high-level, but trickier in implementation. Mostly to do everything efficiently so that you don't need to sort all the vertices in the world for every light. It's also completely algebraic (no trigonometric functions). It's also similar in many ways to an "angular" variant of the sweep line algorithm in polar coordinate space - you're basically forming the polygon defined by the furthest point for every angle that doesn't cross the back-side of any world geometry. Now I need to write the shader that actually uses this to light the scene e: you're right, it does for me as well, no idea why, I edited and linked them so as not to mess up everyone's chrome seiken fucked around with this message at 16:24 on Jun 2, 2013 |
# ? Jun 2, 2013 16:13 |
|
In case anyone else is doing multiplayer stuff in HTML5, and also just because I want to rant about it, there's a horrible Chrome bug that it took me 3 days of debugging to figure out approximately what it is. What I'm doing is using nginx's http_push_module to facilitate reasonably quick communication. On the client side, this is basically a long request with no (or long) timeout, and when it receives a message it initiates another long request. What I was originally doing is, during the XMLHttpRequest onreadystatechange handler, parsing the message and initiating a new XMLHttpRequest. Approximately one time in four, this wouldn't work - the new request would exist, there would be a "pending" request in Chrome's debug network stuff, but it wouldn't receive any message. Obviously a nightmare to debug since it's hard to tell whether it's even server-side or client-side that the problem exists, and if client-side whether it's in the request-sending or receiving. But it didn't ever seem to fail on Firefox or IE. Also, the communication is over SSL - Chrome's bug might not occur without that. Also, when I made a separate test page doing just this with the XMLHttpRequests, it worked fine, so I'm guessing there's some interaction with garbage collection or something involved in making it fail too. It's a pretty loving finicky bug. I eventually managed to find what was actually happening using chrome://net-internals/#sockets - it turns out that when it works, a new socket is created, but when it fails, I think maybe it attempts to reuse the old socket just before it closes; there's a "socket closed" at the end of that socket in the net-internals page, but the closure never gets reported to the XMLHttpRequest handler so the javascript just sits there thinking it's pending forever. (As does the developer tools "network" tab!) As a workaround, I moved the "make a new request" block of code into a setTimeout(RequestAgain,10) form, so now it works reliably enough in all the major browsers, but man that was bullshit to find, and that solution is bullshit too.
|
# ? Jun 2, 2013 17:10 |
Alright I'm really feeling torn where to go with my next project. I just read about this on the cocos2d site; http://www.apportable.com/ Appearantly a lot of people have been able to get their project working pretty quick with the free version. I am really interested in cross platform. I spent the past year learning objective-c and then cocos2d. i sorta started learning c++, then when unity gave free versions of ios/android I decided to learn c#/ unity. I just ported the absolute basics to get started to unity, and have actually gotten pretty pumped to release for pc/ios/android. With this though, I can do android/ios projects seamlessly with a language I am very comfortable in. I can continue with cocos2d. I lose pc as a platform though. What should I do? Unity, or continue with cocos2d? I will be trying to make money off my new project
|
|
# ? Jun 2, 2013 22:20 |
|
Ok, here's the fruits of my labour. I linked it on another page so it doesn't break with the huge gif and I can blow it up to twice the size. Lighting test! Next up: normal mapping, so the tile details are lit consistently with the rest of the lighting. seiken fucked around with this message at 22:17 on Jun 3, 2013 |
# ? Jun 3, 2013 21:51 |
|
seiken posted:Ok, here's the fruits of my labour. I linked it on another page so it doesn't break with the huge gif and I can blow it up to twice the size. That's really neato. I'll be disappointed if the final art isn't a mushroom on fire.
|
# ? Jun 4, 2013 01:07 |
|
Can any resident XNA gurus tell me how I should be rendering my sprites so that they aren't incredibly blurry when I'm moving them around? I Googled around to no avail. edit: vvv I forgot to mention that I tried that unsuccessfully, unless I hosed it up somehow. I'll try it again. Kibbles n Shits fucked around with this message at 10:37 on Jun 4, 2013 |
# ? Jun 4, 2013 05:19 |
|
From what I can remember I think you need to clamp the XY position to whole numbers. Found this with a quick search: http://stackoverflow.com/questions/14821400/sprite-becomes-blurred
|
# ? Jun 4, 2013 09:48 |
|
DarthJeebus posted:Can any resident XNA gurus tell me how I should be rendering my sprites so that they aren't incredibly blurry when I'm moving them around? I Googled around to no avail. Are they just plopped on stage or are you rendering them off a camera? If its a camera you need to clamp that too.
|
# ? Jun 4, 2013 12:13 |
|
You can probably set some sort of filtering to "point filtering" to get non-blurred sprites. I don't know what the XNA way to do that is, but every other interface to DirectX/OpenGL does it.
|
# ? Jun 4, 2013 15:32 |
Did you try changing the SamplerState? I believe you will want to use either SamplerState.PointWrap or SamplerState.PointClamp, depending on whether you care about repeating the texture and its dimensions are a power of 2. If you're using SpriteBatch, you'll set it in SpriteBatch.Begin(), otherwise find your Game's GraphicsDevice.SamplerStates[0] and set that. Also, one small thing you could try is rounding then adding .5 to x and y but this would indicate your viewport is off. Also as mentioned, check your camera to make sure it's coordinates are rounded as well. Polio Vax Scene fucked around with this message at 15:38 on Jun 4, 2013 |
|
# ? Jun 4, 2013 15:35 |
|
seiken posted:Ok, here's the fruits of my labour. I linked it on another page so it doesn't break with the huge gif and I can blow it up to twice the size. Any chance will you be licensing this code or making it open source?
|
# ? Jun 4, 2013 18:06 |
|
Raenir Salazar posted:Any chance will you be licensing this code or making it open source? here you go, the license is the gently caress you licenses are boring license
|
# ? Jun 4, 2013 18:29 |
|
seiken posted:here you go, the license is the gently caress you licenses are boring license
|
# ? Jun 4, 2013 18:35 |
|
roomforthetuna posted:I would like this license to actually exist. But I can't imagine what it would say other than "gently caress you, licenses are boring", which wouldn't really convey any "I'm not going to sue you later for using my poo poo." I suppose you could add that too. I mean there is the WTFPL which is kind of in that same spirit
|
# ? Jun 4, 2013 18:37 |
|
seiken posted:here you go, the license is the gently caress you licenses are boring license Maybe I would share my code more often if it was this nice and commented...
|
# ? Jun 4, 2013 18:37 |
|
Could anyone give me a quick summary about ports? I really suck at networking. Basically my problem is that my game will not work on computers outside of my own network. (I have changed the IP that the client should connect to from localhost to my actual IP, am I doing any silly errors by this?) edit: The person I have tried it with so far is just one person, so the error might just be with firewalls or such, but my question still stands. DancingPenguin fucked around with this message at 22:44 on Jun 4, 2013 |
# ? Jun 4, 2013 22:38 |
|
seiken posted:here you go, the license is the gently caress you licenses are boring license Man! I wish my code was half as clean as yours. Thanks for sharing. E: Why did you "typedef double world"? What does world mean in that context? Workaday Wizard fucked around with this message at 22:56 on Jun 4, 2013 |
# ? Jun 4, 2013 22:49 |
|
|
# ? May 27, 2024 03:39 |
|
DancingPenguin posted:Could anyone give me a quick summary about ports? On your router (assuming you're hosting), the port that you're using needs to be open. Make sure your ip isn't changing when you give them the build (this should really be something they as a client should be able to change, but I understand hard-coding it for testing purposes). cmyip.com is good for that. I'm also assuming everything works correctly on localhost, if it does work correctly connecting to 127.0.0.1, then it's a router port-forwarding issue on the host.
|
# ? Jun 4, 2013 22:57 |