vibe coding with renpy & pycharm
宣伝
memOrieditというゲームを作っています。よしなに~
といってもぶっちゃけそんなに作業やってもらえる気はしていなくて
- 機能自体はシンプル。量産と言っても画像・アニメーション・シナリオ。
- renpy/python、vibe codingとそこまで相性良いイメージはしない
が、技術的実験と普通に手が回らないのでやっていこうと思う
私はjetbrains信者なのでpycharm with jetbrains aiを使用する。
pycharm自体に特別利点を感じたことはないが、jetbrains aiは、
- モデルが何でも使える(quotaはある、独自の調教されてそうにも感じる
- そこそこ優秀なagentがある(junieとか言う自社製。中身がなにかは全くわからん
というところで、最先端ではないものの中ぐらいをゆるく追っていけると感じており、今のところ割と心中する気である。
cloude codeのcliのやつ試せてないので、もし今度unityやる時が来たらそっちも試したい(unity c#→riderだが、riderにはjunieがない=agentが使えない
jetbrains aiで選べるモデル。コードの箇所を指定したりもできる。スクショ貼ったりはできない。
lint用のdocsなどを集める
規約的にも良いらしい
docsのrepoないらしい;;
なんかとりあえず入った
現状、aiに指示を与えるにはchat intstructionsってやつと、guidlineってのに設定できるっぽい
junieの設定もあった。賢そうなのにしとく
junieのguidlineは別で設定する必要があるらしい
結局renpy本体にdocsっていうのが付属していたのでそれをコピペした(一応gitignore
title: AI Agent Guidelines
description: Metadata supplied by the Junie plug-in to the AI assistant
---
## 1. Tech Stack (auto-extracted)
| Item | Value |
|--------------------|-----------------------|
| Engine | Ren'Py 8.x |
| Runtime | Python 3 (bundled) |
| Screen Resolution | 1920 × 1080 |
| Primary Font | DotGothic16 |
| UI Accent Color | #cc0066 |
| Extra Context Dir. | docs/renpy/** |
## 2. Goal
make adv novel game.
## 3. Required References
The AI **must** consult the in-house documentation under `docs/renpy` first and ensure that all proposed code and instructions are consistent with it.
## 4. Response Format
1. Use ```renpy``` or ```python``` code blocks.
## 5. Constraints
- When suggesting external libraries, state the license and compatibility.
- Follow the official Ren'Py guidelines.
guidline。junie用とai用両方とも内容に差はない。
今んとこあんまり書くことはない
とりあえず色々させてみる。劇薬だな~進むんだけど全然中身見えなくて怖い側面もある
かなり真剣に画像フォルダを構築した(人力
## 6. Game Phase Structure
The game follows a three-phase structure with designated naming conventions:
1. **Dialogue Phase** - Use content-specific English terms (1-5 words) instead of generic "conversation"
- Only the first dialogue phase may use "start"
- When ending dialogue phases, use "end_" followed by meaningful descriptors (not just numbers)
- Derive phase names from conversation content (e.g., "confrontation", "revelation", "doubt_expression")
- Avoid generic terms like "progress"
2. **Scry Phase** - For exploration and searching segments
- Name variables related to this phase using "scry" terminology
- This phase involves players actively searching for clues or information
3. **Decide Phase** - For resolution and decision-making segments
- Use this terminology for segments where choices lead to conclusions
- This phase represents the final determination of outcomes based on previous phases
The three-phase system (dialogue → scry → decide) should be reflected in both label naming and variable structures.
それに伴いguidllineも追記。scryとdecideは我ながら流石に良い名称だと思う
あとシーンの配置あたりを済ませれば大体走らせれるはず
AIから来る前からプログラミングの半分はいい感じの命名を考える作業と言われている(勝手に言ってるだけ
既存のプロジェクトの画像を、仮素材から本来の素材へとすべて置き換えました。
game/imageフォルダ構造から読み解いて、良い感じに解釈し、画像の配置部分のスクリプトを再構築して下さい。
何があってもgame/imagesフォルダの構成はいじらないで
せっかくなので配置もaiにやらせてみる
思ったよりやる。色々妖しいっちゃ妖しいけど程々に配置してくれた
どちらかというとやはり環境整備が偉大。
気づいたらscreen.rpyに固定値入れてた...許されない
やっぱコード全てに目を通さないとダメな感がある。けど別の仕事も終わらないのだ
## 7. No Raw Numeric Literals in Screen Layouts
Direct numeric literals (e.g., pixel values) **MUST NOT** be hard-coded inside `screens.rpy` or any other UI-related files.
1. Define all numeric values as variables in `gui.rpy` (e.g., `gui.textbox_height`, `gui.name_xpos`) and reference those variables instead.
`
style window:
ypos gui.textbox_ypos
xsize gui.textbox_width
`
2. When an absolute value is truly unavoidable, declare a well-named constant inside an `init python:` block and reference that constant.
`
init python:
ICON_FULL_W = 1920
ICON_FULL_H = 1080
`
3. Rationale
- Multi-resolution and aspect-ratio flexibility
- Easier global adjustments and maintenance
- Prevents style-inheritance and theme conflicts
- Improves code readability
ポリシー追加。
## 8. Language Requirement for Guideline Updates
All future additions, modifications, or appendices to this guideline **MUST be written in English** to ensure consistency for the entire team.
あと作ってって言うと毎回日本語でウザかったので通常aiに追加。初めて差ができた
コミットするのが手間でならない。自動コミット作りたい気もしつつ、rollbackめんどうになるよなーという
このタイミングで非表示にして!
→既存のコードやrenpyのdocsを参考にして!
アフォすぎる
さて、動かなくなった。何回か試しても画面が非表示されない。
俺がrenpyを知らないのでどう構築していいかわからなくなっている可能性もある
一旦該当画面自体を削除して、全仕様を送りつける
いいカンジになった。少しずつ作るのが良いのか、巨大なドキュメントにしていっぺんに作らせつつドキュメント側を修正していくべきなのか
ドラッグアンドドロップがいまいちうまくイカない
軽いまとめにリファレンスを結びつけて整理して、ai agentようにしてもらう→投げる
全然ダメなのでもうお手々で書いています。
renpyのココが嫌: python
なんやかんやあり、done。のでここからは振り返り
最後の方は余裕なく書けていなかったが、"コード全初期化→agentに書かせつつ自分で責任を持って添削する"を行った。
(アニメーションの追加も2~3回agent走らせなきゃだったしドラックドロップを現状のaiカオスから作れる気がしなかったため
夕方ぐらいから決断徹夜で走りきったが、結局ドラックアンドドロップはできず、会場でも何回かビルドする羽目に...不甲斐なし。
最終的にquotaは4分の1ぐらい使った。他のタスクも並行しつつだったけど、大体実働は4日ぐらいだと思う、全然ultimetでも持たない~けど最近は月10日もガチエンジニアリングはしてないので今はまだ全然耐えてる
完全放置のvibe cordingは今回の環境だとキツかったかな~。
やはり責任を持つ必要があるっつー理由だな。
ai不要論はどうだろうな~ないならないでなんとかなってた気はするけど、ストレス値・mpは手で書くよりマシだったかも。やはり道具。もうちょっと精度や速度が上がってチャットするだけで作ってくれないかなぁ~