Hello, we apologize but forum registrations are non-functional at this time. This issue should be fixed around mid-December. Until then, please stop by our Discord channel if you'd like to get in touch with the team. Thanks!

Getting started for new programmers

For discussion of the code running behind the game

Moderator: Staff

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

Getting started for new programmers

Post by Roots » Tue Jun 02, 2009 10:14 pm

This thread has been closed as it has been replaced by a new thread at the link below
http://www.allacrost.org/forum/viewtopic.php?f=7&t=5417

--------------------------------------

Every time a new programmer joins the team, I or someone else have to guide them in finding an initial task or two to work on. Traditionally this has just been a back-and-forth e-mail between the mentor and the new member, but I don't see a reason why we can't share those discussions. Someone else may have a good idea for someone to work on, so I thought we might as well open the process. And rather than have a new thread for each new member joining, I thought having a single stickied thread would be better. We can also use this thread to talk about what potential work we have for new programmers.


In summary, use this thread to:
  • Have a discussion with new programmers about what tasks they should get started with
  • New programmers can feel free to ask newbie questions and the veterans can answer them
  • Any topic dealing with new programmers or potential new programmers
Image
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: Getting started for new programmers

Post by Roots » Tue Jun 02, 2009 10:38 pm

So first up we have Chad (Shmoopy909) who joined us yesterday. FYI, since Chad is on summer vacation from college I'm trying to think of something with that in mind. I don't want to give you something that would take you until December, because when school starts back up your time to work on Allacrost will decrease significantly.


The interests he stated on his application were: "battle mode, shop mode, input". There's not a whole lot of work to be done with input I believe, other than allowing the user to create, save, and use custom control schemes and perhaps some work testing joystick/gamepads. That's more of a boot mode task than an input engine task though. Battle mode is in need of a lot of work (maybe even a minor re-write) and we've kind of been purposely putting it off to take care of things we need in map mode. I wouldn't recommend venturing into that code alone. Shop mode is a good mode that needs quite a bit of work, and I think that the GUI is mostly ready for that now. My recommendations are: input configuration/boot mode is definitely worthy to consider, battle mode is something I would not recommend (but you can still try if you like), and shop mode is another worthy consideration.


So Chad, we're actually in the middle of a new experiment with the way we do programming on this team. It used to be the case that we would all take a distinct area of the code. For example, I'd handle the audio engine, gorzuate would handle the editor, MindFlayer would do the battle code, rujasu would work on menu mode, etc. That wasn't the best solution for a few reasons which I won't get into. What we're trying to do now is to focus all our energy on one area of code at a time and work on that together. That way we can tackle a big task like getting the battle code finished for the next release into smaller tasks, and each person can work on small parts of the problem and we can see and feel our own progress better. Right now map mode is what our primary focus is on. So I think I'd like to get you started doing a task or two there.


By the way here's a few of good links to glance through
But for your first task, I want to give you something small that will be easy and just let you get your feet wet a little bit. Usually I like to turn to the bug tracker for this. There's one bug I came across today (I don't see it in the bug tracker) where if you start the game, select "New game", then bring up the exit menu and select "Return to main menu", the game seg faults. Fixing that would be a good start I think. But take a look through the bug tracker and see if there's something you're interested in that doesn't look too tough. Even if there's already someone assigned to it, still consider it because most people aren't working on fixing those issues right now anyway. I'll stop here and let you share your thoughts.
Image
User avatar
Shmoopy909
Newbie
Posts: 14
Joined: Mon Jun 01, 2009 9:31 am

Re: Getting started for new programmers

Post by Shmoopy909 » Wed Jun 03, 2009 6:22 am

Yes the idea of working together sounds good, I think it would allow people to bounce ideas off each other in a better manner since everyone is working on the same thing everyone will be more familiar with whats going on. Fixing a few bugs to start off sounds like a great way to get started, I will take a looksy at the bug tracker while im here at work (boring).
User avatar
Shmoopy909
Newbie
Posts: 14
Joined: Mon Jun 01, 2009 9:31 am

quick question

Post by Shmoopy909 » Sun Jun 07, 2009 11:26 am

Is map_actions.cpp/h out of the project now? It is still included in the windows project file but doesnt seem to be in the source folder. Any comments?
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: Getting started for new programmers

Post by Roots » Sun Jun 07, 2009 12:51 pm

Yes, it was removed a few months back when I developed the event system (map_events.h/.cpp). The map_actions.* files should be removed from the project. I'm rather surprised that they are still in there.
Image
User avatar
Shmoopy909
Newbie
Posts: 14
Joined: Mon Jun 01, 2009 9:31 am

Re: Getting started for new programmers

Post by Shmoopy909 » Sun Jun 07, 2009 10:45 pm

thanks for the reply looks like the windows project file is a little behind :) ill take it out then.
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: Getting started for new programmers

Post by Roots » Mon Mar 08, 2010 12:01 am

Its been a long time since we've had a graphics programmer on our team. But now we've got Matt (MrP) around, so lets start brainstorming about what work needs to be done in the video engine and GUI and what he can start with. I think the perfect first task is to ask him to fix the screenshot bug. Basically, all the screenshots we save to image files are garbled. You can see what I mean (run the game, hit Ctrl+S to take a screenshot, look at the file created). This should be easy to fix (I hope), has immediate and tangible benefit to our team, and is good for getting Matt some modest exposure to the engine.


Here's a full list of things I can think of that need work in the video engine and GUI. These are in total random order and some are very high priority while others are very low. I compiled this list from the progress checklist, the bug tracker, and older discussions and ideas that I remember having on the forums.
  • Feature: All GUI controls should use TextImages instead of rendering the text all over again on each draw call
  • Feature: Add basic support for simple lighting (for use on maps)
  • Feature: Add procedural image support
  • Bug: Selected option in an option box is not always visible
  • Bug: X-axis center and right alignments do not work correctly for textboxes
  • Bug: Full screen mode fails in a dual monitor setup
  • Bug: Big resolutions don't display correctly
  • Bug: Taking screenshots produces incorrect images
  • Feature: We need the ability to insert markups into text to allow (for example) multiple colors within a single body of text
  • Maintenance: Rendered Text needs to auto-manage its own texture memory and a few other clean-ups
  • Bug: MenuWindow scissor rectangle exhibits incorrect behavior
  • Bug: MenuWindow with color background does not draw properly
  • Bug: The cells of the option box do not have uniform spacing between the text
  • Bug: LoadFromFrameSize does not work
  • Feature: Add support for RGB textures
  • Feature: Binding code needs to be written for all relevant video engine classes, functions, and methods
  • Feature: More display mode options for MenuWindows
  • Bug: Option Boxes create slight vertical stretch in text and images
  • Feature: Investigate and possibly move text rendering from SDL_ttf library to FreeType2 library
  • Feature: Advanced construction abilities for option boxes
  • Feature: Add/fix support for advanced visual effects that we can make use of
  • Bug: look into texture referencing warnings and possible memory leaks in video engine
  • Bug: fix graphical glitches in map mode
  • Feature: investigate if the ustring class is really necessary and if not, discard it

That's a good list for starters. I'll let someone else comment before stating what I think should be our top priority items.
Image
User avatar
prophile
Senior Member
Posts: 324
Joined: Fri Jan 27, 2006 12:18 pm
Location: Chaldon, Surrey, UK
Contact:

Re: Getting started for new programmers

Post by prophile » Mon Mar 08, 2010 1:07 am

  • Feature: Add basic support for simple lighting (for use on maps)
I've got a patch on the way for lighting.
Alastair Lynn / Resident Whinger / Allacrost
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: Getting started for new programmers

Post by Roots » Mon Mar 08, 2010 3:07 pm

Mark, aka TheCommunistDuck, joins us now. He has some interest in working on the video engine, but I think that initially we should ask him to work in another area. I don't think having two new programmers starting in the same area of code would be a good idea. :shrug: What I suggest for starters is to work on some of the annoying little bugs in map mode. Specifically, I think a good first task is to resolve the character sprite continuing to walk/run when a dialogue pops up, a treasure is opened, etc. It seems like it should be an easy enough fix, give good exposure to an important and critical area of the code, and have immediate tangible benefits and results for us.
Image
rujasu
Developer
Posts: 758
Joined: Sat Feb 24, 2007 10:40 pm
Location: Maryland, USA

Re: Getting started for new programmers

Post by rujasu » Mon Mar 08, 2010 8:54 pm

IMO, the screenshot bug isn't all that important, but it's fine if that's the sort of thing MrP wants to get his feet wet with. At this point, I'd like to get bugfixes done before adding any new features to the GUI or video engine, particularly the GUI. The GUI may not be absolutely perfect but it's suiting our needs at the moment and should be fine for the immediate future.

The fullscreen/dual monitors thing is an SDL bug; we can't fix that.

Honestly, the main priority there is the texture memory stuff because it's making our program crash. I don't want to put a new contributor into that though, since it seems to be rather difficult, especially for someone just learning our codebase.
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: Getting started for new programmers

Post by Roots » Mon Mar 08, 2010 10:56 pm

rujasu wrote:IMO, the screenshot bug isn't all that important, but it's fine if that's the sort of thing MrP wants to get his feet wet with.
I agree its not of critical importance, but its been around for some time and like I said its something that I think is good for starting out.
rujasu wrote:At this point, I'd like to get bugfixes done before adding any new features to the GUI or video engine, particularly the GUI. The GUI may not be absolutely perfect but it's suiting our needs at the moment and should be fine for the immediate future.
i concur. But do you mean all the bugs or just the more critical ones?
rujasu wrote:Honestly, the main priority there is the texture memory stuff because it's making our program crash. I don't want to put a new contributor into that though, since it seems to be rather difficult, especially for someone just learning our codebase.
I wasn't aware that we had confirmed that the video engine was the direct cause of the crash.
Image
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: Getting started for new programmers

Post by Roots » Tue Mar 09, 2010 10:01 pm

I took some time to think about it. Here's the first set of tasks that I'd like to see accomplished regarding the video engine. These are in-order lists with my recommendations. The first set is intended to be small tasks to get some knowledge and momentum building. The second set tackles the really urgent and critical (but much more difficult) tasks.

Set #1 - Easier tasks
  1. Bug: Taking screenshots produces incorrect images
  2. Bug: LoadFromFrameSize does not work
  3. Bug: X-axis center and right alignments do not work correctly for textboxes
  4. Feature: Add basic support for simple lighting (for use on maps)
  5. Feature: investigate if the ustring class is really necessary and if not, discard it
Set #2 - Critical tasks
  1. Bug: look into texture referencing warnings and possible memory leaks in video engine
  2. Bug: fix graphical glitches in map mode
  3. Bug: Selected option in an option box is not always visible
  4. Maintenance: Rendered Text needs to auto-manage its own texture memory and a few other clean-ups
  5. Bug: MenuWindow scissor rectangle exhibits incorrect behavior
A few notes about some of these:

* (Set #1, Entry #3) The textbox alignment issue is actually affecting the current code (in shop mode, and maybe elsewhere). That's why I added it even though its a GUI issue.
* (Set #1, Entry #4) I know prophile committed code for lighting changes yesterday. But we need to be able to take advantage of them in Lua map scripts for that to be any use to us. Honestly I'm not sure if this would be anything more than just writing binding code for the lighting calls because I don't want it to be a time-consuming task, and it may be if we go all out with it.
* (Set #1, Entry #5) If we can get rid of ustring, I'd like to do so as soon as possible. Its been creating headaches for me throughout the game logic code lately. If we don't need it and text rendering can be done in UTF-8 format (which is what gettext returns to us in strings I believe), I want to get that changed rolled out. I'd be available to update all code that uses ustrings to instead use std::strings.
* (Set #2, Entry #1) This is priority #1 since its causing game crashing, but its going to be pretty intense and I don't want to discourage anyone in the first few days. hence all the smaller, easier tasks in the first set.
* (Set #2, Entry #2) This has been an issue for years and I still notice it today (its very annoying). I went as far as I could with this bug in the past before deciding it was something in the video engine. This is another very difficult task, but also a very important one.
Image
User avatar
gorzuate
Developer
Posts: 2575
Joined: Wed Jun 16, 2004 9:03 pm
Location: Hermosa Beach, CA
Contact:

Re: Getting started for new programmers

Post by gorzuate » Wed Mar 10, 2010 1:21 am

Roots wrote: * (Set #1, Entry #5) If we can get rid of ustring, I'd like to do so as soon as possible. Its been creating headaches for me throughout the game logic code lately. If we don't need it and text rendering can be done in UTF-8 format (which is what gettext returns to us in strings I believe), I want to get that changed rolled out. I'd be available to update all code that uses ustrings to instead use std::strings.
F'ing A, Roots :bash: What headaches?

We've already decided on UTF-16 (wow, back in 2008 even!). We finally have translations working, and you want to rip it apart? :axe:

You need to reread the "getting gettext translations into allacrost" thread, starting here: http://www.allacrost.org/forum/viewtopi ... 055#p26055

:rolleyes:
Image
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: Getting started for new programmers

Post by Roots » Wed Mar 10, 2010 1:26 am

Koray (colossal) marks the third new programmer we've added to our team in roughly a 24 hour period. :eyespin: He indicated an interest in graphics, but MrP sort of has "dibs" on that right now. And since Koray seems to have a good amount of relevant experience coming in, I think it would be better to put him on something a little more important anyway. Here are my ideas for Koray:

1) Scripting Engine + Lua
We've had some bugs/issues with our Lua scripts lately and haven't had anyone really dedicated to sitting down, understanding the problem, and finding the best solution. The particular issues that come to mind in this work are: (1) the Lua thread caching mechanism for opened files, (2) conflicts between map files that share the same function names, (3) general Lua "namespace" and naming conflict issues. This work would be a little bit ill-defined though, so it might not be the best thing for something to start with.

2) Audio Engine
There were some tasks listed for the audio engine on the wiki for the demo 1.0 release and we unfortunately had to put them all off because it was a low priority. And honestly it still is a low priority, so it might be better suited for him to work on later. But he did indicate some interest in working in audio and its also true that we need someone working there so I thought I'd throw it out as an option. There's also a nasty, rare bug where the audio sometimes becomes completely garbled, but its fixed if you manage to switch to a new map or battle and change the active music.

3) Event systems
This would involve working on the map and battle event systems, possibly combining the two together into some common classes in src/common/. I'm confident that the map event system is a good design so far as its ability to process scenes and create a dependency graph of sequenced events, but I'm not confident that its the right "balance" between C++ and Lua. Maybe events and event processing should be more on the Lua side instead of C++ constantly being the one to process events and call appropriate Lua functions. I'm not sure. The battle event system is pretty much non-existent at this point as well, so there's a good amount of work that needs to be done there that can leverage existing work (the map event system).


Those are my three main ideas, though I have others: working on getting the boot mode code cleaned up and improving the options interface there, I'm sure we could find stuff in map mode that needs to be done like more intelligent enemies on the map and maybe fix some flaws in collision detection and pathfinding, etc. Any thoughts?
Image
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: Getting started for new programmers

Post by Roots » Wed Mar 10, 2010 1:32 am

gorzuate wrote: We've already decided on UTF-16 (wow, back in 2008 even!). We finally have translations working, and you want to rip it apart? :axe:

You need to reread the "getting gettext translations into allacrost" thread, starting here: http://www.allacrost.org/forum/viewtopi ... 055#p26055
Who said anything about ripping translations apart? I had/have no intention of doing anything in that sort at all. I wasn't aware gettext was using UTF-16. If the std::strings storing the translated strings are in UTF-16 already, then the ustring class is unnecessary and should be tossed out. There's a mess of classes right now, some containing std::strings and others containing ustring strings and some classes which accept one but not the other, or sometimes both if we're lucky, and constructors which take ustrings which Lua can't do anything with because Lua doesn't know/use ustrings at all...its a pain in the ass. And as I said for this task, its not a definite "remove the ustring class" but an investigation into whether we really need it or not. But this is sort of foing off-topic so if we need to discuss this further, lets do so in an appropriate thread.
Image
TheCommunistDuck
Newbie
Posts: 2
Joined: Mon Mar 08, 2010 2:44 pm

Re: Getting started for new programmers

Post by TheCommunistDuck » Thu Mar 11, 2010 3:14 pm

Um, hi. (I'm sorry if this is in the wrong place. It seemed a good place; mainly because I think it's due to my new programmer status and I think that's the question.)

Working on getting a VS2008 solution to go. I know some files have been moved, deleted, etc. and I'm managing to sort that out.
However, there seems to be a lot of #include "global.h" everywhere. I checked on the svn trunk on sourceforge, and it's still in the files there. Which dismisses my thought of an old file. It's throwing compile errors that it can't find it, and I take it to mean the global.h in src/common/global/.

Is this just VS being stupid with me? Or have I missed something somewhere?

And I've been checking out the issue Roots mentioned, and I'll get working on that. Is the commit to SVN thing appropriate only when something reasonably big has been done? Or finished on a certain feature? (Sorry, SVN is totally new to me.)

Thanks everyone.
-Mark.
User avatar
Roots
Dictator
Posts: 8669
Joined: Wed Jun 16, 2004 12:07 pm
Location: Austin TX
Contact:

Re: Getting started for new programmers

Post by Roots » Tue Mar 16, 2010 11:22 pm

The global.h the code refers to everywhere is indeed located at src/common/global/global.h. That file *used* to be located at src/global/global.h but it was moved a few weeks ago to its current location. So yeah, sounds like VS is being stupid and you should check to make sure that it knows to look for headers in src/common/global/global.h. If it already is, maybe VS is also finding another global.h in a library somewhere else and is complaining because it doesn't know which global.h we're referring to? Just a guess. :shrug:

Your first SVN commit does not need to be large. Commits can be as small as a single character change but generally are a few lines to a few thousand lines, with the common commit size somewhere in maybe 100-500 lines or so. At least with this project. If you get the VS2008 project working I would recommend that your first commit should be those project files. That in itself has enormous value to the team and represents a good amount of work. Like I mentioned in an e-mail a few days ago, your first commit has to be "cross-checked" by someone on the team first just to make sure you're not trying to do something crazy (which some people have actually done in the past). Once we verify that you're a sane person, then we'll give you SVN access and you can start committing code without requiring anyone to review it first. :)
Image
gameretch
Newbie
Posts: 1
Joined: Fri Feb 11, 2011 10:13 pm

Re: Getting started for new programmers

Post by gameretch » Fri Feb 11, 2011 10:21 pm

Greetings team. I would like to join your team in behalf of enhancing my skills as a computer programmer. I am currently possessed with knowledge of C/C++, Java, Lisp, Scheme, PHP, Perl, and Python, Object-oriented programming, dynamic programming, Advanced mathematics, Physics, and Design and Analysis of Algorithms. I am currently a university student in the philippines and a tutorial volunteer in my institute. Experienced in Programming contests such as ACM-ICPC, ICCF, and whatnot. A consistent dean's lister. And finally, a strong interest in games.
rujasu
Developer
Posts: 758
Joined: Sat Feb 24, 2007 10:40 pm
Location: Maryland, USA

Re: Getting started for new programmers

Post by rujasu » Mon Feb 14, 2011 8:38 am

gameretch wrote:Greetings team. I would like to join your team in behalf of enhancing my skills as a computer programmer. I am currently possessed with knowledge of C/C++, Java, Lisp, Scheme, PHP, Perl, and Python, Object-oriented programming, dynamic programming, Advanced mathematics, Physics, and Design and Analysis of Algorithms. I am currently a university student in the philippines and a tutorial volunteer in my institute. Experienced in Programming contests such as ACM-ICPC, ICCF, and whatnot. A consistent dean's lister. And finally, a strong interest in games.
Hello gameretch. Thanks for your interest in joining the team. Unfortunately, development is currently at a standstill because we've lost contact with the site owner, and other members of the team have not been active as of late. I encourage you to get involved with other open source games you're interested in, or consider the Allacrost engine as a starting point for your own game. Best of luck to you.
User avatar
Bertram
Senior Member
Posts: 127
Joined: Fri Feb 26, 2010 3:08 am

Re: Getting started for new programmers

Post by Bertram » Fri Feb 18, 2011 5:05 am

Hi rujasu,

It's a shame because this engine has almost everything it needs.

If we ever want to see development keep on, I'd first ask: What do we need now?

Seemed to me, that a true story and the start of a few beginning maps would be what the project needs.
I'm sure that trying to do the thing for real would get motivation back and help get rid of the bugs.

Now for that, I guess a new leader is required.

If there are plans about all that, be sure to let me know.

Best regards.
Locked