Page 1 of 2

I hate coding with a passion,

Posted: Wed Sep 30, 2009 8:42 pm
by D3luxe
I am by no means a programmer..I know a decent amount of HTML and PHP, and recently ive been learning Actionscript for flash, but that is the extents of my programming knowledge.

Now I've been learning Actionscript as a part of one of my classes. Our assignment for last week was to make a game (just a simple thing, didnt even have to be fully functional or anything, he just wanted us to use what we knew..remake pong or something.)

Well, I've always found I learn best by doing, so instead of doing some stupid game with no point and everything that I'd try my hand at making a Tower Defense. It's coming along very nicely - I have a menu system, levels, creeps, towers, score, win/lose, lives, etc. I was just working on improving the graphics so it looks better.

Then I realized one GIANT flaw, as well as some other minor flaws that pretty much completely void...90% of what I've written. I'll use an example to display the flaw..

Say you build a Bullet Tower, which does 3 damage. Then say you build a Fire Tower, which does 10 damage. All towers on the map (fire, bullet, w/e) will now do 10 damage. Then say you click the Ice Tower which only does 2 damage. Now all towers on the map do 2 damage, and so on.

This obviously completely flaws my entire tower system, and talking to my teacher there is no easy way to fix it. That means I have to rewrite the whole tower system.


Then, on top of that, the map system is completely fucking up, along with the tower placement, every time I try to change the graphics from how I have it coded. That means I have to rewrite the entire map system as well.

Even though I have learned a ton from working on this, it just pisses me off that after about 5 days of work, 90% of it is voided because of shit I didnt think of to begin with.


Shit like this is exactly why I'm an artist and not a programmer. :evil:
/endrant...

Re: I hate coding with a passion,

Posted: Wed Sep 30, 2009 8:49 pm
by SpiritWebb
Wow...take a breather...I feel you...

I am learning Flash (Actionscript 2.0), PHP, JS, and MySql at the same time and can be quite frustrating. But, just take a breather, step back and get some fresh air...it will come to you...and then you will be like son-of-a-****, and you will feel rewarded once its completed!! :)

Re: I hate coding with a passion,

Posted: Wed Sep 30, 2009 8:53 pm
by D3luxe
SpiritWebb wrote:Wow...take a breather...I feel you...

I am learning Flash (Actionscript 2.0), PHP, JS, and MySql at the same time and can be quite frustrating. But, just take a breather, step back and get some fresh air...it will come to you...and then you will be like son-of-a-****, and you will feel rewarded once its completed!! :)
Oh, it came to me alright, like a sledgehammer to the face. It's not just one little bug that I cant fix..I seriously have to rewrite both the tower system and the map/pathing system, which took me 3 days to even get decently working (or what I thought..apparently theyre more broke than I could imagine.)

I THOUGHT I wasn't rushing this either, I was (what I thought..) thoroughly planning out the different aspects for the different systems. Kaboom though, all that blew up in my face.

I'm dedicated to this now though man..I've wanted to make a tower defense game for a very long time, and now that I'm starting to have the ability to, I will have one done even if I have to wait until hell freezes over.

Oh well..I'm gonna start rewriting it later tonight probably and just improve this thing 10x. If anyone has any suggestions for tower types or anything like that please mention them here so I can work them into the system from the beginning instead of later down the road.


EDIT: BTW, why are you learning AS2.0? Why not 3.0?

Re: I hate coding with a passion,

Posted: Wed Sep 30, 2009 8:56 pm
by SpiritWebb
Im learning AS2 cause I have Flash MX 2004 edition, full. No other edition. :)

Re: I hate coding with a passion,

Posted: Wed Sep 30, 2009 9:01 pm
by D3luxe
SpiritWebb wrote:Im learning AS2 cause I have Flash MX 2004 edition, full. No other edition. :)
Gotcha. I was obligated to buy the Adobe CS4 suite, and I don't regret it at all. It was $650 with my student discount for the Production Premium suite (After Effects, Premiere Pro, Photoshop, Flash, Illustrator, Soundbooth, OnLocation, and Encore) and worth it imo.

Re: I hate coding with a passion,

Posted: Wed Sep 30, 2009 10:30 pm
by hallsofvallhalla
well i loved your tower defense game. The more you code the more you catch early on before you get so far in its a major rewrite. The first FS browser game is pretty bad. Its full of hacked coding and useless lines :) Now that I am somewhat more experienced I catch things much earlier. With my new game I am able to complete 3 or 4 features in about 4 to 6 hours of programming where it use to take me a week to get one feature working :)

Re: I hate coding with a passion,

Posted: Wed Sep 30, 2009 10:38 pm
by D3luxe
hallsofvallhalla wrote:well i loved your tower defense game. The more you code the more you catch early on before you get so far in its a major rewrite. The first FS browser game is pretty bad. Its full of hacked coding and useless lines :) Now that I am somewhat more experienced I catch things much earlier. With my new game I am able to complete 3 or 4 features in about 4 to 6 hours of programming where it use to take me a week to get one feature working :)
Hehe, thanks. The sad thing is that pretty much the state that you saw it in is close to its max possibilities, and I don't want that..Pretty much how I had fudged up the coding was I could only have 1 tower, and 1 type of creep that moved at the same speed at all times on the same boring levels. Just had a little while to go out and BMX and clear my head, so that should help me think clearly on this shit again. Hopefully by monday I'll have a new version that I can post up for people to test.

Re: I hate coding with a passion,

Posted: Thu Oct 01, 2009 3:13 pm
by Perry
My first few games ended that way, but after time I have learned to organize my code better and separate the stuff so that if I do find a bug in one of the major things I can replace it without messing up the whole thing. It is frustrating but once you get better at organization and planning it will be better. It will just take time so stick with it. :D

Re: I hate coding with a passion,

Posted: Thu Oct 01, 2009 8:05 pm
by D3luxe
Yeah, I'm sure it'll get better over time..

Today in class we learned about states and made a simple back-end system that I should be able to work into the tower defense when I rewrite it..it should organize and fix a LOT of the problems.

Re: I hate coding with a passion,

Posted: Thu Oct 01, 2009 8:51 pm
by Jackolantern
My best suggestion is to plan every detail on paper before writing a single line of code. If you have every class, variable, method and interface planned out, it will go so much more smoothly. It lets you look at your application from a bird's eye view and makes maintenance and upgrade bottlenecks show quite brightly. It is also let's you more easily plan out a moduler approach so that when the need arises to upgrade a section of the code, you can just "unplug it" and connect the updated bits. It takes a lot of time to plan and write all of this stuff out, but there is nothing more frustrating that getting most of the way through a program only to find that your code is hopelessly unworkable and you have to recode it.