Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » Who Needs Direction?

This thread is locked; no one can reply to it. rss feed Print
Who Needs Direction?
23yrold3yrold
Member #1,134
March 2001
avatar

Quote:

Correct me if I'm wrong, but it seems the project leaders are the exact ones that have been writing the majority of the project.

Yeah, I called that problem early. :P

For the most part, from a programming standpoint, what we need is really, really, really simple. Tilemaps with no fancy collision detection? Mouse-based weapons? Some scripted dialogue? For the most part this is amateur hour stuff and not a whole lot of elaboration is even possible. Perhaps we should have picked Allegro 4.0 instead of 5.0. I wouldn't be having problems monitoring the project (and saying what's needed), and I suspect others wouldn't as well, making it easier to get into. For all I know, people have wanted to help, tried to install Allegro 5.0, and gave up.

Trezker said he had been busy lately too so that is no doubt a big contributor to the minor stall; maybe we could get a word or two from him on a to-do list? Or anyone else with their mitts in the code? I would like an answer to the following, preferably from Trezker: what is the minimum left that would have to be done to get a demo working that loads maps and lets the player interact with them (basic collision detection with walls), allows switching from map to map via doors, lets you shoot basic targets with the gun weapon only, and allows you to talk to stationary NPC's (no scripted scenes with movement or anything, just dialogue)? No particles, no inventory menu system, no fancy scripting, no complex item or level interaction. If I said that demo had to ship by Friday, what would need to be done?

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Onewing
Member #6,152
August 2005
avatar

Quote:

Perhaps we should have picked Allegro 4.0 instead of 5.0.

It would be more enticing to me if it were 4.0.

------------
Solo-Games.org | My Tech Blog: The Digital Helm

Trezker
Member #1,739
December 2001
avatar

The basic stuff

  • loads maps - Done

  • lets the player interact with them (basic collision detection with walls) - Done

  • allows switching from map to map via doors - N/A yet

  • lets you shoot basic targets - N/A yet

  • talk to stationary NPC's - N/A yet, this has fallen under Matts area and he's playing around with gui's and learning C++. At least he's one of the few who got A5 working on linux and windows...

The awesome stuff

  • scripted scenes with movement and everything

  • particles

  • inventory menu system

  • complex item interaction - Define complex? Entity interaction script is done.

If I said that demo had to ship by Friday, what would need to be done?

Todo

  • map switch - Should be easy to do, entity handling for this case might pose a little problem...

  • lets you shoot basic targets - The basic collision system is in place, just needs a little implementation for lines, then the entities need a little shooting code in Update.

  • talk to stationary NPC's - Could be done with a simple class that can be accessed from lua, which was my original plan until my discussion with Matt left it hanging under his menu system plans...

Matt Smith
Member #783
November 2000

Quote:

If I said that demo had to ship by Friday, what would need to be done?

We'd need some actual maps and sprites.

Why does the NPC dialog depend on the menus? It makes sense to use the same GUI I suppose, I'll get on that today. I've been messing with porting software 3d stuff to a5 recently, but that at least builds now, so I'm back on the GUI

23yrold3yrold
Member #1,134
March 2001
avatar

Quote:

We'd need some actual maps and sprites.

OOOH CHEAP SHOT! ;) Seriously though, I didn't know map loading was done. I need to look at that code and make sure my editor can churn out the correct formats. Sprites can be done with "programmer art" for now. :P

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Trezker
Member #1,739
December 2001
avatar

Actually, the map file format is still textmode... :(

But anyone who wants to mess with filestreams could make it binary. I happily leave that task to someone else. A text <-> bin map converter would be good also, as I think I've mentioned before.

OnlineCop
Member #7,919
October 2006
avatar

I think I've got the directional tile collision detection working as well, at least for map tiles only. I'm still trying to make it so you can't walk on top of the other NPCs (I think I need to inherit from the Obstacle class, but I'm still not entirely sure about that yet).

I would really like to have a graphical "debug" obstacle layer that shows which direction movement is allowed (and blocked) on based on a binary system (see my branch's include/obstacle.h's enum for BLOCK_NONE .. BLOCK_ALL). That way, when we throw down a random number on the tilemap, we can see how things are being blocked based on the obstacle layer.

I've drawn a rudimentary "blocked tilemap" PCX spritesheet, but don't know where to implement it so we can actually see it, if someone wants to work on that (I'll be pushing that up shortly).

23yrold3yrold
Member #1,134
March 2001
avatar

Quote:

Actually, the map file format is still textmode... :(

Whatever. As long as it can load all the information required, including things like animations and scripts, it's all good. I'll read that code at work today and get ready.

Is there any way I can get PM'ed a binary that loads and displays a tilemap, just so I can test my maps and make sure they're working?

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Trezker
Member #1,739
December 2001
avatar

Quote:

As long as it can load all the information required, including things like animations and scripts, it's all good. I'll read that code at work today and get ready.

The map doesn't have any animation or script support, only layers and collision.
Also, as I said, entities aren't quite tied in with maps yet...

23yrold3yrold
Member #1,134
March 2001
avatar

Quote:

The map doesn't have any animation or script support, only layers and collision.

Scripts can be loaded separately, but I would imagine tile animation would be an integral part of the tilemap class and therefore the file format. So can it really load maps, or is there just a placeholder function that can load psuedo-file in a temporary format which we're just better off editing by hand for now? :)

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Trezker
Member #1,739
December 2001
avatar

The tileset is stored in its own file.
The map only has a number of layers with indexes that are passed to the Tileset class in the engine. Animation has nothing to do with the map class, that's something the Tileset class should handle, it's just not implemented because I didn't know how the Tileset image file will look with animation frames.

The tileset file format is currently just pointing to an image file and the specifies tilesize. How to add animation support to this I don't know.

media/tileset_placeholder.png
32 32

Maybe specify an animated tiles with animate [index] [frames] lines
animate 12 3
animate 24 4

I wouldn't mind if someone other than me took care of implementing animated tilesets.

OnlineCop
Member #7,919
October 2006
avatar

[derail]

Just for the record, I've been in the hospital for the last week and haven't been able to work on this at all. They found a small brain tumor. Not fun at all...

So now that I'm recovering at home, I hope to have some free time (since I can hardly move or get out of bed from sickness and dizziness because of the treatments). I mean, there's nothing else to do... no TV where I live, and I can't sit up to watch downloaded shows.

[/derail]

Okay, I want to know if this structure for the maps sounds good:

  1. The world will contain several maps: think Zelda, where you wander from one map to another, but all of them are part of the "world" as a whole.

  2. The individual maps will be about the size of a single screen. These can possibly scroll a little bit, but you will walk to the edge of one map and emerge on the far side of another map.

  3. Each map contains several levels (z-index), which means that if someone is up on a platform, their sprite may be "next to" mine, but we can't talk since he's above me and I'm below him. I'd have to climb a ladder or something to get to the same level so we can interact.

  4. Each level contains several layers. The bottom layer is the ground, the layer above sits upon the bottom layer (like a chair sitting upon a carpet layer), more layers upon that as dictated by the data, the player's sprite is located on top of THOSE layers.

  5. Each level also contains a single obstacle map, which tells us whether or not we can pass through a given tile.

So my thinking for this is that we will create an entire world. It will tell us how each map is located in relation to each other. When we transition from one map to another, we tell the world which map we're currently in and which direction we're trying to move to.

The world will load (or have pre-loaded, but that's somewhere down the road) the next map for us.

The maps may not all be the same size (I mean, they CAN be, but it might just be better to let the maps control that themselves instead of forcing us to have a fixed size). So the maps will need to contain:

  • Identifier (some unique number or value, even if it's just sequential numbering)

  • Height and width

  • Number of levels to be found in that map

  • Number of layers for each level found

If we want overhangs (treetops, rooftops, tops of bookshelves, etc.) that partially obscure the player when they walk "underneath and behind", a simple way to handle this is to create two levels: the base level will be drawn first, then the player on top of it, and finally, the upper level will be drawn over the top of everything found on the base level.

If this sounds good, I'll restructure a few things and push them up to my branch in the next few days to see if this works. And problems or suggestions with this design?

Trezker
Member #1,739
December 2001
avatar

Multilevel maps have not been planned at all and I don't think our master designer has even planned on having that feature in the game. But I guess it wouldn't hurt to have it in there.

One thing you did not bring up is the issue with triggers. I think these should be part of the map but not strictly bound to the grid.

piccolo
Member #3,163
January 2003
avatar

This is really starting to sound like the code i already have in my game mite save you time if you took a look.

wow
-------------------------------
i am who you are not am i

OnlineCop
Member #7,919
October 2006
avatar

Trezker: From the wiki mockups, it appeared to have at least two "levels": it's like you have to climb up on a ladder or to the top of the castle wall to get to some of the items (like that key or other item). They were not all on the same plane.

I thought of Zelda for the SNES, where your character may be on an upper "level" and the guards, who are on a lower "level", don't see you.

I've actually got a lot of the code working for all of this already (more of a surprise to me than anything), except of how to actually handle the file input structure.

For now, until we move to a map editor, everything is in ASCII text files, and I'm trying to figure out how to just load everything.

media/
  WORLD_0/
    map0/level0.txt
    map0/level1.txt
    map1/level0.txt
    map1/level1.txt
    ...
  WORLD_1/
    map0/level0.txt
    map0/level1.txt
    map0/level2.txt
    map1/level0.txt
    ...

Some structure like this is how I was thinking about it. Though if others have better ideas, that'd be great. I don't even intend for this to be the permanent structure: just something that works, that we can throw out there, and that others can come along later and redo when a better system is developed.

Trezker said:

One thing you did not bring up is the issue with triggers. I think these should be part of the map but not strictly bound to the grid.

When I think of "triggers", I'm thinking of things that you interact with (or that interact with you) when you either walk close to them, or stand next to them and press the action key.

If we all like this "multiple levels" approach for each map, I think that these triggers should be tied to each "level" so you can have something activate if you're on the top of a bridge, but that doesn't activate if you're underneath it instead. Is that what you're talking about?

23yrold3yrold
Member #1,134
March 2001
avatar

Ugh; I'm tired. It's been a restless weekend; I'm about to turn in early but I figured I should weigh in here.

Map transitions will consist of a quick fade to black and back again, like Final Fantasy. No Zelda scrolling. The only thing that will differentiate one "level" from another since all transitions are basically the same is a) different music, and b) different tileset. Otherwise, it's all just Door A moved you to Door B. There is essentially 6 major (or just 6 period unless plans change) tilesets in the game; 4 dungeons, the overworld, and the colony. I agree that tilesets should be stored separate from maps (which will transition far more often than tilesets) and that animations should be part of tilesets. Pretty common sense there. The maps should all have a number identifying their tileset; if you switch from one tileset to another, make sure it's properly unloaded and loaded, and the music transitions as well.

As far as levels in a map go, that can be represented strictly in a graphic sense. Just because the rectangle of floor you're walking on is a few y-coordinates higher and a lighter shade that the floor "below" doesn't mean we have to modify our maps any. You also wouldn't be able to talk to someone you aren't near, because there's a wall there. This won't be the graphics style we're shooting for, but here's a visual aid:

{"name":"597053","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/d\/4d0d2530d782543e2bca1e8764d71e67.png","w":265,"h":253,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/4\/d\/4d0d2530d782543e2bca1e8764d71e67"}597053

There's no jumping down from an "upper" ledge to a "lower", although you do drop down holes from time to time. Any upper ledges will simply look like they're higher like in the above screenshot; it can still just be done with one single tilemap and walkable/non-walkable tiles. If I mentioned the jumping down earlier and was misunderstood, let me qualify it; holes like this:

{"name":"597052","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/8\/9\/899c2ad9876e0a860459c7217587d4e0.png","w":512,"h":512,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/8\/9\/899c2ad9876e0a860459c7217587d4e0"}597052

Parallax will obviously come into play there too. If the hole has black in it, you just fall and go back to the main door, minus some health. That will also happen with holes that have floors below until you get the jetpack so you can land safely instead of on your collarbone.

By all means, get a system going that lets you transition from map to map, and makes sure the appropriate tileset and music are in play. The music may need more flexibility; there's going to be bosses and the odd dramatic moments where the music changes, but the tilesets should be easy enough, and really it's the main concern right now. Handle resource management as it relates to tilesets and tilemaps, try to get that animation in there or at least be ready with an idea that fits the design, and figure out how the files will be formatted so I can give you some. :)

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

weapon_S
Member #7,859
October 2006
avatar

Here's a nice naggy post about organization, having carefully COUGH studied COUGH what's going on with this project. (Disclaimer: I don't know what's been done and who's working on what. That might be problem no.1, although to you it might be clear. Also I can't find a clear to-do list.)
The best approach to organise this thing seems to be:
Splitting up the tasks in urgent, necessary and optional. Urgent tasks are performed by people assigned to it, and are evaluated periodically i.e. have deadlines. Things like the level-loader/editor/format (that really seems like one task). There is only one or at most two urgent things happening at once. And somebody working on an urgent task, should not even look at other things. Once a urgent thing is done, a necessary task is picked to be urgent. Anyone can pick-up a necessary or optional task however: and somebody who has, might be the one assigned to the urgent task. Also it might happen two people have been doing the same thing: it's of no concern to The Project. Optional tasks are completely open: you can even invent new stuff.
It is important especially for the non-urgent tasks that there is a concept:
a method to draw to the screen for menu's, handles for scripts, concept art for sprites, instruments for music. Urgent tasks might be providing such concepts.
It is nice to think in terms of a non-changing API with placeholders where necessary, but perhaps in the early stages it would better to just code separate things and build an API on that. But I think you are about at the end of "early stages". I don't know much about version control, but a benefit seems that additions in early development can be abandoned by one and picked up by someone else: i.e. everybody should update his/her branch as much as possible (also for the reason some people might mysteriously disappear).
You are trying to find a way to make Monday projects work, aren't you?

Thomas Harte
Member #33
April 2000
avatar

Why not go the full project management hog and throw some critical path analysis at it? A single graph would show progress, the necessary next steps and a todo list.

weapon_S
Member #7,859
October 2006
avatar

After reading some wikipedia with as only lead "critical path analysis" (yes, I'm sort of a layman/n00b), I actually have an answer to your question.
To do list would be a good idea. But the rest is too much work. In my proposed management the manager only has 1 or 2 tasks to really take care of. Remember, the manager is also just a hobbyist. (Are there hobbyist managers like hobbyist programmers?! That would be... scary :o Or handy...:o)

Matt Smith
Member #783
November 2000

I can second that opinion, based on honest attempts to use ganttproject and CA SuperProject back in the day. For a one-man project it tells you nothing you don't know already.

TODO lists ftw

Project management would be cool if it was simple text files describing dependencies. An extended makefile could calculate finishing times if every unwritten file is a target.

e.g. (pseudo makefile)

*.c :
   if $file_exists($SRC_DIR"\"@)
       #do nothing
   else
       ETA +=`calc_eta @` 
   endif

MiquelFire
Member #3,110
January 2003
avatar

Some TODOs that I see in the trunk:
http://svn.miquelfire.com/svnview/wsvn/monday/trunk/Code_todo.txt
http://svn.miquelfire.com/svnview/wsvn/monday/trunk/Implement_todo.txt

Note, everyone has read-only access to the project anyway (or should). Only if you need write access do you need to contact me.

---
Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.
MiquelFire.red
If anyone is of the opinion that there is no systemic racism in America, they're either blind, stupid, or racist too. ~Edgar Reynaldo

23yrold3yrold
Member #1,134
March 2001
avatar

The "urgent", if you hadn't picked it up, is the maps right now. I'm loath to set deadlines because as you can see, things come up in real life that make it fairly impossible. If this were a paid job then okay. I'm also trying to kill discussion on things we decided pages ago, like code formatting and map transitions, so we're not wasting time on non-issues. And yes, we've had running to-do lists forever. :) It hasn't really changed much, hence me hammering maps ...

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Onewing
Member #6,152
August 2005
avatar

Could the original poster edit his post to contain links to important posts/links (Mark Oates webpage, decisive choices, todo lists, wiki's) so we can have a set location to locate what's needed for this project? It's over 30 pages of posts for me and I don't feel like reading through to find "direction" posts around the "derail" posts.

------------
Solo-Games.org | My Tech Blog: The Digital Helm

MiquelFire
Member #3,110
January 2003
avatar

And seeing as with the max posts per page (without doing all) it's 8 pages... yea, that would be useful.

---
Febreze (and other air fresheners actually) is just below perfumes/colognes, and that's just below dead skunks in terms of smells that offend my nose.
MiquelFire.red
If anyone is of the opinion that there is no systemic racism in America, they're either blind, stupid, or racist too. ~Edgar Reynaldo

Thomas Fjellstrom
Member #476
June 2000
avatar

I think it should all be put up on the wiki. That way its all in one nice easy place.

--
Thomas Fjellstrom - [website] - [email] - [Allegro Wiki] - [Allegro TODO]
"If you can't think of a better solution, don't try to make a better solution." -- weapon_S
"The less evidence we have for what we believe is certain, the more violently we defend beliefs against those who don't agree" -- https://twitter.com/neiltyson/status/592870205409353730



Go to: