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

Author Topic: Phentrix Framework (Updated: 10/2/2015)  (Read 6378 times)

0 Members and 1 Guest are viewing this topic.

JackPS9

  • Newbie
  • *
  • Posts: 28
    • View Profile
Phentrix Framework (Updated: 10/2/2015)
« on: June 07, 2015, 09:14:39 pm »
Okay well due to me putting engine in the title though this project is more like a base framework to speed up the coding process.  Well anyways I am restarting from scratch, also putting Thor 2.0 into this so for those that want to use this correctly I advise you go check out Thor 2.0.

The reason I am adding Thor 2.0 is to have a decent way of getting animation put into this framework.

Things that I am going to be re-adding to this frame work is things like the audio class I made for the first version.
What can the audio class do?
Allows for 10 sounds to be played at the same time
Stores up to 255 different soundbuffers (SFML suggests a limit so I am capping it out)
Has 3 Music players in place, really only need 2 but I put a third if you wish to sort it out better(Battle/Theme, World, and lastly for villages/Dungeons)

Another feature from the first one I am re-adding is the tilemaps and hopefully thanks for Thor 2.0 this will allow for even the water to be animated yay!  You can thank nexus for how easy the animating is when using Thor 2.0
Cause of the tile maps though and the fact I totally forgot that the maps should have 3 layers(Ground, Objects, Objects you can walk behind).   I will probably be lowering the max map size to 800x800 to start and working my way down if required(Probably will cause that is damn near 2 million lines for a full sized map)
The map files are tiled .tmx now so creating maps is really simple to do.  This while probably slowing performance down by probably milliseconds or less will save on memory allowing computers with less memory.
After all we don't want a game to have thousands of tiles loaded into memory at all times using those resources when they aren't being used.

Required things to use this framework correctly will be...
SFML (duh...)
Thor 2.0 (Thank for Nexus for making this lovely sfml extension)
Pugixml(For the tmx parsing)

PS the solution files and that you have to put together yourself, all this is going to be is the .cpp and .h files.
Also if anyone knows how to define the OsX, and Linux for this files so I can add them in at some point that would be helpful and allow more then just window users to use this framework.

Update (6/18/2015):
So the tile system should now work again, going to be testing testing the animation of the tiles next yay!
PS due to the animation of the tiles any animated tiles I suggest making a .png for that tile, should be 1 tile high, and the amount of tiles the animation is in length (Just cause of how the texture loading is setup)

Update (10/2/2015)
Fixed the info above a bit cause now using Tiled .tmx files which is just xml files really, but allows for faster and better map creation.
« Last Edit: October 02, 2015, 10:28:04 pm by JackPS9 »

DarkRoku12

  • Full Member
  • ***
  • Posts: 203
  • Lua coder.
    • View Profile
    • Email
Re: Un-named Engine (Updated: 6/9/2015)
« Reply #1 on: June 13, 2015, 09:29:30 pm »
Great to see someone creating another game engine. (I so good for the community)
I like RPG's too.

I'm too creating a game engine with SFML/C++/Lua.

And yes, SFML made simple almost all the things that it have?

What about the physics? You didn't mention that, but is better build part by part and no few of this few of that.

Keep going  ;).
I would like a spanish/latin community...
Problems building for Android? Look here

JackPS9

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Un-named Engine (Updated: 6/9/2015)
« Reply #2 on: June 13, 2015, 11:33:31 pm »
sfml really has made making this engine/framework a nice deal easier.
I would be further along but I couldnt get the getPos based on window thing to work then I remembered that its possible to derefence pointers.....

However I can say that I have the audio section completed  :D
allows up to 255 sounds, when playing a sound it selects 1 of 10 sf::sounds to use, allowing up to ten sounds to be played at a time (incase I or whomever needs that many for some reason)
3 Music players(1 for World, 1 for battle, last for whatever they want it for)
When playing a new music file it fades out and stops the other two music players

Maps allow for dual layer maps of up to 1000x1000
The tiles that make up the map are pretty basic at the moment, just a X, Y and the ID of the image
Using XML files to make the maps so the maps are easy to make by hand(If you really want to write 2 million lines of tiles for a max sized map

A very basic error handling, and by this I just mean ints sent to a switch class that outputs the rough problem to narrow it down a bit.

As for physics though I havent touched yet and no idea how much I will do on physics, will probably mostly be collision detection, I may add a rough falling for jumping just so its there for side scrolling games though.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: Un-named Engine (Updated: 6/9/2015)
« Reply #3 on: June 14, 2015, 02:26:47 pm »
Great to see someone creating another game engine. (I so good for the community)
Indeed, yet another unfinished game engine is exactly what the world has waited for ;D
(Sorry, could not resist ;))

On a more serious note: are there features in your engine that distinguish it from other, existing engines? Is there a reason why you write your own one?

I'm asking because in this forum, there have been countless attempts to write a game engine on top of SFML, and I'm not aware of many who finished and kept maintaining the project publicly. I'm not sure if you're just writing it anyway and share it so that others can benefit, too, or if you plan to design it according to user's needs. Either way is fine, but I would probably state it, so people know what they can expect. See also my advice here.

Depending on what you plan to do, you could use existing SFML extension libraries such as FeatherKit, Thor, Let There Be Light, etc. instead of reinventing the wheel. You can still write your own abstractions on top.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

JackPS9

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Un-named Engine (Updated: 6/13/2015)
« Reply #4 on: June 14, 2015, 07:44:39 pm »
Actually mainly making this cause I kept hitting one problem or another with the tilegame I was working on before trying sfml, so thought I would just make this framework to cut out some of the coding for me and others (if anyone ever uses it...)
As for what makes mine different no real idea
why am I making it (see above)

DarkRoku12

  • Full Member
  • ***
  • Posts: 203
  • Lua coder.
    • View Profile
    • Email
Re: Un-named Engine (Updated: 6/9/2015)
« Reply #5 on: June 15, 2015, 12:02:36 am »
Great to see someone creating another game engine. (I so good for the community)
Indeed, yet another unfinished game engine is exactly what the world has waited for ;D
(Sorry, could not resist ;))

Nexus being Nexus...


Depending on what you plan to do, you could use existing SFML extension libraries such as FeatherKit, Thor, Let There Be Light, etc. instead of reinventing the wheel. You can still write your own abstractions on top.


Theres is others Lua Game engines projects abandoned here, for this reason i´m making one i. And cover all the needs posible. I will provide a good-execellent API, well docs and examples, maintian the projects, if someone want to colaborate with the project is wellcome.

And looking around how Thor can help in the project cause i will use LTBL to the shaders , i´m thinking include the module of Input (for joystick) , Math and Shapes.
I would like a spanish/latin community...
Problems building for Android? Look here

Jesper Juhl

  • Hero Member
  • *****
  • Posts: 1405
    • View Profile
    • Email
Re: Un-named Engine (Updated: 6/9/2015)
« Reply #6 on: June 15, 2015, 09:32:34 pm »
Great to see someone creating another game engine. (I so good for the community)
Indeed, yet another unfinished game engine is exactly what the world has waited for ;D
(Sorry, could not resist ;))
Nexus being Nexus...
Well, he's not exactly alone in thinking that you should write games, not engines... And I, for one, tend to agree.
« Last Edit: June 15, 2015, 09:37:20 pm by Jesper Juhl »

DarkRoku12

  • Full Member
  • ***
  • Posts: 203
  • Lua coder.
    • View Profile
    • Email
Re: Un-named Engine (Updated: 6/9/2015)
« Reply #7 on: June 16, 2015, 12:51:37 am »
Great to see someone creating another game engine. (I so good for the community)
Indeed, yet another unfinished game engine is exactly what the world has waited for ;D
(Sorry, could not resist ;))
Nexus being Nexus...
Well, he's not exactly alone in thinking that you should write games, not engines... And I, for one, tend to agree.

I don't know others, i'm making my engine not for make a game when finished, i made to give options to the community. Is this bad?.
I would like a spanish/latin community...
Problems building for Android? Look here

JackPS9

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Phentrix Framework (Updated: 6/18/2015)
« Reply #8 on: June 19, 2015, 05:39:35 am »
Well now that I am using Thor 2.0 in this framework animations should be easy to do.
I'll post a update once I get the animations working correctly.

JackPS9

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Phentrix Framework (Updated: 6/18/2015)
« Reply #9 on: August 29, 2015, 07:21:00 pm »
Finally got time to work on this again yay!
Anyways other then SFML and Thor 2 being used to speed up the creation of this framework.
I may use Sassy UI, at some point for better UI creation but I don't fully know yet.

Biggest note, during my SDL course we had to make a tile based game so I made a parser for Tiled so the framework now allows for maps to be made much more easily.
The SDL Course showed me a few ways I could improve on this framework so started it over again.
So onto remaking this for the like 3rd or 4th time....

Anyways hoping to get the map mostly in place by the end of the day.
As well as hoping that during the creation of this I can get rid of Thor 2 and Sassy(if I use it) to and create my own animation class as well as my own UI classes as well.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: Phentrix Framework (Updated: 6/18/2015)
« Reply #10 on: August 29, 2015, 10:24:23 pm »
As well as hoping that during the creation of this I can get rid of Thor 2 and Sassy(if I use it) to and create my own animation class as well as my own UI classes as well.
If there's a limitation in Thor that forces you to abandon the library, I'd really like to know more about it, as other Thor users would benefit from improvements too! :)

I have already planned to implement more features in the Animation module, a user has given me excellent feedback in that regard. Unfortunately, I haven't had the time to do it yet...
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

JackPS9

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Phentrix Framework (Updated: 6/18/2015)
« Reply #11 on: August 29, 2015, 10:27:16 pm »
As well as hoping that during the creation of this I can get rid of Thor 2 and Sassy(if I use it) to and create my own animation class as well as my own UI classes as well.
If there's a limitation in Thor that forces you to abandon the library, I'd really like to know more about it, as other Thor users would benefit from improvements too! :)

I have already planned to implement more features in the Animation module, a user has given me excellent feedback in that regard. Unfortunately, I haven't had the time to do it yet...

Nah its awesome, just need to find a way to have a whole screen of animations every so often without there being some weird animation wave.

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6286
  • Thor Developer
    • View Profile
    • Bromeon
Re: Phentrix Framework (Updated: 6/18/2015)
« Reply #12 on: August 29, 2015, 10:36:47 pm »
I'm not sure what you mean... What is a "weird animation wave", and why can't you fill a whole screen of animations with Thor?

By the way, I don't want to pollute your project thread, feel free to send me a PM or e-mail if you want to discuss this any further. If not, that's also ok for me :)
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

silverweed

  • Newbie
  • *
  • Posts: 24
    • View Profile
    • Email
Re: Phentrix Framework (Updated: 6/18/2015)
« Reply #13 on: September 02, 2015, 11:50:37 am »
Quote
Using XML files to make the maps so the maps are easy to make by hand
Is there a good reason for not using JSON/YAML? They're far saner formats when it comes to human readability/writability, and JSON is pretty trivial to parse, which should speed up the decoding.
There is a really neat library you can use by embedding a single .hpp file in the project for parsing JSON: https://github.com/nlohmann/json. I'm currently using it in a project of mine and it's great: it provides simple map-like access to the decoded JSON, iteration via (auto pair : values) etc.

JackPS9

  • Newbie
  • *
  • Posts: 28
    • View Profile
Re: Phentrix Framework (Updated: 6/18/2015)
« Reply #14 on: September 02, 2015, 05:17:46 pm »
Quote
Using XML files to make the maps so the maps are easy to make by hand
Is there a good reason for not using JSON/YAML? They're far saner formats when it comes to human readability/writability, and JSON is pretty trivial to parse, which should speed up the decoding.
There is a really neat library you can use by embedding a single .hpp file in the project for parsing JSON: https://github.com/nlohmann/json. I'm currently using it in a project of mine and it's great: it provides simple map-like access to the decoded JSON, iteration via (auto pair : values) etc.

Guess I should update that.  I'm now using TMX files from tiled, wrote the parser myself in like 5 minutes.

 

anything