Thursday, August 23, 2007

Nexus/Sirius Continued...



Been working on the Nexus demo a lot recently.

Check out the updates. Elevator now works. Choose a floor (1-5 are explorable) and tap D to operate the thing. You can now enter rooms and use the UP array to search through the junk in them for objects.

When you leave rooms the doors tint to red to let you know you've been in them. At a later stage that'll change so they'll tint only when you've searched the entire room.
Don't bug me about stuff in the game being wrong. I'm not asking for beta testers here, and I'm fully aware that some doors tint before you've entered them, rooms not existing and levels doing funny things. Cheers.

Sirius, the brightest star in the sky. That's the new working title since I can't go completely ripping off Nexus now can I? Truth be told I've thought of a few little changes I'd like to make to the original game anyway. So, it's now not a blatant Nexus but inspired by Nexus. I hope to retain the atmosphere of the first game but evolve it with a few added extras such as a couple of new weapons and some other stuff I've been mulling over.

So, how would you set up a world similar to mine?

myMap = [[16, 12, 12, 12, 12, 12, 12, 12, 12],
[11, 9, 8, 7, 7, 7, 7, 7, 0],
[5, 4, 6, 4, 3, 2, 1, 2, 0],
[14, 15, 14, 15, 15, 14, 15, 14, 14],
[12, 12, 12, 12, 12, 12, 12, 12, 12]];

This is the array that represents the rooms for each level. So we've got 5 levels at present (elevator levels higher than 5 don't exist). The numbers in the array are used to reference the tiles that are used in the background.


//GLASS CAVERN
floor3 = [[[0,0],[10,0],[0,0],[0,0],[0,0],[0,0],[0,0],[1,0],[1,0],[0,0]],
[[0,0],[1,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],
[[0,0],[102,0],[102,0],[0,0],[2,0],[0,0],[0,0],[102,0],[0,0],[0,0]],
[[1,0],[1,0],[1,0],[3,0],[3,0],[1,0],[1,0],[1,0],[1,0],[0,0]],
[[1,0],[1,0],[1,0],[1,0],[1,0],[1,0],[0,0],[0,0],[0,0],[0,0]],
[[0,0],[101,1],[101,2],[0,0],[0,0],[0,0],[1,0],[0,0],[0,0],[0,0]],
[[0,0],[0,0],[1,0],[0,0],[3,0],[0,0],[0,0],[0,0],[10,0],[0,0]]];


This 2d array is for the main tiles on each level. It's 10x7: 10 tiles per screen, 7 screens per level. 0,0 would be an empty space, 2 is an elevator (for now), and anything from 3-100 is a graphical tile with no properties (so 1,0 is a barrel). 100 and up is a door. Each level uses a different door mc, so we need 101,102 etc. the second part of the array represents the room number. so [101,10] would work as say "Use tile with linkage tile_101 for the graphics and 10 we'll keep for later so we know what room it leads to".


myMiddleMap2=[{roomnumber: 1, image:0, entered:false, tile:"room1", roomArray:[[11,0], [12,0], [3,0], [13,0], [14,0], [1,0], [13,0], [14,0], [0,0],[10,0]]},
{roomnumber: 2, image:0, entered:false, tile:"room1", roomArray:[[11,1], [12,1], [2,1], [13,2], [14,3], [13,1], [14,0], [1,1], [0,0],[10,0]]},
{roomnumber: 3, image:0, entered:false, tile:"room1", roomArray:[[11,0], [12,0], [3,0], [13,0], [14,0], [1,0], [13,0], [14,0], [0,0],[10,0]]},
{roomnumber: 4, image:0, entered:false, tile:"room1", roomArray:[[11,0], [12,0], [3,0], [13,0], [14,0], [1,0], [13,0], [14,0], [0,0],[10,0]]},
{roomnumber: 5, image:0, entered:false, tile:"room2", roomArray:[[11,0], [12,1], [3,4], [13,5], [14,2], [1,8], [13,3], [14,2], [0,0],[10,0]]},
{roomnumber: 6, image:0, entered:false, tile:"room2", roomArray:[[11,0], [12,0], [3,0], [13,0], [14,0], [1,0], [13,0], [14,0], [0,0],[10,0]]},
{roomnumber: 8, image:0, entered:false, tile:"room3", roomArray:[[11,0], [12,0], [3,0], [13,0], [14,0], [1,0], [13,0], [14,0], [30,0],[10,0]]},
{roomnumber: 9, image:0, entered:false, tile:"room3", roomArray:[[11,0], [12,0], [3,0], [11,0], [12,0], [11,0], [12,0], [14,0], [30,0],[10,0]]},
{roomnumber: 7, image:0, entered:false, tile:"room2", roomArray:[[11,0], [12,0], [3,0], [13,0], [14,0], [1,0], [13,0], [14,0], [0,0],[10,0]]}
];


This is the array of objects for our rooms. We can give it as much information as we went, in this case roomnumber, image (no use right now), entered:- has the room been entered, boolean. tile: linkage for the room background mc, and roomArray is another array similar to the maintile array for coordinating object/furniture tiles across the screen. This time the second array number carries special information about what objects can be located when the player 'searches' the tile in question. Anything above 0 is an object. I've yet to incorporate anything such as puzzle pieces or weapons so at present all you'll receive is a "Got Something" message when you search objects in the rooms.

3 comments:

Anonymous said...

Hi, just found your blog after looking for some info about making 2D games in Flash. I read the first few posts and I must say it's very intresting, me being intrested about Japan too. I'm also a fan of old side scrolling beat em ups ála Streets of Rage and Golden Axe. Didn't have time to take a deeper look on the tutorials yet but they seem good enough for me to get started.

Great work, keep it up.

Josue said...

hey there EvilKris, I would like to thank you for the 2d beat-them-up tut, it helped like no other tut has before, Im working on a fighting game for my church, lol just for fun, if you would like to hear about it email me @ josue.rodriguez.jr@gmail.com

FJGamer - RuneScape Dragoons animator said...

why are you not in the English Blogger setting? Anyway, I like the Nexius thing. It gave me a nice idea for my RPG.