Jump to content

Antidote

Member
  • Posts

    286
  • Joined

  • Last visited

  • Days Won

    6

Everything posted by Antidote

  1. I found a bug in the TMX Parser i'm using, and trying to track it down. I'm pretty sure i know where it is so once i fix it and send a patch upstream I'll start implementing maps in Sakura, (yes that's the name of the engine now)
  2. No Metroid Prime 3 was developed by Retro. The only "Prime" game not developed by Retro was Hunters. And yeah i think we've derailed this for long enough lol
  3. To be entirely honest, I love how Nintendo develops their games, The games i mostly want to play on my Nintendo consoles are the more tame ones. Occasionally I'll play Razors Edge on Wii U (damn fine game btw) when i want a more challenging romp, but mostly I prefer casual games with a good story. Guess i'm not a "core" gamer xD EDIT: @heavy At the start of the project Retro Studios was a third party, after Metroid Prime was a critical success, Nintendo made the decision to clear them for first party status. Retro had applied for it 3 times prior iirc, there is an entire interview about it. At the start of development for Metroid Prime, they were working on three other titles for Nintendo, one was a game in the vane of Crazy Taxi, another was a football game, and the final was a game called "Raven Blade" you probably heard of it. They cancelled all those games to concentrate on Metroid Prime. On top of that most of the staff at that time were from a defunct development house "Iguana Entertainment" one of which being Jeff Spangleberg. EDIT2:Please fact check me, it's late and I mostly wrote this from memory, I had to look up Jeff Spangleberg since i wanted to call him "John" for some reason.
  4. Retro Studios is first party, therefore the Metroid Prime was made by Nintendo because Retro studios is PART of nintendo. On top of that, the series co-creator, Yoshio Sakamoto, was on staff for the creation of each game and directly lead the development for each, and Koji Kondo also scored a few of the songs in the Prime series, most notably MP2's Dark Samus theme. EDIT:Yes, i'm a massive Metroid Nerd XD EDIT: Retro Studios needs to be considered the same way as R&D* divisions were, which originally developed the Metroid series.
  5. Good thing i always go back and read my posts, or i probably wouldn't have noticed that i wasn't properly clearing those bits XD flags &= 0x01; instead of flags &= ~0x01; that would have caused a TON of headaches down the line if i didn't catch it. @Crownjo: Thanks, once I'm done with the map reader i'll be able to really get started.
  6. Ran out of room in that post So double posting due to an update. Here is an updated collision map: I personally think it looks pretty professional. EDIT: After 2 hours of head scratching, compiler WTFs and 1D10T errors, the map format is complete, Now to write the reader and the classes. Here is the completed source (header is the same) #include "MapFileWriter.hpp"#include <Exception.hpp>#include <TmxParser/Tmx.h>#include <sstream>#include <algorithm>#include <Map.hpp>#include <iostream>#include <iomanip> namespace zelda{namespace utility{inline void tolower(std::string& str){ std::transform(str.begin(), str.end(), str.begin(), ::tolower);} }namespace io{ MapFileWriter::MapFileWriter(const Uint8* data, const Uint64 length) : base(data, length){} MapFileWriter::MapFileWriter(const std::string &filepath) : base(filepath){} struct TileFlags{ bool Horizontal:1; bool Vertical:1; bool Diagonal:1;}; void MapFileWriter::fromTMX(const std::string &filepath){ Tmx::Map map; map.ParseFile(filepath); if (map.HasError()) { std::stringstream err; err << "error in Tmx::Parser : " << (int)map.GetErrorCode() << ": " << map.GetErrorText() << std::endl; throw zelda::error::Exception(err.str()); } base::writeUInt32(Map::MAGIC_NUMBER); base::writeUInt32(Map::VERSION); base::writeUInt16(0xFEFF); base::writeUInt32(map.GetWidth()*map.GetTileWidth()); base::writeUInt32(map.GetHeight()*map.GetTileHeight()); base::writeUInt32(map.GetTileWidth()); base::writeUInt32(map.GetTileHeight()); base::writeUByte(map.GetOrientation()); // will probably go unused but you never know base::writeUInt32(map.GetTilesets().size()); Uint64 layerCountOffset = base::position(); base::writeUInt32(map.GetLayers().size() - 1); // Align to 32bytes for Wii/GCN support base::seek((m_position + 0x1F) & ~0x1F, base::Beginning); for (Tmx::Tileset* tileset : map.GetTilesets()) { std::string path = tileset->GetImage()->GetSource(); path = path.substr(path.find_last_of("/") + 1, (path.size() - path.find_last_of("/")) - 1); base::writeString(path); } // Align to 32bytes for Wii/GCN support base::seek((base::position() + 0x1F) & ~0x1F, base::Beginning); Tmx::Layer* colLayer = NULL; Uint32 layerCount = 0; for (Tmx::Layer* layer : map.GetLayers()) { std::string name = (std::string)layer->GetName(); utility::tolower(name); if (!name.compare("collision")) { if (!colLayer) colLayer = layer; else throw "Too many collision layers, The map can have at most 1 Collision layer, please remove the extraneous layers"; continue; } int tileCount = 0; for (int y = 0; y < layer->GetHeight(); y++) { for (int x = 0; x < layer->GetWidth(); x++) { if (layer->GetTileTilesetIndex(x, y) == -1) continue; tileCount++; } } if (tileCount == 0) continue; layerCount++; base::writeBool(layer->IsVisible()); base::writeUInt32(layer->GetZOrder()); //base::writeUInt32(layer->GetProperties().GetSize()); base::writeUInt32(tileCount); // Align to 32bytes for Wii/GCN support base::seek((base::position() + 0x1F) & ~0x1F, base::Beginning); for (int y = 0; y < layer->GetHeight(); y++) { for (int x = 0; x < layer->GetWidth(); x++) { if (layer->GetTileTilesetIndex(x, y) == -1) continue; Tmx::MapTile& tile = (Tmx::MapTile&)layer->GetTile(x, y); base::writeInt32(tile.id); base::writeUInt32(layer->GetTileTilesetIndex(x, y)); TileFlags flags; flags.Horizontal = tile.flippedHorizontally; flags.Vertical = tile.flippedVertically; flags.Diagonal = tile.flippedDiagonally; base::writeUBytes((Uint8*)&flags, 1); base::writeUInt16(x*map.GetTileWidth()); base::writeUInt16(y*map.GetTileHeight()); } } base::seek((base::position() + 0x1F) & ~0x1F, base::Beginning); } // Write the collision data for (int y = 0; y < map.GetHeight(); y++) { for (int x = 0; x < map.GetWidth(); x++) { if (colLayer) { if (colLayer->GetTileTilesetIndex(x, y) != -1) { Tmx::MapTile& mapTile = (Tmx::MapTile&)colLayer->GetTile(x, y); const Tmx::Tile* tile = map.GetTileset(mapTile.tilesetId)->GetTile(mapTile.id); Uint8 flags = 0; if (tile) { Uint8 flippedDamage = 0; flippedDamage |= (colLayer->IsTileFlippedHorizontally(x, y) ? 0x01 : 0x00); flippedDamage |= (colLayer->IsTileFlippedVertically(x, y) ? 0x02 : 0x00); if (tile->GetProperties().HasProperty("Type")) { // Clear this flag for the ones that don't need it flags |= 0x01; std::string type = tile->GetProperties().GetLiteralProperty("Type"); if (!type.compare("Angle45")) { flags |= 0x02; std::cout << "Angle45 " << std::hex << (int)flags << std::endl; } else if (!type.compare("Angle25")) { flags |= 0x04; std::cout << "Angle25 " << std::hex << (int)flags << std::endl; } else if (!type.compare("Jump")) { flags &= ~0x01; flags |= 0x08; std::cout << "Jump " << std::hex << (int)flags << std::endl; } else if (!type.compare("WaterShallow")) { flags &= 0x01; flags |= 0x10; } else if (!type.compare("WaterDeep")) { flags &= 0x01; flags |= 0x20; } else if (!type.compare("Damage")) { flags &= ~0x01; flags |= 0x40; if (tile->GetProperties().HasProperty("Value")) { // Damage tiles ignore flipping flippedDamage = (Uint8)(tile->GetProperties().GetNumericProperty("Value") & 0xFF); } else { flippedDamage = 0; } std::cout << "Damage " << std::hex << (int)flags << std::endl; } } else { std::cout << "WARNING: Collision tile with no type at " << x << "," << y << " assuming complete solid" << std::endl; flags |= 0x01; } std::cout << "Final value: " << std::setw(2) << std::setfill('0') << (int)flags << std::dec << std::endl; base::writeByte(flags); base::writeByte(flippedDamage); } else base::writeUInt16(0); } else base::writeUInt16(0); } } } base::seek(layerCountOffset, base::Beginning); base::writeUInt32(layerCount); std::cout << layerCount << std::endl; // Finally save the map base::save();} void MapFileWriter::setFilepath(const std::string& filepath){ base::m_filepath = filepath;}}}
  7. Working on my map compiler right now, once it's finished I'll start writing the read class (which forces me to right the Map -> Layer -> Tile classes) Right now the only collision types that are supported are Solid = 0x00, and non-Solid =0xFF Since I've decided to make Tiled-Qt the official map editor of this engine, A dedicated "Collision" layer will be used to calculate this using tile properties, (basically meaning you can use any image you damn well please for each collision type minus Non Solid, which is defined by a lack of tile) Once I've decided on the naming convention I'll let you know so people can make tests maps if they desire. Anyway here is the map compiler as it sits right now: MapFileWriter.cpp: http://pastebin.com/TYreGFYT MapFileWriter.hpp: http://pastebin.com/hbn5h5sX Here is an example of what i mean, you guys should recognize it despite it's ugliness:
  8. XD I had the camera class written before I even had the player entity written.
  9. Give it time, the Wii U is a new console with new gimmicks, it may take a bit for it to get some deal breaking game and cause a win. But I'm not against them pulling a Sega either. I just think it's a little early yet, and I'm not going to count them out, the GCN had a similarly rocky start and it did just fine after about a year. The Wii U only came out last November, so it hasn't quite been a year yet, If come may next year the Wii U hasn't improved then yes it may be a complete failure. I'm hoping that Nintendo pulls a Sony and allows indie devs to do their thing :3 I'd be one of them on that bandwagon, I really like the Gamepad.
  10. You know what, I've looked through that talk page many times and NEVER saw any mention of stb, and today when you linked it, i found it in the translated text >.>
  11. Very helpful, it's actually helped me find the stuff i'm looking for on a few occasions, Still need to figure out that STB format >.> Looking through the assembly isn't very helpful since all the demo stuff seems to be done using REL files so i can't easily step through them.
  12. I tend to avoid text base formats as much as possible, I'm a binary guru lol but that's a pretty simple format. I'm actually working on my own sprite format right now, it's still in the "thinking about how to do it" stage of development.
  13. I just did a test to see how many entities i can have on screen at once, NO view culling used. I was able to render about 900 entities at once, each doing about 400 cycles of a simple AI routine, before things started slowing down really bad. I don't know of a case where I'll EVER need to do that, so i think that's a success :3
  14. When creating the input manager i noticed something pretty bad: it had a very negative affect on the whole program. I have a 9800GTX+ (pretty high end 6 years ago) and i was averaging about 300 FPS with the input manager being updated every frame, which is poor design to begin with, but bear with me. So I decided to make put it on a separate thread, which is normal practice for modern games anyway, and boy was I surprised by the difference Before: EDIT: Added it back AFTER (screw you xfce4-screenshooter)
  15. It's definitely possible, but I'd have to make some changes and add a NetworkManager class, fortunately SFML provides a pretty good library for networking. Local coop is doable as well.
  16. This is how I did my damage recoil, it feels pretty close to the game (but i have yet to add the damage sprite so it looks odd) void Link::onDamage(Entity *e){ if (m_takeDamage) { m_takeDamage = false; if (Engine::instance().resourceManger().sound("player/wavs/linkhurt")) Engine::instance().resourceManger().sound("player/wavs/linkhurt")->play(); m_invincibilityTimer.restart(); m_blinkTimer.restart(); switch(m_facing) { case North: case South: { if (e->position().y < position().y) m_velocity.y += 8.f; else if (e->position().y > position().y) m_velocity.y -= 8.f; } break; case East: case West: { if (position().x < e->position().x) m_velocity.x += 8.f; else if (position().x > e->position().x) m_velocity.x -= 8.f; break; } } }}
  17. Because why not? http://dl.dropboxusercontent.com/u/21757902/ALTTPSprites/ALTTPTiles.zip All raw 4bpp SNES files. I included a couple of savestates for use with your favorite tile editor (credit goes to emuWorks for them)
  18. Looks like you're a bit farther than I am lol, but I had to implement nearly everything from the ground up, SFML is great in the fact that it doesn't completely abstract everything out and makes you think for yourself, I'm just lazy and refuse sit and actively learn OpenGL. I mean I KNOW it, I'd just rather get the thing functioning not have to deal with cross platform shenanigans, and SFML does that quite superbly.
  19. It was nearly 3AM my time, so i went to bed.
  20. That would be great, right now i'm sticking with ALTTP Style, but I may go with MC style later on. EDIT: Been ripping sprites from ALTTP using zcompress and yy-chr (via wine) so here is an example of what i'm able to do using yy-chr's unique "palette set" feature which makes ripping a breeze Before: After: The NPC sprite and blue bird use different palettes from the red bird and the bunny (which is demonic if you ask me lol) Later on I'll right a tutorial on how to rip them this way.
  21. If they really want to modify the geometry there are plenty of tools to do so, SceneNavi doesn't really need that feature anyway xdan, Vertex Colors/alpha should be plenty. Also looking good EDIT:Are those spheres? Or just a billboard, kinda hard to tell with that red.
  22. XD Sorry about that, and as for the Octorok chasing Link, it's just a basic circle algorithm without the radius. On top of that EntityManager keeps track of the Player Object, and only allows 1 instance of an entity of type "Player" void Octorok::think(sf::Time dt){ sf::Vector2f playerVec = Engine::instance().entityManager().player()->position(); move((playerVec - m_pos) * (2.f*dt.asSeconds()));}If you want to know how i'm doing depth sorting, it's pretty simple: std::sort :3 BUMP As promised last night during ShadowFire's stream, i've uploaded the source to github, if you want to help out in anyway just ask and I'll see about adding you to the repo. I'd love for this engine to go somewhere EDIT: To mods, I only double posted to inform people following this of the status update, please merge this post with my previous one.
  23. For the engine, not really planning a game yet, I want to get all the important backend stuff fleshed out before i do any real plans to make a game.
  24. I can't seem to think of a name, if you have any suggestions please post them. Also this is the official logo Credit goes to KevinB834
  25. Thanks, right now I'm working on the Widget system, and tomorrow I'll work on maps. As it is, I'm having to add entities manually in Engine::initialize (Yes it's a singleton, but it's the only one)
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.