Omnimaga

Calculator Community => Other Calc-Related Projects and Ideas => TI Z80 => Topic started by: TsukasaZX on September 20, 2009, 01:50:27 pm

Title: Metroid: Return to Maridia
Post by: TsukasaZX on September 20, 2009, 01:50:27 pm
M:RtM is a BASIC/Hybrid 2D side-scrolling game I started a while back but have only really gotten around to working on now.

Plot
In the year 20XX, Biologic Space Laboratories encountered a mysterious organism known as "Theta" while exploring the remains of planet Zebes. Intrigued by its countless and fantastic abilities, Theta was captured and brought aboard the BSL station in orbit around the planet for further study. This proved to be a dangerous mistake. Theta's seemingly limitless capacity of growing and gaining new abilities lead to the near destruction of the station and its escape back to the Maridia sector of Zebes. Fearing its potential, the Federation called upon the only one they believe could destroy Theta before it becomes a threat to the universe: intergalactic bounty hunter Samus Aran.

In her greatest1 2D calculator epic yet, Samus must return once more to a radically changed Zebes to confront and destroy the most powerful enemy she's ever faced. Will she prevail? Or will she fall?

-----
Here's the title animations and intro to the game as I have them so far:
(http://i201.photobucket.com/albums/aa229/keithjohansen/Screens/metroidRTM2.gif)

Very old and ASCII, but this is a screenshot of the game HUD. The game will be using a Metroid II style HUD.
(http://i201.photobucket.com/albums/aa229/keithjohansen/Screens/MetroidTheta.png)

I'm going to be attempting to learn me some xLib so I can have some fancier graphics than these ;)


1Utter B.S. Everybody knows DJ's Metroid games and Metroid Pi are the greatest calc metroid games ever  :P
Title: Re: Metroid: Return to Maridia
Post by: DJ Omnimaga on September 20, 2009, 02:24:54 pm
Hey nice so far. I don't mind ASCII that much personally. Plus, ASCII can be even nicer (especially if you use dual-layer, altough this takes twice more space) when used with Text(-1

Anyway glad you're back into programming. keep up the good work :)
Title: Re: Metroid: Return to Maridia
Post by: Tribal on September 20, 2009, 02:44:50 pm
Anyway glad you're back into programming. keep up the good work :)
What he said ;)

Hope to see updates soon, I think there is some xLib stuff in Omnimaga's download section you could check out to help you with xLib, there's also some good tutorials on tifreakware iirc.
Title: Re: Metroid: Return to Maridia
Post by: TsukasaZX on September 20, 2009, 04:48:56 pm
xLIB FTW

Here's the new xLIB-enhanced title:
(http://i201.photobucket.com/albums/aa229/keithjohansen/Screens/metroidRTM3.gif)
Title: Re: Metroid: Return to Maridia
Post by: DJ Omnimaga on September 20, 2009, 04:51:18 pm
Wow I like it, especially the title part :)
Title: Re: Metroid: Return to Maridia
Post by: Builderboy on September 20, 2009, 04:51:35 pm
Oooh, that looks nice.  Keep up the good work, and I look forward to seeing some gameplay screenies ;D
Title: Re: Metroid: Return to Maridia
Post by: JoeyBelgier on September 20, 2009, 05:07:23 pm
nice work :D
Title: Re: Metroid: Return to Maridia
Post by: noahbaby94 on September 20, 2009, 05:40:47 pm
Impressive.
Title: Re: Metroid: Return to Maridia
Post by: Eeems on September 20, 2009, 05:42:25 pm
wow, that looks great! can't wait to see the gameplay!
Title: Re: Metroid: Return to Maridia
Post by: miotatsu on September 21, 2009, 12:20:47 am
looks awesome :OI
Title: Re: Metroid: Return to Maridia
Post by: simplethinker on September 21, 2009, 03:54:46 pm
It looks great ;D
Title: Re: Metroid: Return to Maridia
Post by: TsukasaZX on September 21, 2009, 04:11:16 pm
Thanks y'all! ;D

However, that's about the only easy part of the game ^^;
Now comes everything else :O

First up, the map/room system. Initially, the original ASCII game used a pretty simple system. A matrix would serve as the game map where each matrix cell corresponded to a room and the code would use the value of that room cell to get the room contents string from a subprogram and display it. It worked somewhat.

But, since I'm using xLIB graphics now, I don't really think that old code will work anymore. I'm pretty much stumped :/
DJ, your Metroid game uses xLIB, how'd you go about displaying rooms?
Title: Re: Metroid: Return to Maridia
Post by: {AP} on September 21, 2009, 04:53:23 pm
Definitely a nice start up you have there.
I personally never started my games in a flashy way but I wish I would have.

As for the rooms issue, how I was doing it in mine is having a variable for the room first. (Room are all numbered based on position)
Then grabbing a matrix in a subprogram for what's actually in the room and loading the room with the real(2) function of xLIB.

I can't think of a string method with xLIB personally...
Title: Re: Metroid: Return to Maridia
Post by: DJ Omnimaga on September 21, 2009, 05:25:06 pm
Mhmm in Metroid II Evolution/Expansion, rooms are stored into matrices. Each tiles number refers to the tile positions in the picture. If you alerady use matrices, I don't think it should be too hard to switch, unless you did a whole lot of maps alerady. Suggestion: Always put solid tiles in one spot in the pic (top or bottom), event tiles (if any) in the middle, and non solid tiles in the remaining spot. It's easier to do collision detection afterward. You can also check Metroid II source code (the prgmA) to see how I did the main walking loop.

As for rooms, I have them placed in a bunch of programs, like prgmROOMSET1, ROOMSET2, ROOMSET3, etc. If I am at map X=3, it runs ROOMSET3. In this program there's If Y=1:shows map 1:If Y=2:shows map 2, etc. So for example, if Y=5 it will show map 5. Maps are displayed with Real(2.

xLIB, howerver, has no string mapping support. Also, if you find xLIB readme a bit misleading, you can also check Celtic III readme. search on United-TI forums for it. It contains more detailled instructions about the xLIB commands.
Title: Re: Metroid: Return to Maridia
Post by: TsukasaZX on September 21, 2009, 05:31:03 pm
That'd work quite nicely, {AP}! :D
I could use one matrix for the map. Each cell would correspond to a room on the map, its value would be used to grab room data in the form of another matrix from a subprogram and load it with real(2).

DJ: Ah, mk. I'll try to remember that about tiles although I'll probably have a white background for a while until I can get a better grasp of sprite masking.

[edit]
Is there a way to get the coordinates of a given value in a matrix? For example, if the room value is "2", is there a way to find the coordinates of "2" in the matrix (given that no two cells have the same value)?
Redacted: silly question was silly

[edit]
Started work on the room drawer. Here's a screenshot of it in action as part of a map exploring program:
(http://i201.photobucket.com/albums/aa229/keithjohansen/Screens/maptest.gif)

Note that these aren't necessarily the final rooms. As I continue to expand and modify the map (and get a decent water effect going), they will probably change. But at least you have an idea of how the game will look  :)

Also, DJ/{AP}, how would I go about adding some sort of transition between rooms?
Title: Re: Metroid: Return to Maridia
Post by: DJ Omnimaga on September 22, 2009, 11:49:15 pm
Wow nice rooms so far. Btw, if you want, you can use some of the tiles included in Metroid II Evolution except maybe the character/enemy sprites (since they aren't by me). Just give me credits if you do so.

As for scrolling I'll try to think about something later, altough if I was you, I would keep this for later, like I did. Else it might be hard to implement and debug if implemented before game main engine is finished
Title: Re: Metroid: Return to Maridia
Post by: Builderboy on September 23, 2009, 12:01:44 am
Nice sprites :D glad you got the hang of xLib, it can be hard to use sometimes :P
Title: Re: Metroid: Return to Maridia
Post by: miotatsu on September 23, 2009, 07:16:48 pm
As I continue to expand and modify the map (and get a decent water effect going), they will probably change.
i find squiggly lines to be good (although animated water is very appealing)
great job so far btw :D
Title: Re: Metroid: Return to Maridia
Post by: TsukasaZX on September 28, 2009, 01:21:21 am
I have been working with Builderboy on (read: Builderboy has been gratuitously showing me how to build) a physics/movement engine for Return to Maridia.

This is going to be fairly complex. As of now I have plans to use 2 separate engines: one for Samus (an 8x16 sprite) and one for her morph ball (an 8x8 sprite). Thanks to Builderboy, the 8x8 sprite engine is mostly done. From there I will be perfecting the engine to my tastes and extrapolating from it to create the 8x16 sprite one. Then comes the issue of tying both together and adding map and interaction bits to it.

Fun, neh? :P

Oh, and here's a screeny of the morphball engine as it is so far (which also shows off 2 of the game's power-ups ;) )
(http://s201.photobucket.com/albums/aa229/keithjohansen/Screens/mball.gif)
Note: the screenie is probably half as fast as the actual engine
Title: Re: Metroid: Return to Maridia
Post by: DJ Omnimaga on September 28, 2009, 01:59:52 am
wow I love how you move every 4 pixels. ALtough if you want to max out speed, I would move 8 pixels instead. It might also make collision detection easier. It's up to you, though. I also like the morph ball look
Title: Re: Metroid: Return to Maridia
Post by: Builderboy on September 28, 2009, 10:10:15 am
Yeah, if the object was restricted to 8x8 movement, it would be a lot faster.  1: because you are moving 2wice as far every frame, and 2: because you are doing half as many collision detections.  But like TsukasaZX said, this is 83+ version, not SE.
Title: Re: Metroid: Return to Maridia
Post by: Eeems on September 28, 2009, 07:29:24 pm
hmm, I would also change it so that the morph ball only does a sprite change when there is a keypress (probably restrict it to the arrow keys)
I think I did something like that with a space craft game thing...'stroids...I think...
http://www.omnimaga.org/index.php?action=dlattach;topic=1017.0;attach=269
Title: Re: Metroid: Return to Maridia
Post by: TsukasaZX on September 28, 2009, 07:41:19 pm
I was trying to replicate the morphball's look in all of the 2-D metroid games where it constantly rotates even when not moving.
Title: Re: Metroid: Return to Maridia
Post by: Eeems on September 29, 2009, 07:10:31 pm
ah ok, I guess if that is what you were aiming for then...I kind of like it when it doesn't do that, but whatever...
looks good though
Title: Re: Metroid: Return to Maridia
Post by: DJ Omnimaga on September 30, 2009, 12:13:53 am
In Metroid II Evolution and Expansion the morph ball was also rotating all the time even when no movement occured. However, it couldn't jump like in TsukasaZX screenie and unlike in many old Metroid games, when bombs exploded, you didn't move up
Title: Re: Metroid: Return to Maridia
Post by: noahbaby94 on October 03, 2009, 10:25:11 pm
This is looking pretty nice glad to see your actually coding.
Title: Re: Metroid: Return to Maridia
Post by: Builderboy on October 04, 2009, 01:18:54 pm
Tsukasa, I was doing some tinkering with the engine, and moving it 8x8 was hella fast!  It didn't feel as cool though.  4x4 gives it a nice platform element.  I also experimented with morph-ball rotation, what I did was sync the sprite image to the modulus of the x position, so it rotated in the correct direction, and only when you were moving.
Title: Re: Metroid: Return to Maridia
Post by: TsukasaZX on October 04, 2009, 01:29:25 pm
Builderboy! Speak in English! o.o;;
Anyway, yeah, 4x4 is the way I'm going with the engines (mostly because Samus's feet are 4px wide so 4px steps make sense :P)

Also, sounds like a fun experiment. you should post a screenie :)
Title: Re: Metroid: Return to Maridia
Post by: JoeyBelgier on October 04, 2009, 03:21:30 pm
@ TsukasaZX, that is English, even I know what he's talking about and i speak Dutch 0.0
Title: Re: Metroid: Return to Maridia
Post by: TsukasaZX on October 04, 2009, 04:16:06 pm
I was joking because he used a big word :P
I guess the "speak English" thing is only an English idiom ^^;

But anyway, I'm still thinking out how to do the Samus engine. I'm starting to see how I could handle the 8x16 sprite. I don't think that's much of an issue. The real issue is still jumping. I could use an 8x16 sprite for jumping but that would mean no spin jumping. If I stuck to spin jumping, I'd have an 8x8 sprite but then I wouldn't know how to rig that into the engine.
Title: Re: Metroid: Return to Maridia
Post by: JoeyBelgier on October 04, 2009, 04:52:22 pm
it's anexpression here too, but I thought you didn't understand it (cz thats what is'ts used for (here)) :p
Title: Re: Metroid: Return to Maridia
Post by: Builderboy on October 04, 2009, 05:25:28 pm
Well just for clarification, Modulus is a type of division that gives you the remainder, not the answer.  It is useful because if I have an increasing value 1 2 3 4 5 6 7 8 9... and I take a Modulus # of it, the result will be a looping value up to that number.

For instance, A % 4, (% is the Modulus operation) where A is increasing by 1 each iteration would yield:
0 1 2 3 0 1 2 3 0 1 2 3

So if I took the Modulus of the X coordinate, I could use it to yield a positively increasing loop while moving to the right (0,1,2,3,0,1,2,3...) and a negatively increasing loop while moving to the left (3,2,1,0,3,2,1,0...) and when standing still the sprite would not change at all.  The benefit to this method is that you don't have to do any monitoring of the keys, as everything is entirely dependent on only the x coordinate. (Monitoring the keys can be difficult when using xLibs real(8 ) because of the multiple key commands x.x)
Title: Re: Metroid: Return to Maridia
Post by: DJ Omnimaga on October 04, 2009, 10:39:05 pm
(the speak english thing is often a grammar nazi sentence implying the other poster's grammar/spelling sucks, which is probably why someone thumbed down the comment :P)

(Btw I didn't knew what modulus was either until Builderboy last post. (I have the same issue with half of the math words stated anywhere not in french). Over here I am used to "modulo".)

Title: Re: Metroid: Return to Maridia
Post by: calc84maniac on October 04, 2009, 10:48:59 pm
I think "modulo" is actually the correct term.
Title: Re: Metroid: Return to Maridia
Post by: Builderboy on October 04, 2009, 11:04:58 pm
Hmm, i just did some research, and Modulo is the opperation, and Modulus is the maximum nomber or something?  Oops!  I always heard my comp-sci teacher call it that way, but I guess he was wrong.
Title: Re: Metroid: Return to Maridia
Post by: simplethinker on October 05, 2009, 03:25:00 pm
Two numbers are said to be congruent modulo n when their remainder upon division by n is the same (e.g. 7 is congruent to 3 modulo 4).  The modulus is n.  When you perform "a % n" and get "c", this is saying "a is congruent to c, with a modulus of n".  The word "modulo" translated from Latin literally means "with modulus".
Title: Re: Metroid: Return to Maridia
Post by: willrandship on April 14, 2010, 11:28:51 am
Hehe my science teacher in seventh grade always pronounced nuclear nukular and nucleus Neuculus. She even spelled it that way!

This game looks like it will be really cool.
Title: Re: Metroid: Return to Maridia
Post by: DJ Omnimaga on April 14, 2010, 12:42:00 pm
Btw you might want to be careful when replying to topics, to check the last post date before posting (The board will give you a warning if the topic has been over 180 days old anyway), since necroposting (reviving threads that are several months old) is generally not appreciated on web forums.

I think this project is kinda dead, unfortunately :(