Want to be a developer? Submit a patch? Start here.

For discussion of the code running behind the game

Moderator: Staff

User avatar
Roots
Dictator
Posts: 8666
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: Want to be a developer? Want to submit a patch? Begin he

Postby Roots » Wed Jun 24, 2015 11:26 pm

Glad you got it working. :) Our configuration scripts are a little outdated and I'm not surprised that it failed to pickup the boost dependency. The only reason we need boost is because it is required to compile Luabind, which we include directly in our source tree (because relying on it being available on user's systems turned out to be a huge problem in the past).

Also note that last night I pushed several large commits to the main repo so you'll want to grab those. They include a lot of important bug fixes and scripting improvements for various maps.
Image
Andrei Batinas
Newbie
Posts: 2
Joined: Mon Jun 29, 2015 10:31 am

Re: Want to be a developer? Want to submit a patch? Begin he

Postby Andrei Batinas » Mon Jun 29, 2015 10:36 am

Hi
I am Andrei, i am here for C++/lua programming. I am a C++ Software Engineer with about 1 year experience but not doing games. I would love to contribute to the project and learn game programming. Anything from graphics to networking, multithreaded, gui, scripting, engine programming.

Would love some help on getting started.
Thanks
User avatar
Roots
Dictator
Posts: 8666
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: Want to be a developer? Want to submit a patch? Begin he

Postby Roots » Mon Jun 29, 2015 5:11 pm

Hi Andrei. The first step is to get your own copy of our repository and get your game compiled. Read the instructions on this page: http://www.allacrost.org/wiki/index.php ... Repository

What system will you be developing on? I'm thinking that maybe MenuMode would be a good place for you to start. That code represents the party menu, and it really needs some work. There's a bug that got reported a few hours ago about it, so fixing that would be a good first task. Then it's a matter of learning our GUI system and improving the layout and interface in this mode. The code for menu mode is in src/modes/menu. Documentation on how our GUI system works can be found here: http://www.allacrost.org/wiki/index.php ... Engine_GUI


Does that sound alright with you as a starting point? If so, your steps should be:
1) Get a fork of our mercurial repository
2) Compile the game and play around with it a bit to get familiar with things
3) Fix the bug reported here: https://bitbucket.org/allacrost/allacro ... in-virtual

You and I can then go through menu mode and identify what else needs to be fixed/changed/improved. You're more than welcome to suggest your own design ideas for how to improve it too, of course.
Image
Andrei Batinas
Newbie
Posts: 2
Joined: Mon Jun 29, 2015 10:31 am

Re: Want to be a developer? Want to submit a patch? Begin he

Postby Andrei Batinas » Thu Jul 02, 2015 7:39 pm

Hi,

I will work on that in the following weekend, not a big fan on GUI, but fixing that bug, might help understand the project. I am using Visual Studio 2013. Also what are you using for GUI?what Technology? I saw your using SDL 1.2, after this i can work on changing it to SDL 2.0. Also how you do Graphics is something i am interested in.

Thanks,
Andrei
User avatar
Roots
Dictator
Posts: 8666
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: Want to be a developer? Want to submit a patch? Begin he

Postby Roots » Fri Jul 03, 2015 12:03 am

Andrei Batinas wrote:Hi,

I will work on that in the following weekend, not a big fan on GUI, but fixing that bug, might help understand the project. I am using Visual Studio 2013. Also what are you using for GUI?what Technology? I saw your using SDL 1.2, after this i can work on changing it to SDL 2.0. Also how you do Graphics is something i am interested in.

Thanks,
Andrei


You don't have to be stuck working in the GUI if you don't want to, but yes fixing that bug should be an easy task to help you get started. Our GUI is custom-built, as is our entire game engine. This page lists the libraries that our project uses, and the engine is built upon that. Moving to SDL 2.0 isn't a high priority right now, but if you are really eager to do it, by all means have at it. The windows build is, unfortunately, not well-maintained at this point in time. I'm able to build and run the game using Code::Blocks IDE, minGW, and the allacrost.workspace file for that IDE, but that's about it. If you want to use VS2013, you're going to have to look at the existing build files and figure out how to put together a project file for that IDE.

What do you mean by "how you do graphics"? Do you mean the graphics engine code? Or using the graphics engine to actually display things on the screen? There's documentation for both on our wiki. The graphics engine is pretty stable and complete at this point, and if you don't have a graphics background then diving into it can be overwhelming (I know, because I don't have a graphics background and I did, and I still don't fully understand how it all works).
Image
usey11
Newbie
Posts: 6
Joined: Thu Aug 06, 2015 4:30 pm

Re: Want to be a developer? Want to submit a patch? Begin he

Postby usey11 » Thu Aug 06, 2015 8:29 pm

Hey Usey here had about a year and a half C++ programming and id love to be part of a bigger project like this. Id be happy to contribute in anyway so I'd love a task to get my hands dirty as soon as possible.(:
User avatar
Roots
Dictator
Posts: 8666
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: Want to be a developer? Want to submit a patch? Begin he

Postby Roots » Thu Aug 06, 2015 10:21 pm

Ack, just noticed that the first post in this thread is way outdated (we don't use SVN or sourceforge anymore). I'll try to get around to updating this later today.

EDIT: Now updated.

usey: Our new project page/source can be found here: https://bitbucket.org/allacrost/allacrost

This page tells you how to get a copy of the code:
http://www.allacrost.org/wiki/index.php ... Repository

And this page contains information for programmers new to the project:
http://www.allacrost.org/wiki/index.php/New_Programmers

Can you work on getting the game compiled and running on your system first? That will give me some time to think of something small for you to work on to get you started. Are there any specific things you'd like to try working on? For example, map exploration mode, improving GUI menus, game engine, etc?
Image
User avatar
Roots
Dictator
Posts: 8666
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: Want to be a developer? Want to submit a patch? Start he

Postby Roots » Fri Aug 07, 2015 7:12 am

Alright, here's a bug that you can look at to get started.

In lua/scripts/maps/a01_unblock_underground_river.lua on line 1482, there is the following function:

Code: Select all

-- Restores the HP and MP of each member in the character party to maximum and plays a sound
functions["RestoreParty"] = function()
   GlobalManager:RestoreAllCharacterHitPoints();
   GlobalManager:RestoreAllCharacterSkillPoints();
   -- TODO: it seems that this sound does not play, but others do. Also see if there's a more appropriate sound than this
   AudioManager:PlaySound("snd/heal.wav");
end


Figure out why that sound isn't playing when that function is called and fix it. You can access this map but starting the game and hitting Ctrl+T in the main menu, then selecting the cave map from the list to quickly access this map. The place where this function is called is toward the end of the cave, so I suggest either adding the event call earlier in the cave map so it's quickly to get to and test, or commenting out the call that starts the initial event chain for the map and placing the player toward the end of the map where this event happens.

Let me know if you need help figuring that out. Hopefully this is a minor bug, but there's a possibility that it may be an underlying problem in the audio engine. If you think the problem is in the audio engine code, let me know because the issue could be more complicated than I had hoped.
Image
User avatar
Roots
Dictator
Posts: 8666
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: Want to be a developer? Want to submit a patch? Start he

Postby Roots » Fri Aug 07, 2015 4:35 pm

https://bitbucket.org/allacrost/allacrost/issues

I just added a number of new issues here (#4 through #8), most of which are suitable for new programmers to try and tackle. Some of these are a fair amount of work, but none of them should be too incredibly difficult to handle. If anyone wants to take a stab at them, go for it. I'm not sure if you can assign the task to yourself (I'm just starting to learn this issue tracker), so if you want to work on one and are unable to assign it to yourself, tell me and I'll figure out what I need to do so you can be the assignee.
Image
usey11
Newbie
Posts: 6
Joined: Thu Aug 06, 2015 4:30 pm

Re: Want to be a developer? Want to submit a patch? Start he

Postby usey11 » Sat Aug 08, 2015 7:07 pm

About the sound not playing:
I tried swapping the sound around and it played pretty much every other sound file fine, I tried replacing obtain.wav in

Code: Select all

-- Gives a potion to the player via the treasure menu
functions["RewardPotion"] = function()
   AudioManager:PlaySound("snd/obtain.wav");
   corpse_treasure = hoa_map.MapTreasure();
   corpse_treasure:AddObject(1, 1);
   TreasureManager:Initialize(corpse_treasure);
end

to heal.wav and it didnt play then either.
So I opened heal.wav in audacity and exported it using a different name ("heal1.wav"), this file played correctly so I proceeded to delete the original "heal.wav" and renamed the new one to "heal.wav" and this worked perfectly. I only conclude there is something wrong with the file. (corrupted possibly?)
I dont know what you want to do about that but I have made a pull request on bitbucket.
User avatar
Roots
Dictator
Posts: 8666
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: Want to be a developer? Want to submit a patch? Start he

Postby Roots » Sat Aug 08, 2015 7:13 pm

Awesome. Yeah, I was really wondering what the heck was wrong with that particular file. It played in my audio player just fine. Anyway, sorry that one was not really any coding for you. The other issues listed on the bit bucket page should get you to work on something more interesting. Let me know which one(s) you decide to grab.
Image
User avatar
Roots
Dictator
Posts: 8666
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: Want to be a developer? Want to submit a patch? Start he

Postby Roots » Sun Aug 09, 2015 10:06 am

http://www.allacrost.org/wiki/index.php/Test_Interface

I had an conversation on our IRC channel today with someone and realized that I'm pretty much the only one that knows that we have a testing interface. I built it a couple years ago because it was something that was sorely needed in order to quickly jump in to different maps, types of battles, etc. to test them. I wrote the wiki page above tonight and added links to it in the developers and game designers sections of the wiki (the two types of people who really need to know about it). I've updated the top post in this thread as well with a link to this page. My apologies for not documenting this and making other developers more aware of it sooner. It really is a huge time saver to testing things.


I'm also continuing to add new tasks in our issue tracker. I've built up quite a nice list so far, and most of these are well suited for new developers to be able to complete. I'm trying to include a good amount of information about where to start (such as what files needed to be changed to complete the task). I'll be continuing to add to this list over the next few days as I discover things.
Image
usey11
Newbie
Posts: 6
Joined: Thu Aug 06, 2015 4:30 pm

Re: Want to be a developer? Want to submit a patch? Start he

Postby usey11 » Sun Aug 09, 2015 8:54 pm

Yeah I've decided to grab issue 6.
User avatar
Roots
Dictator
Posts: 8666
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: Want to be a developer? Want to submit a patch? Start he

Postby Roots » Sun Aug 09, 2015 9:21 pm

Awesome. I figured out how to assign the task to you (I had to add you as a member to the allacrost group on bitbucket). I think now you should have the ability to assign yourself issues. Let me know if you have any questions I can help with.
Image
usey11
Newbie
Posts: 6
Joined: Thu Aug 06, 2015 4:30 pm

Re: Want to be a developer? Want to submit a patch? Start he

Postby usey11 » Mon Aug 10, 2015 7:18 pm

I have coded the ability for dialogue to not have speaker as well as removing the temp sprite solving this TODO aswell

Code: Select all

   -- TODO: replace this by just using the default virtual focus sprite object for the map
   -- TEMP: an invisible sprite used as a narrator and camera focus point
   sprite = ConstructSprite("Knight01", 100, group_start_x, group_start_y);
   sprite:SetMovementSpeed(hoa_map.MapMode.SLOW_SPEED);
   sprite:SetName("");
   sprite:SetVisible(false);
   ObjectManager:AddObject(sprite);


However to do it there needs to be a number for the speakers container that represents no speaker, which means a sprite ID needs to be reserved for no speaker.
I am currently using 100 but I wanted to ask what other number should use and how to document that the number is reserved.
User avatar
Roots
Dictator
Posts: 8666
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: Want to be a developer? Want to submit a patch? Start he

Postby Roots » Mon Aug 10, 2015 7:55 pm

Use 0 to represent no speaker. I'm pretty sure that we already have code in place that doesn't allow the creation of a sprite or other map object with an ID of 0. If you like, you can add a constant in map_utils.h called const uint32 NO_OBJECT or NO_SPRITE and use that.

You can also consider adding an alternative function call to AddLine() or whatever the dialogue class method is call that doesn't take a speaker ID, and when that is missing to just use the NO_OBJECT value. FYI: we can't write C++ functions that have variable arguments or arguments with default values because those can not be binded correctly to Lua. That's why in a lot of cases you may find a function with the exact same name with different arguments instead of a single function with default values for some arguments.

Thanks for asking! This sounds great.
Image
usey11
Newbie
Posts: 6
Joined: Thu Aug 06, 2015 4:30 pm

Re: Want to be a developer? Want to submit a patch? Start he

Postby usey11 » Mon Aug 10, 2015 8:38 pm

I though about using 0 but that may cause confusion with this function

Code: Select all

   //! \brief Returns the object ID of the speaker for the line specified (or zero if the line index was invalid)
   uint32 GetLineSpeaker(uint32 line) const
      { if (line >= _line_count) return 0; else return _speakers[line]; }

as no speaker and invalid line can't be differentiated.
However it shouldn't be too much of an issue so ill use a constant and set it to 0 for now and if it is decided it shouldn't be 0 it can be changed easily.

An alternative call to AddLine() would make things clearer when adding dialogue without a speaker so I'll add that too.
User avatar
Roots
Dictator
Posts: 8666
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: Want to be a developer? Want to submit a patch? Start he

Postby Roots » Mon Aug 10, 2015 9:13 pm

Good catch. Yeah, I think it will be fine to leave that as it is for now. Can you add a TODO comment to the GetLineSpeaker about the possibility that it may also return 0 if there is no speaker on the line, and that we need to determine a way to differentiate the two?

I think the change we might want to make there is to print a warning message if the line index is invalid and return 0. It makes sense that we have no speaker for an invalid line.
Image
maxandonuts
Newbie
Posts: 3
Joined: Sat Aug 29, 2015 1:42 am

Re: Want to be a developer? Submit a patch? Start here.

Postby maxandonuts » Sat Aug 29, 2015 11:42 pm

Hello, my name is Max and Im a programmer with over 3 years of experience, ive done a lot of game and non-game related software development, my main languages are C, C++, C#, Python and gaining proficiency in Lua at this point. I read about this project and found it very interesting, downloaded the game and really enjoyed playing it, i think the work you've done here is amazing and really would like to get involved. I've followed the steps and cloned the repo and according to the new programmers section, im posting here so maybe I can begin to get involved.

Greetings and once again, great work so far!
User avatar
Roots
Dictator
Posts: 8666
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: Want to be a developer? Submit a patch? Start here.

Postby Roots » Sun Aug 30, 2015 4:50 am

Hi Max, glad to have you here and thanks for the kudos. :) Is there any particular area of the code you are interested in working on? And out of curiosity, what platform are you planning to do your development on?

For starting out, maybe you can take a look at fixing this bug?
https://bitbucket.org/allacrost/allacro ... n-map-mode

This is a pretty important one to get fixed and hopefully shouldn't be too difficult to figure out. You can also feel free to grab any other issue in our tracker, but the others are significantly more difficult/complex to complete and might not be good for starting out. Let me know if you have any questions, or if you'd rather start working on something else.
Image

Return to “Programming”

Who is online

Users browsing this forum: No registered users and 1 guest