Let it be known that i've been working on this one particular piece of my game for just about all day.
And i have realized that coding an NPC to have artificial intelligence (while very possible) is harder than I thought. LoL. I needed a break fro the world of If's, else's, integers, operators, and bools so I thought I would just vent a little bit here on the forums.
I'm trying to create a realistic AI and it's coming along nicely but slowly. However, I'm almost done and I can't wait to finally be through with this!!!!!
So, with that being said, I'd like to ask all of you a question:
Is there one section of coding in your current (or a previous) game that you imagined would be much easier than it actually was? If so, what were you coding that gave you the biggest headache and took longer than expected?
The CatLady Interface. Personally I blame Grim. Every time I went to code that thing, I had the biggest headache ever. It was like a curse.
One word... Pigeons
EDIT: actually also my modulus function for floats.. that was a brain teaser despite only being about 3 lines of code in the end.
Yes! For AGS Footballer I made a terrible design error. Basically I thought to set up all the gameplay for the first half, and each footballer had a flag telling it if it attacks up or down. After finishing that, it was time to set up the second half, and I thought it would be pretty simple, just switching the directions to all the players, I actually thought it would take me less than 5 minutes to set it up. The problem was, All the methods of "who touched the ball last" etc were built upon of whether it was team up or team down, instead of team1 or team2, so basically everything stopped working in the second half. By the time I figured out I didn't make this distinction, I already wasted some precious testing time, and then I had to refactor the whole code.
What I thought would take 5 minutes took me in fact ~3 days... >:(
Ramps in my upcoming platform engine, I've planned a few hours and it took about a week to make it bugfree.
It's still not 100% (argh!)
ya know, my platformer did already have ramps in it.. did you change them?
and if so, what improvements did you make and how?
Almost everything? :D
Unfortunately your method didn't work with tiles.
[]
[]
[]
My biggest problem was to stop the player falling through the gaps between the stair tiles. But now we come to mention ist, movable platforms that lets the screen scroll were a pain too ;) Thanks to this official cry-thread I can finally tell you people :D
Anything that involves trigonometry usually ends with me fiddling around so much that I break the script and have to redo it from scratch because I no longer have any idea what each part of the code does. Countless times I've had a script working 90% but glitching severely in some boundary cases, so I more or less at random add a minus or Abs() that seems to fix the issue, and before I know it there's divide-by-zero bugs all over the place, or the game crashes failing to allocate memory to absurdly huge DynamicSprites.
I can't believe it took me until now to implement generic utility functions like DrawRotatedAroundCoord instead of struggling with Pythagoras every time it was needed. I was young an foolish. In much the same way that I based the original version of my ShadowBox module on 2D trig with some patched on perspective deformation factor that I barely understood. Not to claim that adding a proper z-dimension has made the code any simpler, but at least I now know that it works (and more importantly, WHY it works) instead of just crossing my fingers and pressing F5.
Well I'm working on my first little game which is more of an excercise in learning AGS than in actually creating a an amazing game (and in all honesty it isn't that great). I'm not a programmer although I have scripted in many other game engines. I've always found it tough.
Well I've hit many problems with my game...and I know it would have been ready for release a long long time ago if I was any good at scripting but as it stands I;ve had to do alot of inefficiant things to achieve the various effects I've implemented.......duplicating characters, duplicating objects and hiding and showing objects that either have an effect on them and don't. As you may have guessed I'm not doing anything complicated but my code has got quite messy :(
On a side note...I'm one bug away from actually releasing it but hit a brick wall...LOL
At some point while coding Frantic Franko I noticed that, while the MovementLinkedToAnimation is on for the main character, the scrolling gets awfully choppy, especially the vertical one. I came up with a "brilliant" work-around that broke the game's whole interface. Nothing in the game worked properly, but I got so engrossed in my own idea that despite the pain I managed to make both the scrolling smooth and the controls working after several days. The only thing that is still not so cool is that "the camera" seems to be floating away from Franko somewhat in rare cases.
Ascovel, mightn't my scrolling module (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=33142.0) have done the job for you?
And since I'm no good at coding every aspect of that code caused me a headache, except the bit Steve McCrea wrote. Which is the bit that does all the work!
Quote from: Ali on Sat 08/05/2010 15:52:13
Ascovel, mightn't my scrolling module (http://www.adventuregamestudio.co.uk/yabb/index.php?topic=33142.0) have done the job for you?
And since I'm no good at coding every aspect of that code caused me a headache, except the bit Steve McCrea wrote. Which is the bit that does all the work!
When I noticed the problem I tried your module (that was the older version then), but it didn't help or I was unable to take advantage of it. I think the reason was that I needed to be able to precisely control the ViewPort at times (and all of a sudden moving it smoothly to the desired position) and not have it always centered on the main character.
I think maybe in another game I will be able to use my technique for some real time camera-like reactions to what happens around the main character. Though it might give the player a sense of vertigo.
The 'what's your name' riddle in Cryptic... ugh.
Also how could I forget. The Babel Fish Puzzle. Solving it equals Coding it.
I tried writing The Incredible Machine in AGS. Wow, that's tricky.
Quote from: Radiant on Sat 08/05/2010 19:34:38
I tried writing The Incredible Machine in AGS. Wow, that's tricky.
Oh man, I'd actually consider you a god if you did that!
Otherwise, crazy foreigner it is ;)
I don't want to be totally OT so two words: Games Galore. Writing a management sim in AGS gave me a headache. But not as much by any distance as the toothache I had at the time. And anyone who's had rotting tooth ache will know it's far worse than any AGS coding headache :=
In the project I'm on there's a computer password sequence - the guy doing the graphics who dabbles in AGS gave me a keyboard sprite for the player to use on screen. When I went over what I'd done (which itself took a long while to set up) with the project leader he was unhappy and insisted that I set it up so it would all be done with the computer's actual keyboard. The state of the screen and various commands involved made it too impractical to do with a GUI so... a day of coding, hunting through the help file, guesswork and testing followed.
This thread is proof that some peoples need to touch up their algorithm development skills. :P
As for me, anything involving tiles is a pain, which is why I deal with Euclidean Polygons instead. Much easier that way.
The only thing I can think of is a puzzle I was coding which involved a lot of random events, running a loop until a certain number of random conditions were met. Obviously this caused a lot of crashes and was messy.
I thought about it for a while until I realised I should be shuffling a list of random states, rather than randomly setting each element in the list until I had a certain number. Spent about half an hour working out a pretty neat shuffling algorythm. Then I looked up "shuffling algorythm" on google to see if I was doing it right, and, well, I'd accidentally discovered the Knuth algorythm. I wish I'd been around 70 years ago to put my own name on it :=
In my lander game, it was the first time I'd been exposed to the wonderful world of things like floats and such. While the initial stage, making the spaceship go up and down, was easy it suddenly became a lot more complex than I expected when I had to make things collide. As it was, I just decided to scrap ship-ship collisions in the end and relegate it to the ever-growing pile of "deleted features".
If coding gives you a headache, you're doing something wrong. I would interpret it as a sign of bad design (uh, look at the rhyme monster).
Remember, you can't code something you haven't fully thought out before hand. If you want to make a platformer game in AGS, don't "just" start coding it, sit down and think about what exactly you want. Build a prototype (in this example, maybe using a simple rectangle as a bounding box instead of an animated sprite) and work on the basics first.
Quote from: dkh on Sun 09/05/2010 13:43:02
If coding gives you a headache, you're doing something wrong. I would interpret it as a sign of bad design (uh, look at the rhyme monster).
Remember, you can't code something you haven't fully thought out before hand. If you want to make a platformer game in AGS, don't "just" start coding it, sit down and think about what exactly you want. Build a prototype (in this example, maybe using a simple rectangle as a bounding box instead of an animated sprite) and work on the basics first.
If you are going to sit their and act like you're so perfect that you've never been frustrated by a coding issue then i will call you a liar and tell you to TELL US YOUR CODING HEADACHE LIKE EVERYONE ELSE IN THIS THREAD HAS DONE!
lol. no offense of course.
Haha, I never said I haven't gotten coding headaches, actually I've had PLENTY. Just sharing my experience on how to avoid them as best as possible!
Quote from: dkh on Sun 09/05/2010 19:34:30
Haha, I never said I haven't gotten coding headaches, actually I've had PLENTY. Just sharing my experience on how to avoid them as best as possible!
lol ah - okay - no harm done then ;)
Quote from: dkh on Sun 09/05/2010 13:43:02
Remember, you can't code something you haven't fully thought out before hand.
That's a lesson I gotta learn. I always start coding and afterwards I realize that I could've done it so much quicker and better.
Oh yeah, I regularly get headaches working on Knight Fight. Most of them are bug-related, when I have to go through a few hundred lines of code to find a little mistake. But hell, it's all worth it.
Quote from: Mr. Matti on Mon 10/05/2010 12:33:20
Quote from: dkh on Sun 09/05/2010 13:43:02
Remember, you can't code something you haven't fully thought out before hand.
That's a lesson I gotta learn. I always start coding and afterwards I realize that I could've done it so much quicker and better.
I know that feeling very well. :D I actually think that, sometimes, this is the way it has to be. However, then deciding to rewrite everything using a better method is what is hard to actually do.
I've had many headaches when scripting in Flash as3. Mainly when I couldn't get a scrollbar to work and had to copy a script from a tutorial. Only to find out that it didn't solve anything. Programming is just not for me.
Quote from: Radiant on Sat 08/05/2010 19:34:38
I tried writing The Incredible Machine in AGS. Wow, that's tricky.
How far did you get with that project? I'm curious.
Quote from: Ryan Timothy on Mon 10/05/2010 17:36:34
How far did you get with that project? I'm curious.
This far (http://crystalshard.net/?p=8&s=71). The physics engine tends to break down if balls cluster together, due to any number of boundary conditions.
Oh dear... :-\
There are lots of collision issues. lol Good on you for getting it to at least somewhat work.
I want real-time physics with pixel detection for obstacles. Something like the box2d working in AGS, which is why I was curious about how far you got with that old project. Oh well, perhaps I'll learn to code my own.... more than likely not... but you never know.