Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Mappy tilemap engine playback library port for SFML  (Read 41544 times)

0 Members and 1 Guest are viewing this topic.

Wander

  • Full Member
  • ***
  • Posts: 170
    • View Profile
    • Email
Mappy tilemap engine playback library port for SFML
« Reply #60 on: January 20, 2012, 08:22:46 pm »
I thought if you declared something that had parameters from the class declaration you had to make it a pointer. :o
-Wander

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Mappy tilemap engine playback library port for SFML
« Reply #61 on: January 20, 2012, 08:27:45 pm »
Maybe you confuse something: You have to use pointers if types are (directly or indirectly) recursive, something like that doesn't work:
Code: [Select]
class A { A a; }
};
Code: [Select]
class A { B b; };
class B { A a; };

Often, pointers also help you to reduce dependencies, since the type needn't be complete at declaration. The climax results in the Pimpl Idiom.

In many cases, you can use smart pointers (e.g. std::unique_ptr) to benefit of the advantages of automatic memory management.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Wander

  • Full Member
  • ***
  • Posts: 170
    • View Profile
    • Email
Mappy tilemap engine playback library port for SFML
« Reply #62 on: January 20, 2012, 08:32:52 pm »
Quote
You have to use pointers if types are (directly or indirectly) recursive

Oh that makes a lot more sense!! :D Thanks!

Quote
you can use smart pointers


I've researched these, but I don't quite understand them... What is the purpose of these things besides memory management?
-Wander

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Mappy tilemap engine playback library port for SFML
« Reply #63 on: January 20, 2012, 08:54:03 pm »
Quote from: "Wander"
I've researched these, but I don't quite understand them... What is the purpose of these things besides memory management?
They allow to work with RAII, a powerful idiom that makes it extremely easy to manage resources (e.g. memory).

And there are different implementations with different ownership strategies (unique, shared, copied), some also support further features.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

GamingGod

  • Newbie
  • *
  • Posts: 6
    • View Profile
Mappy tilemap engine playback library port for SFML
« Reply #64 on: March 18, 2012, 01:55:00 pm »
Will it work with SFML 2.0? If no, can someone post link to good tile map parser that will be compatible with SFML 2.0 and Mappy? I'm trying to find one but still no luck.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10815
    • View Profile
    • development blog
    • Email
Mappy tilemap engine playback library port for SFML
« Reply #65 on: March 18, 2012, 05:54:23 pm »
Quote from: "GamingGod"
Will it work with SFML 2.0?

Since you're asking with the verb "will" which is afaik a futur tense, I can answer it by yes.
But to get there you'd have to modify it a bit. The heavy part in the class isn't dealing with SFML but loading the Mappy files.

One would now have to deal with chaning from sf::Image to sf::Texture the rest seems pretty much interchangable.
I didn't look at the examples but since you're using SFML 2 you won't have much problems rewriting them for SFML 2.  :wink:

Btw: Why is this not listed on the Mappy website under Mappy Playback Libraries?  :shock:
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Aoos

  • Newbie
  • *
  • Posts: 1
    • View Profile
    • Email
Re: Mappy tilemap engine playback library port for SFML
« Reply #66 on: June 13, 2012, 08:21:33 pm »
Sorry but the download link is dead! :'(  Can you reupload it?

aBallofWin

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
Re: Mappy tilemap engine playback library port for SFML
« Reply #67 on: June 13, 2012, 10:57:30 pm »
Sorry but the download link is dead! :'(  Can you reupload it?

I second this :P

 

anything