Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: saintrunner on November 09, 2011, 06:48:28 pm

Title: Mario Shotgun and screenie
Post by: saintrunner on November 09, 2011, 06:48:28 pm
Here is my progress so far on Mario Shotgun. Thundermagnet is working on a menu, and there are a few bugs to fix, but so far I think it looks good :) also the flag is supposed to be the goal, but it doesn't work yet. Well here you guys go!

Oh, and it is only the source, but you all could have figured that out :)

EDIT: I fixed the flag problem! updated source!
Title: Re: Mario Shotgun and screenie
Post by: JustCause on November 09, 2011, 06:49:57 pm
Looks pretty good! The way the Goomba instantly snaps to the floor below it is a little weird, but overall this looks like a very good start. Nice work! :)
Title: Re: Mario Shotgun and screenie
Post by: Yeong on November 09, 2011, 06:50:43 pm
nice job! :D
Title: Re: Mario Shotgun and screenie
Post by: parserp on November 09, 2011, 06:51:03 pm
Ooh O.O
I like...
so with the level, is that a lot of Line( commands or is it an appvar?
but anyway, lookin good :)
(I +1ed) ;D
Title: Re: Mario Shotgun and screenie
Post by: saintrunner on November 09, 2011, 06:51:23 pm
Yeah, I had to code it a little weird, but at least it works, i guess :) first screenie by the way!
Title: Re: Mario Shotgun and screenie
Post by: epic7 on November 09, 2011, 06:52:39 pm
Cool I'll check out the code
Title: Re: Mario Shotgun and screenie
Post by: saintrunner on November 09, 2011, 06:55:17 pm
I apologize in advance, the code is a little weird, but if you see anything overly stupid, just fix it and email me at [email protected]. Oh and if anyone can get the flag to register that you hit it, and then display 'you win' or something, I'd appreciate it! I just can't get that to work right :P
Title: Re: Mario Shotgun and screenie
Post by: parserp on November 09, 2011, 06:56:20 pm
ooh ok I'll try to work on that...
(actually, that's what I'm currently doing with swords XD)
:)
Title: Re: Mario Shotgun and screenie
Post by: saintrunner on November 09, 2011, 06:57:43 pm
thanks :) Yay, more names to add to the credits! This is becoming quite a group project, lol!
Title: Re: Mario Shotgun and screenie
Post by: Thundermagnet on November 09, 2011, 07:22:35 pm
Could you put all of the names of people who have helped here, so that I can put them in the about section?  Or do you want to take care of it?
Title: Re: Mario Shotgun and screenie
Post by: saintrunner on November 09, 2011, 07:23:17 pm
I'll take care of that.
Title: Re: Mario Shotgun and screenie
Post by: Thundermagnet on November 09, 2011, 07:38:12 pm
Remember that bouncing ball animation I demonstrated to you on the bus?  Would you like that on the menu's background?  It is kind of bland right now.
Title: Re: Mario Shotgun and screenie
Post by: saintrunner on November 09, 2011, 07:39:58 pm
If you want to go ahead...a bouncing Goomba would be better! :)
Title: Re: Mario Shotgun and screenie
Post by: Thundermagnet on November 09, 2011, 07:43:18 pm
True.  What is your Hex code for the goomba?  Blech, this would be a good time to know how arrays work.   :banghead:
Title: Re: Mario Shotgun and screenie
Post by: saintrunner on November 09, 2011, 07:46:50 pm
[00183C5AFFE73C7E]->pic1B
Title: Re: Mario Shotgun and screenie
Post by: Thundermagnet on November 09, 2011, 07:57:28 pm
I took a look at your code...  Why don't you pull those lines inside your main loop to just before?  It would definately increase speed.
Title: Re: Mario Shotgun and screenie
Post by: saintrunner on November 09, 2011, 08:09:51 pm
I'll fix that. thanks!

EDIT: Ok I moved the 'repeat getkey(15)' to after the last line(, and wow that does speed it up a lot!
        But I won't update the file yet, because that was way to easy of a fix :)
Title: Re: Mario Shotgun and screenie
Post by: Thundermagnet on November 09, 2011, 08:19:16 pm
I have to get going on my homework, but the menu is almost done!  I am very pleased with it.  The Game  :evillaugh: that you are making might be a big hit!
Title: Re: Mario Shotgun and screenie
Post by: saintrunner on November 09, 2011, 08:22:16 pm
I hope so! It's like Mario, Shot Guns, AND donkey kong
Title: Re: Mario Shotgun and screenie
Post by: mrmprog on November 09, 2011, 08:40:35 pm
Mind if I help out some? I need something to do tomorrow, so I may look at your source.
Title: Re: Mario Shotgun and screenie
Post by: saintrunner on November 09, 2011, 08:43:12 pm
Help your self! :) just send back the file when your done with whatever you do, so I can see what you did. :)
Title: Re: Mario Shotgun and screenie
Post by: mrmprog on November 09, 2011, 10:18:26 pm
Ok,could you comment each section so I can get a feel for what the code is doing? Not every line, but just stuff like "collision detection" and "gravity". I saw a ton of small things that could be optimized, but to get to the big stuff, I need more info. Thanks for letting me help :)
Title: Re: Mario Shotgun and screenie
Post by: parserp on November 09, 2011, 10:22:11 pm
Ok, I got the  flag detection working, but I don't have time to upload it so I'll just post the source here:
Code: [Select]
:.see if player is at flag
:If ((X>=3) and (X<=5) and (Y<2))
:Goto WIN
:End
:
:Lbl WIN
:ClrHome
:Disp "You Win!"
:Repeat getKey
:End
is that what you are looking for?
Title: Re: Mario Shotgun and screenie
Post by: Thundermagnet on November 09, 2011, 10:22:24 pm
That is what he is looking for!
I find it so interesting that people are sometimes on here just to debug other people's programs.   :D
Title: Re: Mario Shotgun and screenie
Post by: parserp on November 09, 2011, 10:23:37 pm
is it optimized too much?
I can't think of any other way to do it...
Title: Re: Mario Shotgun and screenie
Post by: mrmprog on November 09, 2011, 10:25:57 pm
It may be a good idea to use a tilemap for things like the flag and anything else you want, with the goomba(s?) and player drawn over. That way you could add things like items and other action causing things really easily. I recently did that with Jump, and it worked well. It will require some work, but I will be happy to help if you chose to do this.
Title: Re: Mario Shotgun and screenie
Post by: parserp on November 09, 2011, 10:30:13 pm
Ooh tilemap.../me doesn't know how to use those... :(
Title: Re: Mario Shotgun and screenie
Post by: Thundermagnet on November 09, 2011, 10:36:32 pm
Ooh, tilemapping!  Thundermagnet does not know how to use that either.  Thundermagnet can't even use arrays!
Title: Re: Mario Shotgun and screenie
Post by: Thundermagnet on November 09, 2011, 11:03:00 pm
If you lose, how about instead of "You Lose", it says: "You Lost the Game"?
Whoops!  I just lost the game.
I am still losing the game.
Still losing the game!
 :mad: :mad: :mad:
Title: Re: Mario Shotgun and screenie
Post by: parserp on November 09, 2011, 11:21:53 pm
lol then it would be just like swords...  ::)
lol I just found out this:  :hyper: when you hover over it it says "you just lost the game"  ._.
Title: Re: Mario Shotgun and screenie
Post by: aeTIos on November 10, 2011, 07:14:29 am
Hey Thundermagnet! Welcome on the forums, have you already introduced yourself? Also there are some pretty good tutorials on tilemapping around.
Title: Re: Mario Shotgun and screenie
Post by: Xeda112358 on November 10, 2011, 07:28:13 am
Wow, this looks really nice! I am sure this could turn addictive XD Good luck and I +1ed :)
Title: Re: Mario Shotgun and screenie
Post by: Thundermagnet on November 10, 2011, 05:16:57 pm
I have introduced myself.  I have also taken a look at the array tutorials.  They did not help much...
I am finally done with the menu...  But I lost (the game) and my calc!   :w00t:
Title: Re: Mario Shotgun and screenie
Post by: saintrunner on November 12, 2011, 09:32:22 pm
Yeah, I don't know how to use tile mapping..... Good tutorial?
Title: Re: Mario Shotgun and screenie
Post by: saintrunner on November 13, 2011, 09:10:03 pm
Level two (medium) is being worked on right now, but I won't release it until hard is also finished. It looks good, and if any of you try it and find problems, please tell me and I will fix them! Thanks a lot!
Title: Re: Mario Shotgun and screenie
Post by: epic7 on November 13, 2011, 09:14:10 pm
Ive never used a pxl-test pt-off or pt-change in my codes :P
Title: Re: Mario Shotgun and screenie
Post by: saintrunner on November 13, 2011, 09:21:49 pm
Are you suggesting I shouldn't? I find them to be easier to understand. :P
Title: Re: Mario Shotgun and screenie
Post by: epic7 on November 13, 2011, 09:22:12 pm
Im suggesting I should sometimes :P
Title: Re: Mario Shotgun and screenie
Post by: saintrunner on November 13, 2011, 09:25:20 pm
AH I see. The only problem is that sometimes it gets confusing which points you've already pxl-tested, and which you haven't which equals, hours (less) on end of test after test after test! But always remember, PT-change is your friend!

Edit: Also it is easier to share with others, because it is a little less confusing to read and fix.
Title: Re: Mario Shotgun and screenie
Post by: saintrunner on November 14, 2011, 08:18:18 pm
The newest version of Mario Shotgun is complete! Now with 3 levels of difficulty, and 3 levels, it is just about done! Actually, if their aren't too many bugs, it IS done! What I'm thinking about adding though is a level editor, just for fun :) But that will take a while, and I'm borderline/always lazy! Anyways, here is the newest source code, so just compile it and SHOOT THE LIVING DAYLIGHTS OF OF THOSE GOOMBAS!! :w00t:
Title: Re: Mario Shotgun and screenie
Post by: epic7 on November 14, 2011, 08:33:45 pm
Whats your strategy for collision detect for the different floor levels?
Title: Re: Mario Shotgun and screenie
Post by: saintrunner on November 14, 2011, 08:39:50 pm
Personally, I went way easy and just used pxl-test.
Title: Re: Mario Shotgun and screenie
Post by: epic7 on November 14, 2011, 08:42:57 pm
How did you do that?
Title: Re: Mario Shotgun and screenie
Post by: saintrunner on November 14, 2011, 08:56:35 pm
well, technically, he is pxl-tested on the lines only when he jumps. but it looks like this:

:if getkey(4) and ((pxl-Test(X,Y+8) or pxl-Test(X+7,Y+8))    //checks too see if mario is touching the line
: 13->J    //J= the jump variable, it was originally set at 0->J
:END
:If (J>0)   //Also like if getkey(4) was pressed
:Y-1->Y   //move sprite up
:J-1->J    //J variable will go down
:If (pxl-Test(X+7,Y+8) or pxl-Test(X,Y+8)=0) and (J=0)   // checks if there isn't a line under it and J is zero
:Y+1->Y    //move down
:pause 5    // set speed
:end



That's how I did it in my game, basically it just checks to see if a line is under it, and if it is the it will =1 if not it =0, Do you understand this or shall I rephrase?
Title: Re: Mario Shotgun and screenie
Post by: epic7 on November 14, 2011, 09:04:35 pm
That makes sense :)
Title: Re: Mario Shotgun and screenie
Post by: saintrunner on November 14, 2011, 09:10:04 pm
YEP! it's basically just testing the bottom of the sprite, and then if this then this, if that then that! EASY stuff, OH and before I forget... Thank you Parser Padwan, he helped show me how to get the jumping!
Title: Re: Mario Shotgun and screenie
Post by: epic7 on November 14, 2011, 09:12:48 pm
I might try to attempt to have somewhat parabolic jumps :P
Title: Re: Mario Shotgun and screenie
Post by: saintrunner on November 14, 2011, 09:15:15 pm
In Robogun?
Title: Re: Mario Shotgun and screenie
Post by: epic7 on November 14, 2011, 09:15:51 pm
No, my next project. RoboGun is top-down.
Title: Re: Mario Shotgun and screenie
Post by: saintrunner on November 14, 2011, 09:17:02 pm
Okay, cool!
Title: Re: Mario Shotgun and screenie
Post by: C0deH4cker on November 14, 2011, 10:03:30 pm
I might make a tut on making a tilemapper now that I understand it. By a noob for noobs :P
Title: Re: Mario Shotgun and screenie
Post by: saintrunner on November 15, 2011, 04:14:14 pm
That would help a lot for my future projects!
Title: Re: Mario Shotgun and screenie
Post by: parserp on November 17, 2011, 06:09:52 pm
is this game done? If not, is there any sort of release date?
Title: Re: Mario Shotgun and screenie
Post by: saintrunner on November 19, 2011, 04:45:20 pm
Yeah its mostly done, I might add a level editor later, because I'm to lazy to make a bunch of levels :P
Title: Re: Mario Shotgun and screenie
Post by: Stefan Bauwens on November 21, 2011, 12:09:15 pm
is this game done? If not, is there any sort of release date?
I think it's done now because I saw it at ticalc.org .
Title: Re: Mario Shotgun and screenie
Post by: saintrunner on November 21, 2011, 04:32:55 pm
yeah I put it out on there. (glad they even accepted it) but I will give the source code to anyone (on here) that wants to change or add anything!
Title: Re: Mario Shotgun and screenie
Post by: saintrunner on November 23, 2011, 06:25:39 pm
And for all the people who want to know where I got the idea for Mario Shotgun, Here is the most amazing game (not really) EVER!

http://www.sugartoast.com/game/gangster_brothers
Title: Re: Mario Shotgun and screenie
Post by: aeTIos on November 23, 2011, 06:33:38 pm
Nice ^^