Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / *frustrated and sad* I'm in desperate need of help with my code...

Author
Message
Megaman X Gold
20
Years of Service
User Offline
Joined: 29th Jun 2003
Location: Canada
Posted: 30th Jun 2003 21:48 Edited at: 30th Jun 2003 21:52
I tried integrating Raven's code into my script, constantly moving things around and trying new stuff. Well...at first it'd crash before it'd even open, but now it crashes as soon as the program actually starts.

I've included my entire engine code as it is right now, and I was wondering if anyone can PLEASE point out what's crashing it on me please?

Thank you. I hate being such an idiot.

PS: Please ignore the following part of my code:
rem NoFlip = 0, Flip = 0
f = 0

It's no longer in use and I simply forgot to remove it.

Life is more like a box of Grenades. Throw the pin instead of the grenade, and it blows up in your face...along with the rest still beside you.
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 30th Jun 2003 22:36
You're filling the stack, and it's because you don't quite understand the gosub command.

Gosub is a temporary jump. You use it to jump to a short piece of code. At the end of that section of code, you use the 'return' command to return to the jump point.



With that in mind, I'd suggest you rewrite
Megaman X Gold
20
Years of Service
User Offline
Joined: 29th Jun 2003
Location: Canada
Posted: 1st Jul 2003 02:19
I've made quite a few changes to the code since then.

My problem atm seems to be that even though I set the equation in the for statement to get the images at a certain size, it's grabbing them out at a different size instead. Cutting my sprite's feet off, and making the image slices wide enough to see more than just the desired sprite. This is probably also why my animations don't seem to work...at all.

Code is attached. Thank you.

Life is more like a box of Grenades. Throw the pin instead of the grenade, and it blows up in your face...along with the rest still beside you.
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 1st Jul 2003 02:27
If your images are 40x43, why are you cutting out 44x40 from your bitmap?

Try this instead:

Megaman X Gold
20
Years of Service
User Offline
Joined: 29th Jun 2003
Location: Canada
Posted: 1st Jul 2003 23:03 Edited at: 1st Jul 2003 23:07
My gosh...I thought I had the values right. I didnt' know I had them the wrong way around.

Okay, so -now- my problem is that it's still not animating, and the sprite flippy thingy doesn't work right. (Sometimes I'll see a flash of it mirrored, but then it just goes right back)

Life is more like a box of Grenades. Throw the pin instead of the grenade, and it blows up in your face...along with the rest still beside you.
LuciferX
20
Years of Service
User Offline
Joined: 16th May 2003
Location: United States
Posted: 7th Jul 2003 09:13
[b]) you should put a little bit of information about what your program does, or about yourself, this problem seems too complicated (from your thread title), and the first post should have a hook to draw others in to help you.

good luck tho

Megaman X Gold
20
Years of Service
User Offline
Joined: 29th Jun 2003
Location: Canada
Posted: 13th Jul 2003 04:17
Screw "a little bit" of information. lol...
The code is in the Source button, and here's a link to the EXE, the image, and the song I use...

http://66.183.247.250/5Horizons/SpriteTest2.exe
http://66.183.247.250/5Horizons/zhaytee_kraid-adagio.mp3
http://66.183.247.250/5Horizons/AceAnim.bmp

Any and all help is appreciated.

Life is more like a box of Grenades. Throw the pin instead of the grenade, and it blows up in your face...along with the rest still beside you.
LuciferX
20
Years of Service
User Offline
Joined: 16th May 2003
Location: United States
Posted: 14th Jul 2003 05:09
your very brave posting code of this quality on here, you know these guys are flame war ninjas :-s

looks good so far, but i do have some suggestions

1. Code in this state should Never disable the escapekey, it's just too early for that

2. when using a subroutine, such as 'move left', 1 thing to ask yourself is, does this code need to only happen on 'move left', or will it happen anyway, if it happens everytime it should be included in tthe main loop (to avoid duplicating code in every option

Looks like you got a good start on it, i threw in an actiontype variable but it is not implemented.

if you want i can make more animations with that little guy, but would be better to get a char with clean copyright.

Do or do not, there is no try. -Yoda
WarHunterX
20
Years of Service
User Offline
Joined: 25th Mar 2003
Location:
Posted: 17th Jul 2003 05:52
"disable escapekey" lol take that out, right now

Megaman X Gold
20
Years of Service
User Offline
Joined: 29th Jun 2003
Location: Canada
Posted: 5th Aug 2003 06:42
You beat my code senseless. I really can't keep track of what all that stuff you did was. Everything you added makes little to no sense to me even reading the comments you made.

Sorry I havn't been around in a long while, but I had decided to take a break from the coding because the rest of my group became less enthusiastic about the project.

Anyways...I'm still entirely unsure about any of that stuff you did. However thank you anyways LuciferX.

It's just gonna take me a while to work my head around that code. *sighs*

btw, I like using other keys than the escapekey. I just disabled it cuz I found out how and decided to have a little fun. lol.

Cya.

Life is more like a box of Grenades. Throw the pin instead of the grenade, and it blows up in your face...along with the rest still beside you.

Login to post a reply

Server time is: 2024-02-24 22:47:35
Your offset time is: 2024-02-24 22:47:35