New Programming Contributor

For discussion of the code running behind the game

Moderator: Staff

Jechs
Newbie
Posts: 2
Joined: Fri May 06, 2011 10:38 pm

New Programming Contributor

Post by Jechs » Sat May 07, 2011 1:38 am

Hello everyone,

I've talked a bit with Roots in general about the project, and I was curious if there was anywhere that I could help out to get my feet in the water. For some background on me and my expertise, I'm finishing up my junior year working on a Computer Science degree, with a specialization in Java, with knowledge of C++ and Lua. I'm trying to get some solid work under my belt for eventually applying to game development studios when I finish my degree, and Allacrost seems like a great place to do it.

So if there's anything out there that I can put some time into, let me know!

Thanks,

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

Re: New Programming Contributor

Post by Roots » Sat May 07, 2011 1:51 am

I have a few ideas where you can make yourself useful. For your first assignment we typically try to pick something that can be completed quickly and doesn't require you to study a lot of existing code. Instant gratification is a good thing. :heh: So here are my ideas:


1) ShopMode has two issues right now. First, it causes a crash/seg fault after you leave the shop. Second, the draw positions for the sprites on the lower menu are screwed up when you select a weapon or armor. Fix these.

2) In BattleMode, the actor selection mechanic can get screwed up when an enemy dies. There's cursor memory so it remembers the last enemy attacked, and if that enemy is dead when its that character's turn again, they'll have the enemy selected. Fix this so that you can never target a dead enemy.

3) In BattleMode, the game allows you to choose a skill to use for a character when that character does not have a sufficient number of skill points (SP) to execute the skill. So the character is about to use the skill, but then nothing happens because they don't have the SP to execute it. Fix this so that the player is never allowed to select a skill that they don't have enough SP for.

4) In BattleMode, the quantity of items in your inventory does not decrease when the item is used. (For example, if I have 3 potions and use one of them, the next time I open the item selection menu it still shows that I have 3 potions). Fix this.


Choose your poison, get the latest source from SVN (you'll want to work in trunk/game) and get cracking. Once you think you have fixed the specified issue, post a patch or diff here so that I or someone else can take a look at your changes. If they're acceptable, we'll grant you SVN access and you can make your first commit. Sound good? Let us know which task you choose to do. And always ask questions if you don't know something or get stuck. Its good to be on IRC for asking questions (I'm on there most of the day lately), but its fine to ask your question in this thread as well. Good luck!
Image
nemesis
Senior Member
Posts: 157
Joined: Fri Apr 29, 2011 7:53 am
Location: Sachsen/Germany

Re: New Programming Contributor

Post by nemesis » Sun May 08, 2011 7:56 pm

Looks like a list where also I can try to find some way into the code. :eyespin:

Maybe Jechs can tell the topics he is going to work on and I take other points. None of this seems to be too complicated.
User avatar
Roots
Dictator
Posts: 8668
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: New Programming Contributor

Post by Roots » Sun May 08, 2011 8:12 pm

Agreed. These are meant to be simple tasks to get programmers that our new to the project some exposure, without overwhelming them and while still making their contributions very useful.

I agree. Jechs is still working on getting his build environment setup and getting the game compiled (Windows development project files are a PITA). Last I heard from him he was getting close to getting it working. I know he's taken a look at the shop code but that's all I know so far. If you want to take a particular task, either of you, just "reserve" the right to work on it with a post here so that each other can make sure not to work on the same thing.
Image
Jechs
Newbie
Posts: 2
Joined: Fri May 06, 2011 10:38 pm

Re: New Programming Contributor

Post by Jechs » Sun May 08, 2011 10:57 pm

I've just about gotten it to build on my tower at home, I just haven't had much time this weekend due to not being able to get at it at work ( two 8 hour shifts ), and having to finish up a few papers and projects. It's all due Monday/Tuesday though, so after that I'll be able to dive in full force. As far as which one to get at, I don't really have a preference, so you can claim whichever one looks the most interesting to you. :)
nemesis
Senior Member
Posts: 157
Joined: Fri Apr 29, 2011 7:53 am
Location: Sachsen/Germany

Re: New Programming Contributor

Post by nemesis » Mon May 09, 2011 3:30 pm

Okay, so maybe I will have a look on the battel mode bugs. None of this seems to be too complicated.
User avatar
Roots
Dictator
Posts: 8668
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: New Programming Contributor

Post by Roots » Mon May 09, 2011 5:30 pm

It isn't. Battle mode is kind of in a messy state right now though, but I've been focusing all my energy on adding new features and not on making it spic and span. I figure there will be plenty of time for that later. Just playing through battles a few times should make it obvious what needs to be tweaked/fixed. There's all sorts of little problems to take care of.
Image
User avatar
Roots
Dictator
Posts: 8668
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: New Programming Contributor

Post by Roots » Tue May 10, 2011 5:18 am

Here's a few more I wrote down in another thread a few days ago. These also are all in battle mode.

  • Sometimes the target text in the command window gets messed up and drawn at the incorrect position (I think extra line breaks are somehow being inserted in the text)
  • "Critical hits" show up with black damage text instead of red
  • On the battle rewards screen, if you get more than one of the same item from the defeated enemies in the "Items Dropped" menu, it shows up the same number of times instead of just increasing the quantity counter displayed. For example, if I got two potions the screen will show: "Potion x1 {newline} Potion x1" when instead it should say "Potion x2"
  • Skills that can't be used because of insufficient SP requirements are not grayed out like they should be
Image
nemesis
Senior Member
Posts: 157
Joined: Fri Apr 29, 2011 7:53 am
Location: Sachsen/Germany

Re: New Programming Contributor

Post by nemesis » Tue May 10, 2011 7:59 am

Okay, I'll be back in one year after going through the battle code. :hack:
nemesis
Senior Member
Posts: 157
Joined: Fri Apr 29, 2011 7:53 am
Location: Sachsen/Germany

Re: New Programming Contributor

Post by nemesis » Thu May 12, 2011 1:34 pm

Roots wrote:
  • Skills that can't be used because of insufficient SP requirements are not grayed out like they should be


This should generally be not a big deal, since OptionBox already implements the handling of disabled items by graying them. Basically, the option list with the skills has to be updated after the usage of skills. This function is also already implemented but it seems to be never called.

However, what I wonder is, that items in an OptionBox can still be selected although being disabled. For me, 'Load Game' in the boot menu is disabled, i.e. grayed, but can be selected by the cursor and the corresponding menu can be entered. Therefore, in the OptionBox itself it should be avoided accessing disabled items. My suggestion: Let the cursor jump over disabled items, e.g. in the boot menu when 'Load game' is disabled and the cursor is on 'New Game' it should directly go to 'Options' when 'Load Game' is disabled.
User avatar
Roots
Dictator
Posts: 8668
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: New Programming Contributor

Post by Roots » Thu May 12, 2011 1:47 pm

Huh, well that's odd that the function is already implemented. That task is easier than I thought then. :heh:

nemesis wrote:However, what I wonder is, that items in an OptionBox can still be selected although being disabled. For me, 'Load Game' in the boot menu is disabled, i.e. grayed, but can be selected by the cursor and the corresponding menu can be entered. Therefore, in the OptionBox itself it should be avoided accessing disabled items. My suggestion: Let the cursor jump over disabled items, e.g. in the boot menu when 'Load game' is disabled and the cursor is on 'New Game' it should directly go to 'Options' when 'Load Game' is disabled.


I think this is a good idea, but I'm hesistant to apply it on a global basis (ie hard code this behavior into OptionBox). Instead, I think its better to handle it on a case-by-case basis. On the boot screen, sure this makes sense. But on the battle skill selection screen, I would like the player to still be able to view information about the skill that they can not use. (If you press the "s" key on the skill list menu, it switches to an information display about the skill selected). Perhaps the best thing to do would be to add a method to OptionBox called "SkipDisabledOptions(bool toggle)" that would enable this behavior. Yeah, I definitely think that's what we should do.

Oh, did I just make more work for you? :angel:
Image
nemesis
Senior Member
Posts: 157
Joined: Fri Apr 29, 2011 7:53 am
Location: Sachsen/Germany

Re: New Programming Contributor

Post by nemesis » Thu May 12, 2011 2:00 pm

Hmm, if an extra property for the OptionBox is not too much, it can be done this way.

I didn't know the option with the additional infos for the skills. However, it is still questionable, if a user needs informations about a skill he cannot use. But your right since I guess there will be potions to recover SP...

But not allowing to confirm disabled entries should be coded in OptionBox though. Then, independent of jumping over disabled items or not, nothing bad can happen.
User avatar
Roots
Dictator
Posts: 8668
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: New Programming Contributor

Post by Roots » Thu May 12, 2011 2:13 pm

Yeah, I think the default behavior of OptionBox should be to not allow you to select disabled entries. That way if someone wants to be able to selected disabled options, they have to explicitly request that custom behavior from the OptionBox object.
Image
nemesis
Senior Member
Posts: 157
Joined: Fri Apr 29, 2011 7:53 am
Location: Sachsen/Germany

Re: New Programming Contributor

Post by nemesis » Wed May 18, 2011 9:16 am

Roots wrote:
  • Skills that can't be used because of insufficient SP requirements are not grayed out like they should be


Now they are.
nemesis
Senior Member
Posts: 157
Joined: Fri Apr 29, 2011 7:53 am
Location: Sachsen/Germany

Re: New Programming Contributor

Post by nemesis » Wed Jun 15, 2011 12:40 pm

Roots wrote:
  • Sometimes the target text in the command window gets messed up and drawn at the incorrect position (I think extra line breaks are somehow being inserted in the text)

Done -> Rev#1923
Roots wrote:
  • On the battle rewards screen, if you get more than one of the same item from the defeated enemies in the "Items Dropped" menu, it shows up the same number of times instead of just increasing the quantity counter displayed. For example, if I got two potions the screen will show: "Potion x1 {newline} Potion x1" when instead it should say "Potion x2"

Done -> Rev#1970
User avatar
Roots
Dictator
Posts: 8668
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: New Programming Contributor

Post by Roots » Mon Jun 27, 2011 5:12 am

I have a few small/moderate tasks suited for new people to tackle.


1) Fix dialogue bubble icon being drawn under tiles
If you go to the cave in the recent release and look at the dialogue bubble for the very first NPC you see there, part of his bubble icon gets covered up by a map tile. I haven't looked into this, but its probably because the icon is being drawn at the same time as the sprite, and some map tiles are drawn after the sprites so the tiles are drawn over the icon.

To fix this, the bubble icons need to be drawn after all sprites and all tiles, as it is effectively a GUI-layer object. It should be drawn before the stamina timer, location intro image/text, and dialogue window though.


2) Solve battle indicator graphical problem
Battle indicators are text and graphics that pop up on top of an actor in battle. The most well-recognized example is damage done in orange/red text. Icons represent change in status for an actor. For example, if you execute the "Stun Strike" skill, an icon will pop up showing that the target has been stunned.

The problem here is that stun strike also deals damage. If you look closely, you may see that the stun status icon covers up the damage text. Thus the player is completely unaware of how much damage the skill caused (or if it even caused damage at all). We need someone to figure out a way to separate the different indicators so they don't cover each other up like that.


3) Battle enemy actor placement
Currently when we place enemy sprites on the battle field, they are hard-coded to be placed at certain locations. The first enemy (#0) therefore always goes to the same coordinate X0, Y0. What we need is someone to develop a simple algorithm that takes the following inputs:

- The area where enemy sprites may be placed (this is the same for every battle)
- The number of enemies
- The size of each enemy
- The type (ID) of each enemy

And produce coordinates for each enemy that:

- Spaces the enemies out enough so that they do not overlap (although minor overlap is acceptable for crowded scenes)
- Places the enemies in a logical sort of formation (ie enemies with similar IDs stick together, smaller enemies surround the larger ones, etc).

It may sound simple, but it will actually take a bit of work to get an algorithm that can handle a variety of different enemy parties and configurations. It doesn't need to be extremely fancy right now, but just something that is basic and easy to extend from in the future.



These are open for anyone to take on, just announce that you are doing so so that we don't get multiple people working on the same task.


On a slightly related note, I'm thinking I should make a stickied thread in this forum for new contributors so they can A) know what they need to get started, B) have a place to post requesting for tasks to be given, and C) so that I can post stuff like this in a more prominent spot.
Image
nemesis
Senior Member
Posts: 157
Joined: Fri Apr 29, 2011 7:53 am
Location: Sachsen/Germany

Re: New Programming Contributor

Post by nemesis » Mon Jun 27, 2011 8:08 pm

I think I would like to work on item 1) since as stated in viewtopic.php?f=7&t=5379 I'm going to go through the map (and also drawing) code. Was there already someone working on this?
User avatar
Roots
Dictator
Posts: 8668
Joined: Wed Jun 16, 2004 6:07 pm
Location: Austin TX
Contact:

Re: New Programming Contributor

Post by Roots » Mon Jun 27, 2011 9:56 pm

Well I created these with blDraX in mind since he's new and needed some good new-person type tasks to do. He hasn't read the message I sent him about this thread yet though. If you can find something else to do, hold off on #1 until bldraX posts here and states which one of these tasks he'd like to do. But if you can't find anything else to work on, or a couple days have passed and he still hasn't posted here, then go ahead and work on that. I don't think it will take you longer than 15-30 minutes.
Image
nemesis
Senior Member
Posts: 157
Joined: Fri Apr 29, 2011 7:53 am
Location: Sachsen/Germany

Re: New Programming Contributor

Post by nemesis » Tue Jun 28, 2011 7:09 am

Well I created these with blDraX in mind since he's new and needed some good new-person type tasks to do.


Sorry I didn't know that. :angel:

Good luck @blDraX. :)
nemesis
Senior Member
Posts: 157
Joined: Fri Apr 29, 2011 7:53 am
Location: Sachsen/Germany

Re: New Programming Contributor

Post by nemesis » Tue Jul 05, 2011 7:18 am

If no body else is assigned to 2) I will fix this. To be honest I wanted to have this fixed long ago since I really didn't like this. And also the next release knocks at our door and this is one issue that really looks bad.

I don't guess it will take some time.
Post Reply