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

Author Topic: [ODFAEG] (Open Source Development Framework Adapted for Every Game)  (Read 158857 times)

0 Members and 4 Guests are viewing this topic.

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Re: [ODFAEG] (Open Source Development Framework Adapted for Every Game)
« Reply #225 on: May 04, 2014, 07:52:04 pm »
Hi!

I haven't bring some news since a little time ago, it's because I've a little stage until next week.

But I've found a bug which my vbos (my source code was wrong), so, I've corrected it and I'll update the git-hub this evening or tomorrow.

Next I'll perform networking test on remote machines (movement predictions, IA, etc...) and if the result is acceptable I'll be able to show a little game.




Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Re: [ODFAEG] (Open Source Development Framework Adapted for Every Game)
« Reply #226 on: May 04, 2014, 08:08:04 pm »
Git hub updated!!!

I don't want to use modern opengl with glVertexAttribPointer function because I want to keep a compatibility with older opengl versions.

VBO's are now displaying and updating correctly. (In the source code before it was still VBA which were used)

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Re: [ODFAEG] (Open Source Development Framework Adapted for Every Game)
« Reply #227 on: May 12, 2014, 12:12:50 pm »
I've corrected a bug in the symEncPacket file. (the size was wrong)

Now sending and receiving TCP and UDP encrypted packet work correctly. (I've transfered the map from the server program to the client program and caracter's position)

I've performed local networking test and I'll perform remote networking test soon.

Then I'll create a multiplayer game as a demo, but before that I need to finish the IA and to implement a particule system and the guis.

PS : I've also tried to implement modern opengl but it doesn't seems to work. :/ (It works only when I draw in the main but not in the RenderTarget class)


Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Re: [ODFAEG] (Open Source Development Framework Adapted for Every Game)
« Reply #228 on: May 17, 2014, 01:02:37 pm »
Hi!
It's now possible get the position on the path from the loop time to perform mouse movements.

float t = (float) getClock("LoopTime").getElapsedTime().asMicroseconds() * caracter->getSpeed();
        if (caracter->isMoving()) {
            if (caracter->isMovingFromKeyboard()) {
                World::moveEntity(caracter, caracter->getDir().x * t, caracter->getDir().y * t);
                if (World::collide(caracter)) {
                    World::moveEntity(caracter, -caracter->getDir().x * t, -caracter->getDir().y * t);
                }
                Vec3f d = caracter->getCenter() - getView().getPosition();
                getView().move(d.x, d.y, 0);
                World::update();
            } else {

                Vec3f pos = Computer::getPosOnPathFromTime(caracter->getCenter(), caracter->getPath(),1,1);
                Vec3f d = pos - caracter->getCenter();
                //std::cout<<"actual pos : "<<caracter->getCenter()<<"pos : "<<pos<<"d : "<<d<<"final pos : "<<caracter->getPath()[caracter->getPath().size() - 1]<<std::endl;
                Vec3f dir = d.normalize();
                World::moveEntity(caracter, d.x, d.y);
                if (Vec2f(dir.x, dir.y) != caracter->getDir())
                    caracter->setDir(Vec2f(dir.x, dir.y));
                getView().move(d.x, d.y, 0);
                if (pos.computeDist(caracter->getPath()[caracter->getPath().size() - 1]) < 2) {
                    //std::cout<<"stop"<<std::endl;
                    caracter->setMoving(false);
                }
                World::update();
            }
        }
    }
 

It'll come in the next tutorial when I'll discuss about movement prediction with networking correction, and IA.
« Last Edit: May 17, 2014, 01:04:16 pm by Lolilolight »

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
I'll not be able to perform remote networking test because It doesn't want to run on a raspberry pi. (But local networking tests are running without any problem excepts sometimes I have to launch the serveur more than once because of a bug with openssl :/)

But it isn't a real problem for me, I'll fix the remainings bugs of the library on my own computer and add the last functionnalities that I need for the demo game. (fonts, particule system and the sound.)

I'll also purge the source code, put some functions inline and putting everything on the rights files (headers, source code, template), finish to make the documentation and making a website. :P

So there's still a little work to do.


Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Re: [ODFAEG] (Open Source Development Framework Adapted for Every Game)
« Reply #230 on: May 26, 2014, 11:49:47 am »
I've adapted the particule system of the thor::library and all classes of the SFML graphics module in odfaeg, I'll update the git-hub this evening.

So only the sound module is remaining and then I'll be able to write a demo to test everything.

But before I need to finish the demo and to put some code in the right files.

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Some changements.
« Reply #231 on: May 26, 2014, 04:47:30 pm »
Hi, the demo'll change a bit because I've rewritten the command system a bit, now there is just an std::map for all command (a coman can take an action and a slot, a triggerer function and a slot or an action, a trigger function and a slot)

The class ActionMap have been renamed to Command, and you have to always connect a command to the listener. (You cannot connect a trigger and a slot function directly.

The class FastDelegate is now able to take any kind of function, and thus, also std::function!!! (Or even your own function type)

In c/c++ there is a lot of functions with a different type, and with c++11 there are even more, so, this is why I've created a class to store them temporatly and to call the function pointers correctly with the inheritance.

Now, you can pass a shader when drawing entities on components and perform per pixel lighting for exemple. (This is what I'll do in the last version)
« Last Edit: May 26, 2014, 04:49:45 pm by Lolilolight »

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Git hub repository updated!
« Reply #232 on: May 26, 2014, 05:29:44 pm »
See title. :)

Grimshaw

  • Hero Member
  • *****
  • Posts: 631
  • Nephilim SDK
    • View Profile
Re: [ODFAEG] (Open Source Development Framework Adapted for Every Game)
« Reply #233 on: May 26, 2014, 08:08:38 pm »
So, how many people are using this library already? Around 100 I guess?

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Re: [ODFAEG] (Open Source Development Framework Adapted for Every Game)
« Reply #234 on: May 26, 2014, 08:14:03 pm »
Quote
So, how many people are using this library already? Around 100 I guess?

idk, maybe just me at the moment, but idc, if it feeds my needs.

And if it helps but I think I can remove it from the git-hub repositories, if nobody use it but it's always a line on my cv until I've made a more ambitious project and until I can show somethings else than source code.
« Last Edit: May 26, 2014, 08:16:16 pm by Lolilolight »

Grimshaw

  • Hero Member
  • *****
  • Posts: 631
  • Nephilim SDK
    • View Profile
Re: [ODFAEG] (Open Source Development Framework Adapted for Every Game)
« Reply #235 on: May 26, 2014, 08:35:34 pm »
Keep it there, maybe someone will find it useful :)

StormWingDelta

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
Re: [ODFAEG] (Open Source Development Framework Adapted for Every Game)
« Reply #236 on: May 27, 2014, 01:12:02 am »
Yep someone might.  :)

Meantime did you ever add support for sprites with sub sprites yet?  Could be useful for things like turrets and such. :)
I have many ideas but need the help of others to find way to make use of them.

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Re: [ODFAEG] (Open Source Development Framework Adapted for Every Game)
« Reply #237 on: May 27, 2014, 08:14:26 am »
Quote
Meantime did you ever add support for sprites with sub sprites yet?

What do you mean ?

tilesets ?

Or a big sprite class like in the thor library ?

At the moment I do everything with tilesets and subrects.


StormWingDelta

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
Re: [ODFAEG] (Open Source Development Framework Adapted for Every Game)
« Reply #238 on: May 28, 2014, 02:32:49 am »
Sort of like where a bunch of smaller sprites can make up a larger one or having smaller ones attached to the bigger one.  Like for example turrets on a ship or something that happens in a game like Bubble Tanks.
I have many ideas but need the help of others to find way to make use of them.

Lolilolight

  • Hero Member
  • *****
  • Posts: 1232
    • View Profile
Re: [ODFAEG] (Open Source Development Framework Adapted for Every Game)
« Reply #239 on: May 28, 2014, 08:07:25 am »
Ha ok. :)

I have made a thing like that in the past but for the ground, a big entity which contained a bunch of tiles.

But I've removed this class and added the tiles directly, but, I think I'll remake this class later. :)

Because I have to find a way to don't check in every grid cells where the big sprite is at the rendering time otherwhise it slow the performances.

To generate 3D terrain this class'll be helpfull, and, not only for sprites. (By example if I want to generate a bunch of triangles which random texture)

« Last Edit: May 28, 2014, 08:09:22 am by Lolilolight »