LLM Coding Costs and Usage Limits: A Game Recreation Case Study
A classic arcade game recreation project provides a practical look at LLM token consumption, coding-plan limits, and API costs. This article compares two models’ cache usage, pricing, and generation speeds, explains how subscription allowances can be estimated, and outlines the trade-offs developers should consider when choosing models for complex coding tasks.
Recreating a complete game with a large language model (LLM) is a useful test of its code-generation capabilities. It also exposes a practical constraint: capable models can consume substantial API budgets and subscription allowances during extended development sessions.
This case study examines token usage from a classic arcade game recreation project. It estimates one model’s coding-plan limits and compares its costs and generation speed with those of another model used for the same task.
The models are referred to as Model A and Model B. All prices are expressed in Chinese yuan (CNY), as recorded in the source data. Pricing and usage limits should be understood as case-specific figures rather than universally available offers.
1. Estimating LLM Coding-Plan Limits
Complex coding tasks require more than a single prompt. Recreating an arcade game can involve repeated interactions covering game logic, rendering, collision detection, and debugging. Across these iterations, accumulated context can generate substantial input-token usage.
For one complete game recreation project started from scratch, Model A recorded:
- Input tokens: 22.9 million
- Output tokens: 213,000
- Cache hit rate: 95%
Model A charges different rates for input and output tokens, while cached input receives discounted pricing. Its high cache hit rate therefore reduced the cost of processing the accumulated context.
After the project was completed, the usage dashboard showed that it had consumed 95% of the coding plan’s weekly allowance. The estimated pay-as-you-go value of that usage was CNY 87.71.
Estimating the Weekly Allowance
If CNY 87.71 represents 95% of the weekly allowance, its approximate pay-as-you-go equivalent is:
Weekly allowance ≈ CNY 87.71 ÷ 0.95 ≈ CNY 92.3
This estimates the allowance’s value under API pricing; it is not the subscription’s weekly purchase price.
Estimating the Monthly Allowance
Using a simplified four-week month:
Monthly allowance ≈ CNY 92.3 × 4 ≈ CNY 370
This is a rough extrapolation from the weekly limit, not a separately verified monthly entitlement.
Estimating a Short-Window Limit
Some LLM coding services also impose shorter usage windows, such as five-hour limits, to control concentrated consumption.
If a five-hour allowance were set at 20% of the weekly allowance, its estimated value would be:
Five-hour allowance ≈ CNY 92.3 × 20% ≈ CNY 18.5
The 20% ratio is an assumption used for this estimate, not a confirmed limit for Model A.
On a pay-as-you-go basis, the project’s CNY 87.71 cost represents a meaningful expense for an individual developer. Under a subscription, however, the immediate concern may be allowance exhaustion rather than a separate charge for each project.
2. Comparing Costs and Generation Speed
Model B was used to recreate the same arcade game. Its recorded usage was:
- Input tokens: 70.5 million
- Output tokens: 423,000
- Cache hit rate: 99%
Model B processed substantially more input than Model A: 70.5 million versus 22.9 million tokens. Differences in context management or the frequency of retries could help explain this gap, although the usage totals alone do not establish the cause.
Despite its higher token consumption, Model B had a much lower estimated cost.
Historical and Peak/Off-Peak Pricing
Before a price increase, the Model B task cost less than CNY 3. This illustrates how low token prices and extensive cache reuse can keep costs low even when total input volume is large.
Under the peak/off-peak pricing described in the case study, the same recorded workload would cost approximately:
| Billing scenario | Estimated project cost |
|---|---|
| Model A, pay-as-you-go equivalent | CNY 87.71 |
| Model B, historical pricing | Less than CNY 3 |
| Model B, off-peak pricing | CNY 6.45 |
| Model B, peak pricing | CNY 12.91 |
Even at peak rates, Model B’s estimated cost remained substantially below Model A’s pay-as-you-go equivalent.
These figures also show why token totals alone are a poor proxy for cost. Cached-input pricing, uncached-input pricing, output pricing, and time-dependent rates all affect the final bill.
Subscription-Based Cost Allocation
Model A’s economics look different under a CNY 99 monthly coding subscription.
The original allocation estimate placed the project’s share of the monthly subscription fee at roughly CNY 21–22, based on the weekly allowance consumed. This should be treated as an approximate allocation rather than a separately billed project charge; the result depends on how weekly allowances are mapped to the billing month.
That estimated subscription cost is much lower than Model A’s CNY 87.71 pay-as-you-go equivalent, but still higher than Model B’s estimated peak or off-peak cost.
The distinction matters: an allowance’s API-equivalent value and its allocated subscription cost are different measures.
Generation Throughput
Cost was not the only difference. The recorded generation throughput was:
- Model A: 48 tokens per second
- Model B: 145 tokens per second
Model B generated tokens at roughly three times Model A’s rate in this comparison. When a coding task requires hundreds of lines of generated code, higher throughput can reduce waiting and help maintain development momentum.
However, token-generation speed is not the same as end-to-end project completion speed. Model B also generated more output tokens, and the available data does not establish total development time or the number of debugging iterations for either model.
3. Optimizing Costs and Selecting Models
The comparison highlights three practical considerations: cache utilization, billing structure, and the balance between capability and throughput.
Prioritize Cache Hit Rate
Cache reuse has a major effect on input costs when a provider discounts cached tokens.
For Model A, a 95% cache hit rate reduced the cost of processing 22.9 million input tokens. Model B’s 99% cache hit rate helped make its much larger 70.5-million-token input volume inexpensive.
When constructing prompts, developers should keep reusable system instructions and stable context prefixes consistent where possible. This can improve the opportunity for reuse under the provider’s caching mechanism.
The important metric is not simply how many input tokens a project consumes, but how many are billed at cached versus uncached rates.
Compare Subscriptions with Pay-as-You-Go Billing
For frequent users, a coding subscription can be more economical than paying standard API rates for every interaction. Model A’s CNY 99 plan illustrates the potential difference between subscription pricing and API-equivalent usage value.
Subscriptions nevertheless introduce operational constraints. Weekly limits and short-window caps can interrupt a large task even when the monthly fee appears attractive.
For workloads with low concurrency but very heavy individual sessions, a lower-cost pay-as-you-go model—particularly one with off-peak pricing—may be a better fit.
The relevant question is therefore not only “Which option costs less?” but also “Which billing structure supports this workload without interruption?”
Balance Capability, Token Usage, and Speed
A more capable model may handle difficult reasoning or generate useful code with fewer interactions. Model A’s lower token consumption is consistent with that possibility, but this case does not independently establish a quality or reasoning advantage.
A lower-cost model may require more interaction or process more context while still delivering a lower total bill. Model B combined higher token usage with lower estimated costs and higher generation throughput.
Model selection should therefore reflect:
- Project complexity: How difficult are the architecture and core logic?
- Budget: What is the acceptable cost per project or development cycle?
- Response-speed requirements: How much does generation latency affect iteration?
- Usage constraints: Can the workload fit within weekly and short-window limits?
A mixed-model workflow may also be appropriate. Lightweight, fast models can handle routine boilerplate, while a more capable model can support architecture or complex game logic. Other models can then assist with implementation details.
The objective is not to minimize token consumption in isolation, but to balance capability, responsiveness, and total cost.
4. Conclusion
This game recreation case study shows how widely LLM coding costs can vary, even for the same broad task.
Model A used fewer tokens but had a higher pay-as-you-go equivalent cost. Its subscription reduced the estimated allocated expense, while introducing weekly and potentially shorter-window constraints. Model B consumed more tokens but benefited from a higher cache hit rate, lower pricing, and faster token generation.
For developers, effective cost control requires understanding both billing mechanics and workload behavior. That means distinguishing subscription fees from API-equivalent allowances, optimizing reusable context for caching, and evaluating generation speed alongside token usage.
The best choice is the model—or combination of models—that meets the project’s technical needs without exceeding its budget or disrupting development through usage limits.
