Trying to get good looking lightning using really small recursive methods. I think it looks pretty good.
|
|
# ? May 2, 2012 17:00 |
|
|
# ? May 18, 2024 19:47 |
|
I made a remake of Yar's Revenge for the Atari in Java for a class. I named it Char's Revenge. It was a fun project but I can't help but feel my code wasn't quite a sterling avatar of the OO paradigm. I had a game object that kept track of things like collision detection and held all the objects like the shield and enemy. That much I think is fine, but I also had dozens of methods that would just call methods on the games objects, so other classes could interact with them. Things like: public void shieldFunction(){ doFunctionOfShield(); } So that some other object could interact with another, if you know what I mean. As a very green programmer I just couldn't think of another way of doing it, and I'm not even sure if it's a poor practice, but the phrase "catapillar programming" comes to mind.
|
# ? May 2, 2012 21:58 |
|
Toying around with Android development for the first time, so I'm making a roguelike in libgdx. Item / world interactions work, inventory works, combat and pathfinding work, and its starting to get to a playable state. I'm already reading tile types and items from XML but I need to do the same for enemies. After that, I just need to get equipment working, and I'll be ready to do the fun part- world generation. It's not actually going to be fantasy themed, so it'll look totally different, but I'm enjoying the project a lot so far. I'm trying to avoid the usual information overload style of roguelikes and instead offer context sensitive interaction- tapping on a tile will perform the default action for whatever it contains, while a tap hold will bring up a list of all possible interactions. It works pretty well so far.
|
# ? May 3, 2012 00:00 |
|
DeathBySpoon posted:stuff How have you approached controls when developing for Android? A lot of the pograms I've made seem like good things to port to Android for practice but touch screens require a whole different strategy. Has it been annoying for you or is it much easier when you're designing for Android as opposed to porting?
|
# ? May 3, 2012 01:32 |
|
Manslaughter posted:Trying to get good looking lightning using really small recursive methods. I think it looks pretty good.
|
# ? May 3, 2012 01:52 |
steckles posted:These look sweet. What's the method exactly? Whipped up in GM but you get the general idea: code:
|
|
# ? May 3, 2012 15:06 |
|
Been working on my RPG some more. Messing around with the archer's attack range, it's based on height differences, which also generally for some reason makes somewhat sensible line-of-sight decisions. Added some indicators of where a move or attack order is coming from/going to. This is only ever a problem with big hills but is it really a problem?
|
# ? May 3, 2012 22:01 |
|
Manslaughter posted:Whipped up in GM but you get the general idea: This is pretty awesome so I whipped up a highly inneficient HTML5 Canvas version in CoffeeScript with some fancy animation effects. Edit: And here's a pixelly "retro" version. dizzywhip fucked around with this message at 23:28 on May 3, 2012 |
# ? May 3, 2012 23:23 |
|
Manslaughter posted:Whipped up in GM but you get the general idea. What does the "<>" stand for or do?
|
# ? May 4, 2012 03:50 |
|
Suran37 posted:What does the "<>" stand for or do? In some languages <> means not equal, not sure about GM but that's what I'd guess.
|
# ? May 4, 2012 03:55 |
|
Pfhreak posted:I continue to crack away at Marathon's map format in my spare time. I now render it using actual WebGL calls (gl.drawElements) rather than 2D canvas calls. Also, I can read the polygon type (water, platform, etc.) and respond accordingly. I'm incorrectly rendering secret doors, landscaped textured polys, and a few other things, but it's a solid first cut I think. It's been a while since I posted my progress on this, but here's the latest screenshot: You'll see I now can render the level geometry, texture it, and apply lighting to it. Getting the lights to behave just like they did in the original engine took a little bit of doing, so I went ahead and recorded a (crappy low quality) video of them in action: http://www.youtube.com/watch?v=i8Me6KZQ-iw New higher quality video! Aleph one allows for each surface to be painted with a light index (see 0-25 above), and before I had them applied to surfaces, I rendered them to HTML elements below my canvas. 0-20 are predefined 5% increments, but above that there are pulsing lights, strobes, and flickering lights. Pfhreak fucked around with this message at 16:59 on May 4, 2012 |
# ? May 4, 2012 06:51 |
|
Pfhreak posted:Edit: If someone has any tool suggestions for screen recording only a portion of my desktop, I'd be thrilled to hear them. http://camstudio.org/ might work
|
# ? May 4, 2012 07:18 |
|
I know this is old news for most desktop environments, but here's something that's a bit hard to do under X/Linux: transparent window decorations. It's also driven by CSS: code:
|
# ? May 4, 2012 12:10 |
|
Pfhreak posted:It's been a while since I posted my progress on this, but here's the latest screenshot: Jesus, this is really impressive.
|
# ? May 4, 2012 18:50 |
|
I've been working on a meal planner app for android: You add ingredients Create a meal with them and then it plans your week using the power of random number generators! (Not done: Generating a shopping list and using perishable ingredient markers to suggest the correct "best before" dates to look for)
|
# ? May 5, 2012 20:37 |
|
Manslaughter posted:Whipped up in GM but you get the general idea: Sweet, thanks!
|
# ? May 6, 2012 03:04 |
|
Someone in the CC subforum here posted this: So I spent this weekend writing it in Ruby with Chingu: I obviously have a little left to do (loving rivers ugh) but it's been fun. It reads the world from a txt file filled with heights. Also, isometric stuff is not fun at all.
|
# ? May 6, 2012 16:15 |
|
Trying not to be a total failure at PHP & mySQL, so I'm making a simple todo app to expand my skills. Also as an excuse to use Twitter Bootstrap, which is pretty rad. I develop in VB.NET and ASP.NET in my day job, and using PHP is a lot harder because it basically doesn't tell you squat and you have to set up a lot yourself. As for the app, you can add tasks, and each task can have #hashtags as well which will appear within the task. I need to make a sort by tag page still. You can mark tasks as complete and delete them, as well as view completed tasks and "uncomplete" completed tasks. Here is a live example on EC2: http://ec2-23-23-212-251.compute-1.amazonaws.com/index.php The Github repo. Please be kind on my PHP, which is probably full of flaws/worst practices that I don't know about : https://github.com/Martin-Brennan/todo And some screens in case the site goes down:
|
# ? May 7, 2012 10:33 |
A Sober Irishman posted:Trying not to be a total failure at PHP & mySQL, so I'm making a simple todo app to expand my skills. Also as an excuse to use Twitter Bootstrap, which is pretty rad. I develop in VB.NET and ASP.NET in my day job, and using PHP is a lot harder because it basically doesn't tell you squat and you have to set up a lot yourself. I was bored at work so I attempted some half-hearted injection attacks (I'm helping! I'm helping!) The code fails to add tasks with single quotes in the name. Probably a protection measure, but not sure if you would consider that an issue with usability (what if I wanted a task with a single quote in it?) I noticed I could just look at the source code though which kind of takes all the fun out of the injection stuff so I gave up. Did notice this though: $mysqli = new mysqli('localhost', 'mjrbrennan', 'develop', 'todo'); Not going to try, but I hope that user doesn't exist for other hosts
|
|
# ? May 7, 2012 18:23 |
|
A Sober Irishman posted:I develop in VB.NET and ASP.NET in my day job, and using PHP is a lot harder because it basically doesn't tell you squat and you have to set up a lot yourself. I'm not a big PHP guy, but it seems that people that are doing real PHP development are using a framework like CakePHP. http://cakephp.org/ Should be more like you are used to with the WebForms / MVC stacks.
|
# ? May 7, 2012 19:52 |
|
jarito posted:I'm not a big PHP guy, but it seems that people that are doing real PHP development are using a framework like CakePHP. CakePHP is pretty awful, although mostly because it's written in PHP. PHP is fine for quick & dirty scripts that won't ever have to scale, but it shouldn't be used for real development. If you want MVC, ASP.NET has a great implementation (MVC3). Django is my favorite, but it's not everyone's cup of tea. edit: To clarify, I'm not saying people shouldn't learn PHP. It's all over the place so a bit of experience will come in handy. I just think CakePHP is a silly idea, because it's specifically made for types of projects where PHP is one of the worst languages you could possibly choose. If you find yourself doing "real PHP development" then you've likely made a wrong turn somewhere. SlightlyMadman fucked around with this message at 20:13 on May 7, 2012 |
# ? May 7, 2012 20:09 |
|
Delta-Wye posted:I was bored at work so I attempted some half-hearted injection attacks (I'm helping! I'm helping!) It's all good, that user doesn't exist anywhere else, only on my localhost. Where do you put stuff like that for PHP so no one can access it? In ASP.NET you just have it in the Web.Config file, which seems a lot more secure. As for the single quotes thing, I didn't even realize that and I haven't been trying to remove them. Too used to ASP.NET I guess, so I haven't been doing string sanitising, so I'll have to look that up. Thanks for the framework advice jarito & Slightly Madman, I wanted to at least figure out how to use PHP outside a framework first, otherwise I think I'd just get confused.
|
# ? May 7, 2012 22:10 |
|
For php apps, I generally mimic the notion of web.config files. I'll make a file called site_config.php.default with a bunch of bogus variable assignments in it, then keep a site_config.php.dev, site_config.php.prod, etc. For a public repository, only the default file should be committed. I then rename the appropriate one to site_config.php for then environment, but never commit it.
|
# ? May 7, 2012 22:28 |
|
poemdexter posted:Someone in the CC subforum here posted this: I've done stuff like this a lot. I really like tile maps with heights. It seems that every few years I get this nagging drive to start working on a game again, and it always ends a few days later with me remembering why I stopped the last time. Here's a screenshot of the last time I tried my hand at it: This is built from an unoptimized xml file that looks like this: pre:... <row> <tile type="stone" height="8"/> <tile type="stone" height="4"/> <tile type="stone" height="4"/> <tile type="stone" height="5"/> <tile type="stone" height="5"/> <tile type="stone" height="4"/> <tile type="grass" height="0"/> <tile type="stone" height="10"/> </row> <row> <tile type="stone" height="10"/> <tile type="stone" height="4"/> <tile type="stone" height="5"/> <tile type="stone" height="4"/> <tile type="stone" height="4"/> <tile type="grass" height="0"/> <tile type="grass" height="0"/> <tile type="stone" height="10"/> </row> ... Inverse Icarus fucked around with this message at 22:52 on May 7, 2012 |
# ? May 7, 2012 22:48 |
|
jarito posted:I'm not a big PHP guy, but it seems that people that are doing real PHP development are using a framework like CakePHP. Ugh. While your intentions might be true, I'll echo other sentiments and point out that this is a horrible framework. If you just want to bang out a small 10 user app in a half day then it'll be fine, but if you care anything about performance stay the gently caress away from it. If you absolutely have to use a PHP framework (vs. another language or no framework) and performance is critical I'd actually suggest the Yii framework, which is decent to work with and one of the most performant PHP frameworks out there. Keep in mind I absolute loathe PHP, and think it's a horrible pieced together hack of a language. The only reason I am throwing this information around is because over here in Japan every web/social game company that exists uses the standard LAMP stack "because Yahoo does", and I have yet to meet any company in this realm that uses a web language outside of PHP or Perl. Put CakePHP at the bottom of your potential PHP framework lists, and do everyone else a favor and tell them the same. Edit: I should add that it was "suggested" to me on one of the social games I was lead on that we use CakePHP. I wasted so much time trying to make that stupid framework performant it drives me into a blind rage. You can always scale your servers out, but to achieve the same benchmarks as raw PHP you need roughly 2-4'x more servers in your cluster. It's ridiculous. Azazel fucked around with this message at 02:02 on May 8, 2012 |
# ? May 8, 2012 01:56 |
|
Inverse Icarus posted:I've done stuff like this a lot. I really like tile maps with heights. It was a for-fun prototype just because I saw it and said "hey, i could probably program that!" Isometric can suck a dick and I don't even like how I had to draw everything front to back and from bottom to top height wise. The map is reading from a txt file but adding a single row throws off the entire thing since the alternating tiles go stupid. If anyone wants to poke around: https://github.com/poemdexter/Landscape
|
# ? May 8, 2012 02:43 |
|
Azazel posted:Keep in mind I absolute loathe PHP, and think it's a horrible pieced together hack of a language. The only reason I am throwing this information around is because over here in Japan every web/social game company that exists uses the standard LAMP stack "because Yahoo does", and I have yet to meet any company in this realm that uses a web language outside of PHP or Perl. wait… are you saying in Japan nobody uses Ruby for web programming?
|
# ? May 8, 2012 03:13 |
|
Deus Rex posted:wait… are you saying in Japan nobody uses Ruby for web programming? As far as I am aware. Surely there's edge cases, I've met my Japanese clone and he's a Ruby fanatic himself. But every place I've worked at or visited was very resistant to using anything but PHP. I did write a small smartphone score API in Ruby, but then the company buckled before the system went live
|
# ? May 8, 2012 05:20 |
|
poemdexter posted:It was a for-fun prototype just because I saw it and said "hey, i could probably program that!" Isometric can suck a dick and I don't even like how I had to draw everything front to back and from bottom to top height wise. The map is reading from a txt file but adding a single row throws off the entire thing since the alternating tiles go stupid. If anyone wants to poke around: https://github.com/poemdexter/Landscape Isometric rendering is FUN imho.
|
# ? May 8, 2012 08:39 |
|
I did a nearly-isometric OpenGL perspective view once that was basically isometric for all intents and purposes (it involved a really faraway camera and a really narrow FOV) which just let you use normal 3d models for everything, so you could rotate the view without having to make all the graphics four times, and zooming worked too (although I don't remember how I did that). It also made picking with the mouse really easy since everything was nearly pixel-perfect. https://www.youtube.com/watch?v=2WSDzl7TC44
|
# ? May 8, 2012 09:49 |
|
Roflex posted:it involved a really faraway camera and a really narrow FOV You could just use an orthographic projection, unless you're going for an "almost orthographic" effect like you see in Blizzard games.
|
# ? May 8, 2012 13:41 |
|
wlievens posted:Isometric rendering is FUN imho. Give a decent solution for the following: I have a text file with: code:
code:
|
# ? May 8, 2012 15:13 |
|
akadajet posted:You could just use an orthographic projection, unless you're going for an "almost orthographic" effect like you see in Blizzard games. Would that let you freely position the camera, though?
|
# ? May 8, 2012 15:18 |
|
kaempfer0080 posted:I made a remake of Yar's Revenge for the Atari in Java for a class. I named it Char's Revenge. I demand royalties.
|
# ? May 8, 2012 15:51 |
|
poemdexter posted:Give a decent solution for the following: Translating to drawing you should get this code:
code:
Edit: wait, I'm not visualizing correctly, probably this would be better still because then both axes are actually movement axes: code:
code:
code:
code:
seiken fucked around with this message at 16:34 on May 8, 2012 |
# ? May 8, 2012 16:04 |
Why not just use the OpenGL orthographic camera? A perspective camera at optical infinity is practically the same thing, but you need to mess with floating point imprecision.
|
|
# ? May 8, 2012 16:29 |
|
Well if you want to draw it that way that's fine, you still gotta store the map data in a sensible structure which is mostly what I was covering in my post. Edit: nevermind, sorry, I thought you were talking to me but it's clear you're talking to Roflex.
|
# ? May 8, 2012 16:31 |
|
seiken posted:Translating to drawing you should get this I don't think I'm getting any of that. Seems like I'll end up with a diamond composed of smaller diamond sprites when I really want a boxish area filled with diamond sprite like the screenshot I linked earlier.
|
# ? May 8, 2012 17:31 |
|
Jo posted:Why not just use the OpenGL orthographic camera? A perspective camera at optical infinity is practically the same thing, but you need to mess with floating point imprecision. Maybe I'm misunderstanding the Ortho view but the way I did it, it's still 3d/perspective at the core, allowing free view from any angle.
|
# ? May 8, 2012 17:39 |
|
|
# ? May 18, 2024 19:47 |
|
poemdexter posted:I don't think I'm getting any of that. Seems like I'll end up with a diamond composed of smaller diamond sprites when I really want a boxish area filled with diamond sprite like the screenshot I linked earlier. You see how the isometric grid is really just a grid of squares, right? Like if you imagine rotating everything a bit you just get a regular grid of squares? Well that's how you should store it, if you just pretend it's a grid of squares in memory and only "rotate it" when it comes to displaying it, then it's trivial to find which tiles connect to where in memory, like you asked for. There's no reason to store the tiles in memory/file in the same layout as they appear on screen, because that's not actually the topology going on. And the shape of the overall "map" doesn't matter since obviously you can store any shape? Like I said, if in memory/in your file format it looks like THIS code:
code:
For the record, the same principle applies to hex grids since a hexagon grid is exactly the same as a square grid on which you are allowed to move horizontally, vertically, and in one pair of opposite diagonal directions but not the other. seiken fucked around with this message at 18:37 on May 8, 2012 |
# ? May 8, 2012 18:33 |