Nav: (Display/Hide) - Home - About the Author / this page

Current Projects: Americana Engine (Game Engine Development)
Showing posts with label Fall 2012 in Concepts. Show all posts
Showing posts with label Fall 2012 in Concepts. Show all posts

Saturday, October 5, 2013

Handling Diagonal Movement in Tactical RPGs


Ignore the Battle GUI - it is a mockup and therefore has incorrect information.

Normally Tactical RPGs do not allow diagonal movement, however I propose a system that handles this while factoring in obstacles.

While designing the war system in Americana Dawn, there were previously a few issues about the move range on a character; because the shoot distance is calculated by absolute distance from the character (instead of grid squares) it would create a disadvantage for some units. Also, it creates movement range more like a circle.

If a melee attacker was hit from a diagonal, it would normally take two turns for it to reach the target. The extra turn is a huge difference - the attacker that could otherwise defeat the enemy may not survive the second turn.

I had a few choices, either restrict attack range, or include diagonal movement. Moving based on absolute distance was considered, but it was ruled out since it can get messy at times and might not find the optimal route when tiles are weighted. So a diagonal is calculated as 1.5 movement points. (It might be 1.4 movement points later if the game requires more precision.)

But this is not factoring in the weights of the various tiles, so this is achieved by taking the weight of the diagonal square that you move to, plus the two adjacent squares that you cross getting there, and dividing by two. Thus the formula is:

Movement Cost = (Tile Weight for upper right tile + upper tile + right tile) / 2, relative to the character.

There's situations where a diagonal move takes up more move points than moving two spaces instead, but the game automatically calculates the shortest distance to a tile anyways so it isn't a real problem.

The drawback is being able to get to normally inaccessible tiles via a diagonal move. Consider it as an advantage - the 'creative designing' process should ensure this happens only when it needs to.

I think more of the creative designing should be the AI script for these battles, which is mostly based on the enemy commander's personality, although it usually looks ahead at least a turn and makes decisions only based on what it can see, and will find cover and ambush if possible.

Wednesday, February 20, 2013

Moving non-friends into Facebook friend lists


Custom coded Zuma Blitz friendlist that limits the share list to only friends and followers who are playing Zuma Blitz, preventing unnecessary spam to friends. (In reality, only 32 of those people in the list are my FB friends.)

On Facebook, although friend lists are designed to organize your friends, they can go past their intended purposes. The API can read lists and add / remove members to lists with the proper permissions, but nowhere in the documentation does it say that it's limited to adding friends.

Steps:

The following applies to version 1 of the Graph API only.

  • Go to Graph API Explorer
  • Click on Get Access Token, on Extended Permissions check read_friendlist and modify_friendlist and click 'Get Access Token'.
  • Enter me/friendlists to get your friend lists, copy the id for the friend list you want to add people in replacing {friendlist_id} and {user} with the appropriate values, and press submit:
    {friend_id}/members?members={user}
  • It returns true of succeeded, and some error message otherwise.
  • Check your list back on FB and it will have that person added.

This allows you to share stuff in a way similar to Google+ Circles (speaking of that, there is an unofficial Facebook Circles app that allows you to do this, but only for friends) by selecting a list of friends and non-friends (they won't be informed you are sharing stuff to them). If you allowed following on your profile they can like or comment on your stuff and will show up on their newsfeed if they are following you if you share a post using that list (the friends of friends privacy preset doesn't allow this). Note you won't see any posts from non-friends even though they're on that list, since you're technically not following their posts (this is on another request - the follow options are only presented to you when you send them a friend request or follow, and revoked if they reject), but this can be worked around somehow without sending them a request.

Practical Applications:

  • Given that I have a bunch of pending add requests from Zuma Blitz players (I have followers on), I can simply put them on a custom list to share related posts without having to confirm the request or show up on their leaderboard - I won't be able to share gifts to them but I don't do it anyways.
  • Facebook Games can use this as an additional filter when sending gifts or requests, since in my apps only half (the game friends) are actively playing and the rest (the real friends) aren't and I don't want to spam them. Currently I haven't seen this done anywhere.
  • A separate list called 'Untrusted' can be made, by placing people on that list and setting privacy settings to exclude that list, I can essentially prevent groups of people from seeing Friend of Friend posts (or posts for Friends but one of their friends are tagged) - whether they're friends or not.

Notes and Anomalies:

  • Directly posting to that list with that privacy setting is disabled. This does not stop you from posting on the newsfeed with the default share being that custom list.
  • Non-friends have a lower profile picture resolution when the list is browsed, and no profile pic showing at all when searching the list.
  • The order of friends on that list are no longer alphabetical.
  • People's public posts can appear on that feed during realtime updates, and are counted when it tells you how many of your friends were using an app (if their activity for that app was set to Public).

Limitations:

  • You can't add non-friends in the Restricted list in order to prevent them from seeing anything other than Public posts, which means anyone with at least a mutual friend can see a good deal of your stuff. (Or any list you didn't create yourself, for that matter.) This is probably a bad security practice at the very least and I would have to resort to blocking people.

Updates: (added 6/8/2014)

API v2.0 (and above) prevents any type of friend list management, such as viewing the friends of a friendlist (which returns a empty list, no errors), or adding / deleting friends from a list (it requires the manage_friendlist permission, which you cannot give to Graph Explorer). This can cause some apps (like the circles app mentioned above) to fail altogether. FB games that use that method as a means of creating custom send lists will need to be recreated via a separate database.

Although accessing a friendlist will not display any of your friends, the API will still display both user ids and names of people who were added using the above method.

Additional data might be needed in order to conclude whether a nonfriend on that list who declines the user_friendlist permission will affect this as well.

Saturday, December 29, 2012

Two Weeks into the AH: Flipping Amulets (and other goods)


A large warehouse of gems and other components ready to craft and sell.

Another week goes by in the AH and I've at least doubled my asset values (at around 75M). It makes any gold farming in D3 seem rather trivial at the rate which gold is gained from flipping items. (I had to split up my time between D3, programming, and other FB apps, as well as checking the newsfeed manually, since the undocumented RSS feed that gave me daily digests of friends' status messages over the last two years was taken offline.)

In addition to gem selling, I've resorted to flipping amulets this week because of several traits that make it unique. First, the caps for attributes go much higher than usual, and second, they can also be fitted onto followers and have no class restrictions. The first reason makes them valuable as key attributes approach their max values on ilvl63. There are occasions where some valuable amulets are auctioned off for under 100k, and sold for much more.

Note on image above: It doesn't look like I have made a lot compared to last week, but keep in mind: I do have 220+ more Perfect Square gems ready to craft or sell (in case a high point rises in the market) and filled all my slots with valuable gems and TOS, which values to at least 15M+ here. There's also five Star and Flawless Star gems being put on auction in the RMAH as well as a 160+ STR and VIT Depth Diggers.

What to go for in the GAH (Amulets): Anything with two of the following attributes:

  • Gold Find > 30%
  • Crit Chance > 7%
  • Crit Damage > 66%
  • Attack Speed > 6%
  • Any Main Attribute > 303
  • Magic Find > 40%
  • Resist All > 60

Note on Flipping (in detail): Best to research the lowest cost of an item with those attributes before starting to make your bids/buyouts. You may want to keep track of how much you paid, and how much you listed the item as, so you can decrease its if it fails to sell, as long as you break even.

If you want to flip Legendaries, keep in mind some items are slightly more profitable to sell on the RMAH. Stormshields with good stats (at least 200 STR and 100 VIT) tended to sell well at 1-2 bucks profit a piece - and they were bought at 1mil or less. Block percent was irrelevant. You could try this for gems for a nice profit (as high as 70% ROI at the time of writing), but they sell a lot slower, and you need more of them before you can put them on the market.

Friday, December 21, 2012

One Week into the AH: Diablo 3 Auction House Tips


This gem commodity looks like a good sell - better produce them before the selling price goes down. (Today's deal: Perfect Square Rubies - between 5-7PM PST producing 28k gold per gem produced)

I've heard from one of my friends that he was able to sell off $600 worth of gear after quitting. Wanting to try the same, I got my copy in December. I realized a lot has changed in seven months since the AH was first available - gold is a lot less and you can't profit from gems. Still, I manage to find ways to profit from this economy, despite the fact that making good money here is nonexistent at this time (at least until PvP comes out). Within two weeks (one was spent building up my character to 60), I have approximately 36 million gold in assets. Most of it was not from gold farming.

My Tips for Profiting and getting the most out of the D3AH (updated Jan 2013):

  • Find cheap legendary items with good stats (under 1M) and sell them back on the RMAH. You should research the average price on both the RMAH and the Gold AH beforehand. For anything less than 1M, selling for two dollars is sufficient enough to cover the costs (this equates to > 3M gold at the time of writing). They don't sell often, but when they do they pay well.

  • Upgrading your gear: Typically the three most important attributes that you want will give you cheaper costs than you expect. The highest stats are typically (but not always) the most expensive. Something like 20% less stats could be much cheaper. It took under 5M in gold total to upgrade my Barb to 96k dps, while still being able to survive Inferno, only one item bought was 1M.

  • Basic Stuff on Auctions: The auction runs on a proxy bidding system - only the second highest bid is displayed. If you place a bid, and it doesn't beat the other person's max bid, it will show your bid, since the system automatically bids for them in 5% increments (up to their max bet). If you win the auction, the cost is what the second highest bidder put down (the difference between your max bet and the actual price is given back to you via a refund).

  • Pinning Auctions: When you place a bid, whether you win or not, it will be pinned in the 'active auctions' category (even if you don't win) so you have a chance to bid again closer to the auction end time.

  • Bid Sniping: Place a large bid (up to what you want to spend) seconds before the auction ends). You'll want a watch with a second hand to do this. A well timed snipe almost guarantees an instant win. If not, you at least raised the cost of the item for the person who won. Tip: Copy your max bid to the clipboard and paste it in to bid faster. There is a few second delay before your bid is actually placed. (Note: The time before auction ends doesn't refresh on your bids until you scroll down, and in results until you search again or flip through pages)

  • Mass Bidding: If you see a lot of extremely cheap items with a few hours left to go and are not planning to be on the auction house at the time it ends (like 2AM-7AM) don't be afraid to put a larger bid on those items. (ex. if the item is worth 1M and the cost is below 500k, place 500k bids on all cheap items that end during that time). If they don't win, you'll get your gold back.

  • How Selling Works: If you want to list an item, for equipment the suggested bid cost is the sell price of the item, with the buyout left blank. For commodities, it is the value of the Last 10 Trades (this can be manipulated - see below) and is your sell price. They last for 36 hours either way, and the item is returned to you (or for commodities, what you didn't sell, as well as gold for what sold).

  • Bid or Buyout? You have two options for selling items: You can either set a decent buyout price, or have the people build up the price for you via bids (it is recommended you start your bid at the price you originally paid for it, plus 20%). This avoids the 'too high, didn't sell' situation.

  • Flipping Items: It is very possible to flip items for a substantial profit, especially when it comes to amulets (and rings). Anything with a 45% gold find should sell for at least 500k, and even more with a good crit chance/dmg. However, you can only have ten auctions active at one time, so you'll need to do a tradeoff between high profits and faster selling. My strat would be to keep two items selling above 1M, seven in the 300k-1M range, and one for something else (like gems or TOS). There was one instance where I bought a 3M amulet with a good crit chance / dmg for 3M and proceeded to sell it for 5M.

  • Flipping Gems: This is faster than item flipping, but although profits are significantly lower per gem sold and makes up for quantity, you'll have to spend a lot of time clicking to craft each one (if you have a laptop, you can read some articles to pass the time while you're crafting away with your other hand). Input the prices of all grades of a gem color you're interested into a gem calculator of your choice and TOS costs (mine above was built from scratch). Buy gems and craft them up to the level where the most percent profit can be made. If there's any higher grade gem with a -17% or lower profit and a higher level gem has over 4% profit, buy that grade instead as it saves the time used to craft that gem, (if the estimated price is below -15% profit, buy as many as the AH will allow, but read the footnote below)

  • Commodity Supply and Demand: The supply and demand system works a bit differently for commodities at the AH. The 'Price per Unit' is the maximum amount of gold you will pay for a single item. The reason why the supply of trades goes up is because if gems are bought faster than they are listed, eventually the buying price will be higher as supply runs out, based on what people list their gems as. (Some testing with buyout values indicate most of the time less than 3000 perfect square gems of a single color are in the market at one time, and less than 1k gems with a grade of Star or higher are being sold.) The only reason why prices goes down is that people want get their gems sold first, and they try to price competitively. When two or more people are in a price war, the selling price for a gem can go down quite a bit (for a Perfect Star Ruby, 6.8 mil -> 6.5 mil)

    (The 'price wars' are more prevalent when it comes to plans in the RMAH, as there is a huge price difference between the GAH and RMAH when you do the conversion, typically in the millions for a single plan. The most I've gotten out of one trade was 22 million gold profit from selling a Demon's Skin Plan for 15 bucks... after buying it for 32 mil.)

    • Example: 100 P Square Ruby gems are selling for 40k. 50 others list for 45k, 20 for 50k, and 10 for 60k. The avg last trades are 40k.
    • Without doing any additional research, people will usually craft P Squares and list for 40k (at a 1k profit per gem made), although most guides indicate you can't make such a profit, with a large enough stockpile of gold you can on average make more gold per hour from crafting than you can with gold farming.
    • Suppose no new gems were listed and 100 people buy gems. Price per unit (PPU) is raised to 45k. Last 10 trades remain the same.
    • 5 more people buy it and the PPU is still 40k... but the avg last 10 trades is now up to 42.5k for future gems. People may sell for a higher price as a result.
    • 52 others buy and the price is raised to 50k (avg at 48k). At this point the profit margin is 30% for each gem made and now the market floods with gems from buyers hoping to get a profit.
    • The average sell price gradually drops as people are pricing their gems lower than the average in order to get theirs sold first. Others may pull out their original offer and price it down to below their average too, especially when selling large amounts. The average price goes down to 35k or so (at this point they are losing money from these sales)
    • Some people buy these gems seeing the costs are lower than usual)
    • The cycle repeats.

  • How price manipulation works: In the above example, if they are selling on average at 75k, and a few people plop them down at 30k, and two are sold, then the average becomes 66k. Unsuspecting sellers who didn't do the research may sell at the new price, bringing the price down faster than usual. In markets where people are accustomed to buying in bulk (like Tome of Secrets). more may be required to bring down prices, and the lower average price needs to be kept down constantly or the commodity price will go back up to normal prices. Conversely, others can be tricked into buying bulk at regular price thinking it was a good buy), which can raise the price up, at which point sellers can profit.

    Price manipulation has been typically seen on Tome of Secrets and Flawless Square gems (by setting a extremely cheap price (such as 100 or less than 50% of the current trade price) to reduce the average trade price - this can be seen when you query the price for buying a gem/TOS and it has a large price variance between the average cost and the estimated cost. They are rarely seen in Perfect and Radiant Square gems and almost never seen in grades higher than that due to the fact that they are much more expensive (they are crafted by players for a substantial cost and do not drop in the game) and are resistant to dropping below the production cost of the gem (cost to buy flawless squares + TOS + crafting fee + 20%) for obvious reasons.

  • Quantity or Quality? When crafting gems, analyze your percent profits, and sell the gem quality that clearly has a higher margin of profit. If the difference is small, it would be better to sell off the highest grade gem you can afford. However, the selling rate for gems drop off dramatically (it takes around 2-3 minutes on average to sell a Flawless Star Gem, 10-15 mins for a Perfect Star Gem, and around 2 hours for a Radiant Star Gem) so you'll need to find a balance between the two.

    People don't typically buy gems higher than Flawless Square in bulk because there is no profit from crafting at that point, so people usually buy one to socket it with their character. As a result, it would generally be better to sell a Flawless Star Gem at 8% profit rather than 9 Radiant Square Gems at 10% profit. After that point (like Perfect Stars), players are a lot less willing to pay the extra 6 million for a marginal increase in stats (+4 of a main stat) and instead go buy some better gear with this (I, in my opinion, would rather get a IK Eternal Reign for 10M than a Radiant Star.) However, with the future introduction of the next tier Marquise Gems (with a base crafting cost of 85 million, minimum, if you bought all the materials to craft one at current market prices after the 1.0.7 preview post), gem stats might increase dramatically.

    If you don't have a large stockpile of cash, resort to the JIT (just in time) strategy by buying gems as you finish up your order, unless you know the price of a crafting material will increase greatly. Else you might end up with a huge stockpile of gems you can't sell (I had 200 Perfect Square Topaz gems ready to sell, and then the market dropped to the point where I was going to lose money if I sold it at that price...), and had to do a bit of gold farming to get more gold for other ventures and to craft them into higher grade gems.

Good luck in the markets, and remember it might take a bit of time to build up a huge fortune, but you'll get there.

Footnotes:

  • Price Per Unit (PPU) refers to the upper bound that you will pay for each unit when you click the search button.
  • Buying commodities in bulk warning: When you buy a commodity, you will buy out the lowest priced commodity currently on the market. If the estimated cost is higher than what you will buy it for, then the transaction will fail. Note that the support site / game does not cover 'in between cases', so if you buy enough of a particular item so that at least a few items bought go over the estimated cost, you will buyout as many commodities that were below the estimated cost, the remaining gold will be refunded to you, and you will be disconnected in most cases.

Monday, December 3, 2012

Excel VBA Macros: Borders and Formatting

Borders seem very complicated when you record a macro for borders, do any kind of text of text formatting, etc., and look at it in Visual Basic. There are a few ways to simplify this.

Border Formatting Example

You record a macro, make a selection, and set borders. You immediately get something like this:
    Selection.Borders(xlDiagonalDown).LineStyle = xlNone
    Selection.Borders(xlDiagonalUp).LineStyle = xlNone
    With Selection.Borders(xlEdgeLeft)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlMedium
    End With
    With Selection.Borders(xlEdgeTop)
        .LineStyle = xlContinuous
        .ColorIndex = 0
        .TintAndShade = 0
        .Weight = xlMedium
    End With
    ...

Need a TL;DR? Essentially it is

  1. Removing any diagonal borders through the cell, and
  2. replacing each border with a medium size black line.

The details are:

  • .Borders(Direction) indicate which border you want changed.
    • xlDiagonalDown affects the line from the top-left to bottom-right of each cell selected.
    • xlDiagonalUp affects the line from the bottom-left to top-right of each cell selected.
    • xlEdgeLeft, xlEdgeRight, xlEdgeUp, and xlEdgeDown affects the left, right, top, and bottom borders of your selection. That means it treats your selection as a box, and the sides are what the code affects, see the above image for details.
    • xlInsideVertical and xlInsideHorizontal affects all the other vertical and horizontal lines (respectively) in your selection that the above didn't cover.
    • If you don't specify a direction, then all
  • The parameters you can set for borders are:
    • .LineStyle controls the line style. See the top for details.
    • .Weight controls how thick the line will be.
    • .Color controls the color of the line. You can use RGB format.
    • .TintAndShade controls tint and shade, but they can be ignored if you're using RGB values.

You don't have to stick to just the current selection, it can be modified so that you can change the borders for any cell without having to select it (and there are some good uses for this), so you could substitute Selection with stuff like:

    With Worksheets("Sheet1").Cells(6, 1)              ' This way you can use variables when accessing. 
       .Borders(xlEdgeBottom).LineStyle = xlContinous
    End With

- OR -

    With [D2].Borders(xlEdgeTop)
       .LineStyle = xlContinous
       .Color = RGB (255,0,0)
    End With

Text Formatting

The same can be done with Selection.Font (the parameters above work on this as well). I am listing only important values.

  • .Color controls the color of the test (use RGB)
  • .PatternColor controls the color of the background (use RGB)
  • .HorizontalAlignment controls text horizontal alignment (equal to xlLeft, xlRight, or xlCenter)
  • .HorizontalAlignment controls text horizontal alignment (equal to xlTop, xlCenter, or xlBottom)
  • .WrapText = (true to wrap)
  • .ShrinkToFit = (true to apply)
  • .Orientation = (what angle to rotate it by)
  • .AddIndent = (true to indent)
  • .IndentLevel to determine how far to indent (whole numbers only)
  • .MergeCells to merge or remove the merge on the affected cell(s). To not do anything with the cells structure, don't include it.
  • .Name = (font name, enclosed in quotes)
  • .Size = (font size)
  • .Strikethrough = (True to make it strikethrough)
  • .Superscript = (True to make it superscript)
  • .Subscript = (True to make it subscript)
  • .OutlineFont = (True to put an outline on text, but it apparently does nothing)
  • .Shadow = (True to put a shadow on text, but it apparently does nothing)

Wednesday, October 17, 2012

Creating separate Post Excerpts and Full Post Content

Sometimes there are occasions where you want the a blog excerpt to be different than just the beginning of a post when users browse through archives. This post explains how to do just that.

I discovered how to do this while trying to find ways to hide certain content on a blog post, and also because I didn't like the way some articles read 'post after the break' like you were reading it from a RSS reader and the same text showing up on the post itself. Having only excerpts prevents people casually scrolling through the blog and reading all the content in one go, and instead clicking 'read more' if interested - this allows me to see what types of posts people are reading, and what to post more of.

1. Insert the following code at the beginning of the post:

 <span id="customexcerpt">Enter Post Summary Here</span>

<!-- more -->

<style type="text/css">
#erhide {display:none;}
</style>

2. Change the 'Enter Post Summary Here' with what you want your excerpt to say.

3. Insert the rest of your post data after that.

You are set - the post summary will be different than the rest of your post.

Although this will make the data hidden from both the actual post and a RSS reader (if you set the RSS feed display to Full, at least on Blogger), if one were to copy the entire post it would also display the hidden excerpt data. Therefore it's recommended that it's used for images or for coherent posts.

Friday, October 12, 2012

Covered with Knowledge (and tags)

Sometimes knowledge is superior in most areas, and it's what everybody seeks. That's what Fall 2012 in Concepts is about. Not about these topics, though.

I found two additional people from UOP CKI that keeps my own spirit up, and I'm happy to welcome Darshini and Nhi Phan to this group. Both people approved of this image. This is also one of the few images which I am tagged in.

Tags: These days, I value each image tag someone posts of me greatly (that is not from a game friend), because they don't happen very often. Without the large number of image appearances (less than 250, which is the lowest of any photographer or other major CKI member/officer), anyone can either deny I wasn't at an event and/or be unable to remember who I am in the future, especially newer members - therefore I will look around in friend's (and non-friends) albums and tag myself in there (provided they have tagged at least one other person).

Monday, October 1, 2012

Project: ZB Advanced Extended Stats

Previously there was a Top 200 leaderboard made because the person who made the leaderboards discontinued it, before another person picked it up. Now, we have another program designed to help the needs of the users simply because Zuma Blitz didn't provide it yet.

Enter a program called Advanced Extended Stats for Zuma Blitz: A project that was made because people didn't know how well they did or where their points came from.

Description: Allows you to see your performance history in Zuma Bltz. At the time of writing, the game only gave you your score at the end of the game (as well as your friend's scores and level only), this program will give you a lot more than this. Can also give you board records, average board scores, etc.

This program can also get high scores of other people, even though you aren't friends with them - but only if they are also using this program to record their scores.

Implementation: As of November 4, the program is now available for the general public for use. Access it using this link. FB logins are not present at this time, but it might be in the future to display personalized stats.

Purpose: Another attempt to bring back the Top 200 leaderboard. It's a bit more complicated to use though, but at least players are not pulled in automatically - they instead must choose to op-in into this one.

Thursday, September 27, 2012

"Physical" Network Models

Here's a literal definition of a "Physical" Network Model: When you're working on wiring in a networking lab with hundreds of wired connections and have bits and pieces left over. You then use the remains to create stuff. And either sell them or leave them there for others to see.

Tips: When dealing with a bunch of Ethernet wires, best to label each wire and test them before mounting them on a rack - If you don't do this and something goes wrong you're gonna have a bad time.

Design: This would normally fall under the 'Designed' category, but I didn't make it. Credit this to P. Miller and V. Tachkov instead.

Tuesday, September 11, 2012

Technique: Extra Large Gap Shots

EDIT: Patched on Oct 1, this method no longer works for large amounts of points.

Overview: On the new island, frogs used to the concept of double tapping on the old island were struggling to get high scores - they just weren't cutting it in the effort to reach over 10 million. What would obviously be a 140K double gap turned to a gap shot that fell obviously short of what a double tap would normally be. Other attempts to double tap normally resulted in only 50% of their score, worse than getting a gap shot through gaps that already existed. Other options were needed.

Within a few days after reaching the island, even causal players have been able to even top scores that professionals had extreme difficulty reaching. Something was up.

A careful study of gap shot techniques revealed that points were best accumulated not by how steady you can keep your hands when firing through narrow gaps, but based on the size of the gap. Guess they were compensating for something.

The technique was named 'Extra Large Gap Shots' due to using a large gap.

To Pull Off: Get a ball very close to the skull. Clear out as many balls as possible between the last ball and the start (while making sure that last ball doesn't slide back). Make gap shots as usual - any gap shot bonus that passes through that large gap is amplified by several factors, making multi-million scores seem trivial in just a few shots.

On some boards this can be quite difficult to pull off, with the level of difficulty similar to trying to maintain a continuous double gap, only the latter scores significantly less and really needs to be adjusted.

Score: If you have a large gap about the size of the entire curve (or a 50-ball gap), each gap shot that passed through it will be worth around 750K at 9x. The value of those gaps will decrease steadily the smaller the gap is (10% less every three balls) until the gap is only half the size of the curve, which the bonus will be a measly 500 points until the gap's five balls wide, which then will steadily increase up to 65K.

Tips: Candy Lei can be very helpful in reducing the amount of randomness in balls, making it easier to clear them.

Monday, August 13, 2012

Excel VBA Macro Basics (Part 1)

The following is a brief guide to VBA Macros in Excel, how to use them, and in my opinion, what functions you should know about. This is one of my first reference pages, so this page might be updated frequently.

Requirements: At least Excel 2007. Other versions of excel might have ways of accessing / running macros differently.

Note: I'm assuming that don't know anything about macros in Excel prior to reading this.

Setup:

Activate Developer Tab: In Excel 2007 Options under "Popular" submenu. In Excel 2010 you'll have to go to the Customize Ribbon and on the right you'll have the option to check the "developer" menu to enable it.

Access Visual Basic: Using the developer tab, click the button that says "Visual Basic".

Create a Module: Modules are used to run functions / subcommands and store code for any macros or button functions. If you record a macro, a module will automatically be created.

Though it is entirely possible to place functions inside a sheet and run it as a macro, it's typically better to store them in separate modules in the document, because if you happen to delete the sheet containing macro code, you'll lose it. Code related to buttons and other controls on the current sheet have to be placed inside their own sheet code.

Selecting Cells and Writing Data

There are several ways to write data to a cell. Replace "Text Here" with the text that you want in the cell enclosed in quotes. Assuming the cell you wish to write is B2 on Sheet1:

  • Worksheets("Sheet1").Cells(2,2) = "Text here"
  • Cells(2,2) = "Text here" (When Sheet1 is active)
  • ActiveSheet.Cells(2,2) = "Text here" (When Sheet1 is active)
  • Range("B2") = "test" (When Sheet1 is active)
  • Range("B2").Select
    Selection = "test" (When Sheet1 is active)
  • ActiveCell = "test" (When Sheet1 is active on cell B2)

Referencing Sheets, Cells and Variables

  • ActiveSheet refers to the currently active sheet when that line of code is run. Similarly, ActiveCell refers to the current cell that was selected.
  • Worksheets("Sheet1") calls a specific sheet when selecting cells or other commands. Note if a sheet with that name doesn't exist, then an error will be thrown.
  • Cells (2,2) refers to the coordinates of the cell in column, row coordinates, with 1 being row A. You can use variables to determine the cell being referenced. If you want the address of the cell referenced in Letter/number notation, use Cells().Address
  • Range() can be used to select a single range (such as "B2:C4"), or a series of ranges separated by commas (such as "B2, C2, D5").
    • Alternatively, just enclose the range in brackets. Ex: [B2] = "" will fill in cell B2 appropriately.
  • Variables can be defined / saved using a variety of variable types: Integer, Float, Range, Date, etc.

Aesthetic Stuff

  • Column widths can be set with Columns("G").ColumnWidth = 10, where G is the column you wish to have selected.
  • For a range, use .Interior.Color = RGB(Red:=a, Green:=b, Blue:=C) to change cell color, where a, b, and c are values between 0 and 255 (following the RGB color scheme). To change the font color use Font.Color = ... instead. Examples: Range("F12").Interior.Color = RGB(Red:=255, Green:=0, Blue:=0) shades the background blue.

Thursday, August 9, 2012

Fall 2012 in Concepts

Things change - people come and go, and in the long run, the only thing that matters is the big picture - there's a whole world to see and explore. As well as a handful of close friends to share experiences and stories with.

Fall 2012 in Concepts takes a different approach to images - it focuses less on just displaying pictures and places emphasis on various concepts - such as the programming side, covering a variety of topics set for this semester. Although originally started in 2012, this page contains info that goes well beyond that.