• Login
  • Register
  • Dolphin Forums
  • Home
  • FAQ
  • Download
  • Wiki
  • Code


Dolphin, the GameCube and Wii emulator - Forums › Offtopic › Delfino Plaza v
« Previous 1 ... 46 47 48 49 50 ... 64 Next »

So I've started flash programming
View New Posts | View Today's Posts

Thread Rating:
  • 1 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Thread Modes
So I've started flash programming
08-04-2010, 07:32 AM
#1
KHRZ Offline
Above and Beyond
*******
Posts: 1,527
Threads: 61
Joined: Mar 2009
So after learning some basic c++ and realizing I couldn't really do s*** with my limited knowledge, then I tried flash actionscrip, and suddenly, basic c++ becomes divine power!

So I'm making this little game where you're rolling a ball and jumping plattforms, I'm writing the physics myself and it's processing "nicely"... well actually this is what I wanted to ask, you see I spend maybe 15-20 minutes writing some code for the feature I want, and then countless hours debugging an issue that sneaked in... is this normal? Or is my working strategy very flawed? Btw, the issue isn't always mine, sometimes I didn't know/misunderstood how some function/syntax I used was working.

And also: is there a site to host unfinished flash'es to be played in-browser, for my friends to try, and does this require any loading coding, (which I haven't learned yet)

One thing I wrote was a reverse-time function, I thought it would be hard, but it was done easily and didn't require any debugging afterwardsBig Grin
Now I don't see why not everyone includes one...
Specs: intel i5 3570k @ 3.4GHz;
16Gb RAM; Raedon HD 7900;
Win8 64-Bit
Website Find
Reply
08-05-2010, 02:34 AM
#2
NaturalViolence Offline
It's not that I hate people, I just hate stupid people
*******
Posts: 9,013
Threads: 24
Joined: Oct 2009
Quote:maybe 15-20 minutes writing some code for the feature I want, and then countless hours debugging an issue that sneaked in... is this normal?

Oh god yes. Your still learning, it will get easier but you will always spend more time debugging than writing code as long as the project has even the slightest difficulty.
"Normally if given a choice between doing something and nothing, I’d choose to do nothing. But I would do something if it helps someone else do nothing. I’d work all night if it meant nothing got done."  
-Ron Swanson

"I shall be a good politician, even if it kills me. Or if it kills anyone else for that matter. "
-Mark Antony
Website Find
Reply
08-05-2010, 03:08 AM
#3
DacoTaco Offline
His royal bitchness Tacoboy
*******
Moderators
Posts: 1,134
Threads: 31
Joined: Mar 2009
all hail c++?
[Image: PeachSig.jpg]
[Image: 566286.png]
[Image: 2280403.png]
Website Find
Reply
08-05-2010, 04:08 AM
#4
KHRZ Offline
Above and Beyond
*******
Posts: 1,527
Threads: 61
Joined: Mar 2009
My current debugging is on this bitch, appears someone is diving by zero or close to zero... the data belongs to the ball

endFrame
(collision)
_x: 612.65
_y: -181.95
velocity_x: 1.4375
velocity_y: 1.375
velocityAngle: 133.726969979943
newX: -387517419082213 //wtf
newY: -183.350000100972
endFrame
endFrame
Specs: intel i5 3570k @ 3.4GHz;
16Gb RAM; Raedon HD 7900;
Win8 64-Bit
Website Find
Reply
08-08-2010, 01:05 AM (This post was last modified: 08-10-2010, 09:26 PM by KHRZ.)
#5
KHRZ Offline
Above and Beyond
*******
Posts: 1,527
Threads: 61
Joined: Mar 2009
Ok now this is the kind of issue that makes me wanna quit flash... dunno how many hours I've been sitting around wondering about this one... I want my gravity to increase the speed in the same direction as the slope my ball is standing on... but it didn't adjust speed whatsoever... I checked all the angle/vector functions I wrote but they all work like supposed... then one lucky trace statement makes me catch what's 100% unsuspected... look at these statements:

if(90 < slopeAngle[timeStamp]);
addToVelocity(gravity,180 + slopeAngle[timeStamp]);
if(90 > slopeAngle[timeStamp]);
addToVelocity(gravity,slopeAngle[timeStamp]);

Guess what? They're both executed! Always! Gravity is infact added, but then it's added again in the opposite direction! Why?
For the slope I tested, slopeAngle[timeStamp] = 45. Therefore the first statement shouldn't execute, but it does... wtf Flash...

EDIT: OK I now spotted the error... first time I made that mistake and hopefully the lastConfused


EDIT 8/10:

Today I just squashed a bug that's been bothering me for a week! SO satisfying. So I was wondering if anyone got a clean solution for this:
A function need to return 2 values from some input. So I run it twice, each time specifying which output I want. But the input for both functions must be the same, yet the first time I run the function, some of the input is altered (For example, I have a vector that is gaining both a new length and angle)

My current solution: temporary variable between the two function calls (Lame... 2 function calls AND a variable change just to run 1 function...)
Specs: intel i5 3570k @ 3.4GHz;
16Gb RAM; Raedon HD 7900;
Win8 64-Bit
Website Find
Reply
« Next Oldest | Next Newest »


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:


Users browsing this thread: 1 Guest(s)



Powered By MyBB | Theme by Fragma

Linear Mode
Threaded Mode