Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
Senator Government: could you pastebin your code? My first guess would be that your rays are too far apart, but I'd need to see how your implementation works to figure out the best way around the problem.

Adbot
ADBOT LOVES YOU

roomforthetuna
Mar 22, 2005

I don't need to know anything about virii! My CUSTOM PROGRAM keeps me protected! It's not like they'll try to come in through the Internet or something!

Senator Government posted:

I'm currently using a very simple raycasting algorithm to figure out which tiles ought to be visible. Does anyone know a good/quick fix to this problem? My initial thought is to have visible floors flag any walls adjacent to them as visible, but this would probably result in walls being displayed that shouldn't be.
I think the problem you have might be that you're casting a line from the center of the target tile - going from the near-player corner, or twice, once from the center of each near-player edge, counting it as visible if either line is unblocked, would fix the gaps you're seeing.

(Basically, your vision-line is sometimes going one square along the wall and sometimes going out of the wall first.)

Bresenham line algorithm, right?

I'd recommend going from the near-corner because A. that will give you visibility in a single check, and B. it will make internal wall-corners visible, so your walls will look like
code:
+-----+
|     |
|     |
+-----+
rather than, if you draw to edges,
code:
 -----
|     |
|     |
 -----
Edit: for a more 'permissive' visibility, you could go with checking for a line of sight to any of the three near corners of a square - if you went with near-corner only you'd only be able to see one square into a corridor unless you're exactly level with it, but if you do any of the three near corners you'd be able to see a fair way in. Many options, but Bresenham lines are basically what's causing the problem.

roomforthetuna fucked around with this message at 01:29 on Feb 13, 2012

Senator Government
May 26, 2006

Mr. Tax and Spend
Thank you, and yes, it's the Bresenham algorithm. I meant to say that earlier but I couldn't remember the name. I'll try drawing from the near-corners now, that seems like an excellent idea.

Bresenham algorithm:
http://pastebin.com/xm6WH8bx

Relevant draw function from my window object:
http://pastebin.com/CjgjiWuz

Toekutr
Dec 9, 2008

Senator Government posted:

Thank you, and yes, it's the Bresenham algorithm. I meant to say that earlier but I couldn't remember the name. I'll try drawing from the near-corners now, that seems like an excellent idea.

Bresenham algorithm:
http://pastebin.com/xm6WH8bx

Relevant draw function from my window object:
http://pastebin.com/CjgjiWuz

I don't have the time to look at your code right now, but you could do what I did and just replace my raycaster with this algorithm.

http://roguebasin.roguelikedevelopment.org/index.php/Restrictive_Precise_Angle_Shadowcasting

It's simple, runs fast, and looks really good (raycasting has issues with permissibility and corners unless you tweak it).

Pfhreak
Jan 30, 2004

Frog Blast The Vent Core!
Just added equipable weapons to my html5 roguelike. Now when a character picks up a weapon and drags it into one of their equipment module slots they can fire it! So far that's random dungeons, behavior trees, tiled maps, drag and drop inventory, and now items that can be equipped/dequipped/fired.

Working with jquery's draggable/droppable ui elements has been a huge pain. Events get fired multiple times, cancel animations are played on valid drops, and all sorts of other nastiness has slowed down the inventory system tremendously.

Next up health, damage, shootable enemies, and the start -> play -> die game cycle. Suddenly this whole roguelike thing is looking achievable!


* I did not make those sprites. They are in dire need of replacing with something I properly own.


It's pretty threadbare (module slots are just a flat color, and empty inventory slots are just a placeholder image, not to mention that awful spiderweb in the middle of the player's inventory...)

Senator Government
May 26, 2006

Mr. Tax and Spend

Toekutr posted:

I don't have the time to look at your code right now, but you could do what I did and just replace my raycaster with this algorithm.

http://roguebasin.roguelikedevelopment.org/index.php/Restrictive_Precise_Angle_Shadowcasting

It's simple, runs fast, and looks really good (raycasting has issues with permissibility and corners unless you tweak it).

Went and did this. Generally liking it quite well, thanks.

Synthbuttrange
May 6, 2007

Pfhreak posted:

* I did not make those sprites. They are in dire need of replacing with something I properly own.

*coughcoughcough*

Speaking of sprites, I was looking for something for my iphone. This seems like a likely candidate, though the lack of an import feature is uuuuuh. http://itunes.apple.com/au/app/sprite-something/id372515745?mt=8

Any other tools out there?

Synthbuttrange fucked around with this message at 11:22 on Feb 13, 2012

poemdexter
Feb 18, 2005

Hooray Indie Games!

College Slice

Senator Government posted:

Went and did this. Generally liking it quite well, thanks.



The most important step in any project is to always change the window title to the name of whatever feature you may be working on. :v:

dorkfort.com
Sep 30, 2003

just another dork
For everyone making games for Internet-enabled platforms (especially iOS/Android), what are you using for gameplay analytics?

Actually, I guess that should really be two questions:

What services/libraries/whatever do you use to record what people are actually doing in your game?

What tools are you then using to analyze that data?

ShinAli
May 2, 2003

The Kid better watch his step.
Unity raycasting is giving me some weird things.

I've recently got the imp into my game and rigged its body with colliders for the sake of accurate hit detection. I still use a character controller but I had it ignore any raycasts.

I started pelting at it with the machine gun and noticed bullets were hitting above the character, and found out they were reporting collisions with the colliders I've rigged on the body. The editor window shows the colliders right where they're suppposed to be, though. Here's a screen shot.

I've circled where the reported collision is, and drew an arrow to the collider that it reportedly hit. I've made sure it wasn't anything weird I've done and the imp is the only character in the scene besides the player, and the player doesn't even have the same rig of colliders.

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

dorkfort.com posted:

What services/libraries/whatever do you use to record what people are actually doing in your game?

What tools are you then using to analyze that data?
This, pretty much: http://www.flurry.com/product/analytics/index.html

... though I am far from a metrics wizard, so this may not do the fancy stuff a proper metrics expert might want to do.

OneEightHundred
Feb 28, 2008

Soon, we will be unstoppable!

Shalinor posted:

There's no gotchas? No specific structures or arrangements of classes or templates that will screw up placement new? It always works, period, and always perfectly fits within the space dictated by sizeof(thing_to_be_alloced)?
Gonna bring this back up real quick since there's an edge case I omitted worth mentioning:

Explicitly calling the destructor doesn't JUST call the destructor you defined for the class, it also destroys all of the class members, so it really does function as a full "placement delete" and you don't need to manually destroy the members or something silly like that. :)

poemdexter posted:

The most important step in any project is to always change the window title to the name of whatever feature you may be working on. :v:
Mine will probably be "Quake III Arena" until release. :colbert:

OneEightHundred fucked around with this message at 03:05 on Feb 14, 2012

poemdexter
Feb 18, 2005

Hooray Indie Games!

College Slice

OneEightHundred posted:

Gonna bring this back up real quick since there's an edge case I omitted worth mentioning:

Explicitly calling the destructor doesn't JUST call the destructor you defined for the class, it also destroys all of the class members, so it really does function as a full "placement delete" and you don't need to manually destroy the members or something silly like that. :)

Mine will probably be "Quake III Arena" until release. :colbert:

Mine is "poo poo Game For Idiots: Dubstep Protocol".

ynohtna
Feb 16, 2007

backwoods compatible
Illegal Hen

dorkfort.com posted:

For everyone making games for Internet-enabled platforms (especially iOS/Android), what are you using for gameplay analytics?

I'll second Shalinor's recommendation of Flurry for Apps. And for more webby stuff I stick by Google Analytics in concert with QuantCast.

For analysis beyond what these platforms natively give, the process invariably involves massaging the data into CSV (via some Python scripting if needed) and then straight into SpreadsheetVille.

HolaMundo
Apr 22, 2004
uragay

sponge would own me in soccer :(
I'm having a hard time with Unity using it for 2d development, basically with rendering sprites on top of each other. I use the z value for this and have a prefab which just contains a sprite with a walk animation. With z = -5 it draws just fine on top of the background. However if I try spawning instances of this prefab from a script (using z = -5) they won't show.
What am I doing wrong? :(

edit: :doh: I fixed this and of course it had nothing to do with the z value.

HolaMundo fucked around with this message at 18:41 on Feb 14, 2012

Muzjik
Apr 11, 2008
Hi GameDev thread. I have been developing a game for Android the past couple of months. I am creating an insanaquarium type game titled "Darwins Aquarium". I am quite far into development and I would like beta testers that aren't afraid to criticize my game. I figure what's a better place to look for cynical assholes than the internet?

If anyone is interested, email me at LittleIslandsStudio@gmail.com

Toekutr
Dec 9, 2008

Senator Government posted:

Went and did this. Generally liking it quite well, thanks.



Sweet looks pretty cool.

dorkfort.com
Sep 30, 2003

just another dork

ynohtna posted:

I'll second Shalinor's recommendation of Flurry for Apps. And for more webby stuff I stick by Google Analytics in concert with QuantCast.
My experience with the high-level things like Flurry/GA has been that they have high ROI mostly because the "I" is so low. Definitely not deep enough to help with things like optimizing game design (difficulty, pricing, timing, tutorial, etc).

ynohtna posted:

For analysis beyond what these platforms natively give, the process invariably involves massaging the data into CSV (via some Python scripting if needed) and then straight into SpreadsheetVille.

Wow, that's good to hear. I did that myself for years, got fed up, and now I'm building a business (with two other goons, actually) to take that workflow and make it a hosted service. If you're curious, there's a screenshot of my dev build here. I welcome your feedback on it.

Zhentar
Sep 28, 2003

Brilliant Master Genius

Toekutr posted:

I don't have the time to look at your code right now, but you could do what I did and just replace my raycaster with this algorithm.

http://roguebasin.roguelikedevelopment.org/index.php/Restrictive_Precise_Angle_Shadowcasting

It's simple, runs fast, and looks really good (raycasting has issues with permissibility and corners unless you tweak it).

For future reference, Eric Lippert did a good set of tutorials going through the algorithm and an implementation of it in C#, starting with this one.

Pfhreak
Jan 30, 2004

Frog Blast The Vent Core!

Zhentar posted:

For future reference, Eric Lippert did a good set of tutorials going through the algorithm and an implementation of it in C#, starting with this one.

Thanks for this. Definitely going to look into adding this to the project I'm working on.

Scut
Aug 26, 2008

Please remind me to draw more often.
Soiled Meat
Howdy folks, while I know this thread is focused on the coding side of game dev, I thought I'd post in here to make some new connections. I'm a designer by trade and I've done some work with games and graphics off and on. If there are any programmers who are looking for an artist to team up with or an IP to work on, then perhaps my style is a good fit for you.

Here are a few snippets from a slow-burn project I've been working on:



http://scutanddestroy.files.wordpress.com/2010/11/salvage-stevedore-tug-vignette1.png


http://scutanddestroy.files.wordpress.com/2012/02/the-salvage-dust-storm-promo.png

My blog: http://scutanddestroy.wordpress.com

And email:

The Glumslinger
Sep 24, 2008

Coach Nagy, you want me to throw to WHAT side of the field?


Hair Elf
I have a UDK issue and I wanted to see if my solution is the best out there or whether there is a better way to do it.

So I have an actor with several meshes that all move. Think an /Epicyclic gear. So I tried to rotate each of the static meshes individually, and there no problems with that.

The problem comes from that fact that I am no longer rotating an actor. So before, when the actor spun, the player could stand on it and would be carried with the motion. But now, since I am just spinning the meshes, the player just stands there.

So my current solution is to create an actor wrapper class for the meshes and use those instead. I don't really like it because it seems really messy and now I have a class for actual object and for the mesh.

If anyone has a better solution to the problem, I would really appreciate it.

brian
Sep 11, 2001
I obtained this title through beard tax.

I don't know enough about UDK to answer you but you might get better help in the UDK megathread although I imagine most of the people who read that read this.

Markovnikov
Nov 6, 2010

Scut posted:

Pixels

That fat potato/robot guy is adorable :3:.

GROVER CURES HOUSE
Aug 26, 2007

Go on...

That is awesome, you are awesome.

Internet Janitor
May 17, 2008

"That isn't the appropriate trash receptacle."
Scut: I dig your style.

This is some seriously cool stuff:

http://scutanddestroy.wordpress.com/2011/03/31/salvage-basic-gameplay-storyboard/

Looks like a very ambitious game concept, but I like the thought process behind it. It reminds me a bit of the mining mechanics of Cortex Command, except here they're taking center-stage over combat. Have you thought about the potential for co-op multiplayer, or are you trying to emphasize the isolation and self-reliance of going it alone? Do you have any programming background, or are you strictly working on graphics for this project?

dizzywhip
Dec 23, 2005

Scut posted:

Howdy folks, while I know this thread is focused on the coding side of game dev, I thought I'd post in here to make some new connections. I'm a designer by trade and I've done some work with games and graphics off and on. If there are any programmers who are looking for an artist to team up with or an IP to work on, then perhaps my style is a good fit for you.

Your stuff looks awesome, it has a sort of subdued Mega Man X style going on. I wish I was working on a game project right now so we could team up!

PalmTreeFun
Apr 25, 2010

*toot*
Oh man, I wish I weren't swimming in programming homework right now because Scut's art style looks really rad and I'd love to work with him.

Scut
Aug 26, 2008

Please remind me to draw more often.
Soiled Meat

Internet Janitor posted:

http://scutanddestroy.wordpress.com/2011/03/31/salvage-basic-gameplay-storyboard/

Looks like a very ambitious game concept, but I like the thought process behind it. It reminds me a bit of the mining mechanics of Cortex Command, except here they're taking center-stage over combat. Have you thought about the potential for co-op multiplayer, or are you trying to emphasize the isolation and self-reliance of going it alone? Do you have any programming background, or are you strictly working on graphics for this project?


Thanks everyone for the compliments, Markovnikov I think the Salvage suit will now have the nickname 'Fat Potato'.

Internet Janitor I agree that the project was quite ambitious. This didn't seem like it would be an issue until my programmer changed careers and had to step off the project... :doh:
As it stands now, I'm quite open to using the assets in a much simpler game with the hope it could act as a stepping stone up to the full concept again.

I really love co-op games, but I'm wary of getting into that realm because it adds a whole new layer of build complexity, and it's something that must be integrated from the very start which is a big decision.
Part of the lonely theme for The Salvage grew from my desire to make it feel correct as a solo experience, seeing as virtually every other game with 'digging' was multiplayer.
That said, multiplayer in a smaller project would not concern me as much. I've been thinking of a stripped down version of The Salvage which is just about dealing with the artifact. Think of a bomb-defusing / booby trap hacking game where you climb about a building-size artifact and attempt to disarm all its traps so that it becomes safe to salvage. I'm thinking this could be a 'single screen' game and use tiles.

Internet Janitor posted:

Do you have any programming background, or are you strictly working on graphics for this project?
I'm just an artist/designer. I have mad respect for the wizardry that is programming, but my brain just wasn't wired to handle formulas or code. That's why I'm looking for people to team up with.

Polio Vax Scene
Apr 5, 2009



If you haven't already post your stuff in TIGSource's forums, specifically Art and Portfolios.

That stuff looks top notch and you'll be swimming in contacts.

Scut
Aug 26, 2008

Please remind me to draw more often.
Soiled Meat
I've got a Salvage dev log up in the TIGForums: http://forums.tigsource.com/index.php?topic=14517.0

I also post in the pixel art and art threads occasionally.

brian
Sep 11, 2001
I obtained this title through beard tax.

Oh so that was you, I emailed you last night anyway, it would be snazzy to discuss stuff.

Pfhreak
Jan 30, 2004

Frog Blast The Vent Core!
Once I feel more confident in my robot themed roguelike I'll be sending you (and SynthOrange) some details. I want to make sure it has enough velocity to escape the 'But I hate UI design' doldrums. I've tackled the tough UI pieces first, so it should be smooth sailing from here out. I just want something that would qualify as a 'game' put together before I go shopping around. Should be next week some time.

Aafter
Apr 14, 2009

A is for After.

Scut posted:

I've got a Salvage dev log up in the TIGForums: http://forums.tigsource.com/index.php?topic=14517.0

I also post in the pixel art and art threads occasionally.

Holy poo poo. That is amazing. I wish I could help you with all of that. Unfortunately, I'm a first year college student. Yay, Intro to Java.

Maltor
Sep 24, 2011
I'm just wondering, how do you guys plan your games, particularly from an OOP/class hierarchy perspective? Do you just write code and refactor and move around as the thought strikes you/things get out of hand? Do you guys have any techniques/structures you use when planning games?

I have a lot of trouble keeping my thoughts coherent and I'll sometimes write down stuff on paper for a week. Then when I sit down to program it, after twenty minutes I realize none of it really works like I thought it would, and all of a sudden I have like 20 classes and a theoretically "elegant" system that completely intimidates me. Since it doesn't work at this point, about then is when I give up on that idea.

Back when I first started programming about a year or two ago I would just write code and make stuff that worked, often all in the same class with no planning at all. Looking back at that stuff, although it worked I never want to write code like that simply because it was so bad. That said I actually finished projects back then. :smith:

To put it more concisely, my problem is I don't know how to effectively plan my projects and so I end up completely psyching myself out when it's time to code. Any of you guys have this issue?

Pfhreak
Jan 30, 2004

Frog Blast The Vent Core!

Maltor posted:

I'm just wondering, how do you guys plan your games, particularly from an OOP/class hierarchy perspective? Do you just write code and refactor and move around as the thought strikes you/things get out of hand? Do you guys have any techniques/structures you use when planning games?

I have a lot of trouble keeping my thoughts coherent and I'll sometimes write down stuff on paper for a week. Then when I sit down to program it, after twenty minutes I realize none of it really works like I thought it would, and all of a sudden I have like 20 classes and a theoretically "elegant" system that completely intimidates me. Since it doesn't work at this point, about then is when I give up on that idea.

Back when I first started programming about a year or two ago I would just write code and make stuff that worked, often all in the same class with no planning at all. Looking back at that stuff, although it worked I never want to write code like that simply because it was so bad. That said I actually finished projects back then. :smith:

To put it more concisely, my problem is I don't know how to effectively plan my projects and so I end up completely psyching myself out when it's time to code. Any of you guys have this issue?

The approach I used to use was plan everything as hard as possible, the write a little code, then fail.

Now I tend to start with small goals in mind -- get the player moving, get the camera panning, add an inventory, how about bad guys, etc. I tackle that one problem in code with little planning. I drop notes about what to fix/improve later, and periodically schedule a goal of 'improve the shitstorm of this code'. That got me through the SA Gamedev entry, and is working surprisingly well on this project.

You don't learn by planning to use a skill (well maybe a little). So get out and try stuff. The important piece is to remember that it's ok to tear code out and throw it away.

I guess the other lesson I've learned is to try not to couple my classes. I should be able to tear out the player without dramatically affecting the way the game works or the inventory system behaves. Although my most finished and polished pieces of code have some of the worst abusive coupling I've ever seen, so who knows.

Vinterstum
Jul 30, 2003

Maltor posted:

I'm just wondering, how do you guys plan your games, particularly from an OOP/class hierarchy perspective? Do you just write code and refactor and move around as the thought strikes you/things get out of hand? Do you guys have any techniques/structures you use when planning games?

1. Figure out the simplest thing you can possibly put on screen, as your first step.
2. Code it the simplest and most straightforward way you can imagine. Plan nothing ahead.
3. Figure out what the next logical step is, which gives you a sense of visual progress (i.e. your game is getting somewhere, not your code).
4. Refactor existing code if needed (do not skip this), and then implement that step the simplest way you can.
5. Goto 3.

Done.

Shalinor
Jun 10, 2002

Can I buy you a rootbeer?

Maltor posted:

I'm just wondering, how do you guys plan your games, particularly from an OOP/class hierarchy perspective? Do you just write code and refactor and move around as the thought strikes you/things get out of hand? Do you guys have any techniques/structures you use when planning games?
If up from bare metal:

1.) Figure out the engine structure I want to use overall - components, MVC (blugh), function programming, etc.
2.) Figure out the major systems I'll need, and maybe write them down somewhere.
3.) Ignore the list, and write the rendering engine first
4.) Once the barebones systems are in place (rendering, input, etc), start writing basic components to flex those systems.
5.) Add components and systems organically as I find I need them. Basically, focus on prototyping features rather than trying for The One True Design Document.

If on an existing engine on a smaller project, like Unity:

Just pick the simplest thing I can do, do it, and build from there. Prototype first, second and third. TDDs aren't worth the bytes they're stored on for a small team.

EDIT: VV One of my friends pointed me at Rackspace, which is probably what I'll be using once my Facebook game outgrows its current piggybacking on my site's web server. Excellent value there.

Shalinor fucked around with this message at 05:49 on Feb 17, 2012

Gough Suppressant
Nov 14, 2008
Looking for hosting advice.

I'm currently building a multiplayer mobile game which will need a client-server configuration.

It's an asynchronous gated turn-based game, so in terms of the server load per game computationally, words with friends is a close approxamation. I just need to store game state and user list in a MySQL database, handle requests for gamestate and client decisions, and then when everyone has put their decisions in for a round execute some fairly light game logic.

So basically just a java executable linked into a MySQL database. Do people have recommendations for a reliable hosting service for this, preferably with easily scalable options, so I can start with something cheap and if the game becomes popular upgrade as required?

Adbot
ADBOT LOVES YOU

Pfhreak
Jan 30, 2004

Frog Blast The Vent Core!

Vinterstum posted:

1. Figure out the simplest thing you can possibly put on screen, as your first step.
2. Code it the simplest and most straightforward way you can imagine. Plan nothing ahead.
3. Figure out what the next logical step is, which gives you a sense of visual progress (i.e. your game is getting somewhere, not your code).
4. Refactor existing code if needed (do not skip this), and then implement that step the simplest way you can.
5. Goto 3.

Done.

This is a much more succinct and clear way of saying what I was trying to say.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply