为了证明小弟最近 不是什么都没干,为了某位网友的呼唤,也为了表白在下确实正艰苦卓绝的构建着 文档及代码, LGame文档及0.2.8版,已决定于9月15日正式发布, 以下是一些相关信息。 LGame-0.2.8 版包结构如下 自 0.2.8 版起, LGame 中新增了 AVGScreen 类
为了证明小弟最近不是什么都没干,为了某位网友的呼唤,也为了表白在下确实正艰苦卓绝的构建着 文档及代码, LGame文档及0.2.8版,已决定于9月15日正式发布, 以下是一些相关信息。
————————————————————————————————
LGame-0.2.8 版包结构如下
自 0.2.8 版起, LGame 中新增了 AVGScreen 类,以方便用户快速制作 AVG 类型游戏(当然, H Game 也可以的说……),或以此实现比较绚丽的动漫过场以及动漫交互效果 ( 没错,以后作贪食蛇都可以加 AVG 过场了 ) 。
以下本次更新后将会出现的,LGmae-0.2.8 AVGScreen中默认的脚本命令。
PS : LGame 中脚本命令不区分大小写。
脚本命令 |
命令说明 |
Include |
作用: 在当前脚本中载入另外一个脚本的内容,当导入脚本结束时将继续读取当前脚本。 写法: Include res/myscript.txt |
If …… else …… endif |
作用: 分支判断脚本流程。 写法: if a>b XXXX else if a==b XXXX else XXXX endif |
begin …… end |
作用: 此命令用以构造一组脚本,但不立即执行,仅在调用 call 命令时才能触发此命令内部的脚本。 写法: Begin showMessage Mescolor red Mes 孔曰成仁,孟曰取义。 XXXXX End |
Call |
作用: 此命令用以调用指定的命令段,需要和 begin …… end 命令配合使用。 写法: Call showMessage 此时 showMessage 命令段将被执行。 |
In …… out |
作用: 这是一组从输入到输出的命令,在两组命令之间的字符串数据将被以选择框形式展现给用户。 写法: In A. 景德镇瓷器 B. 景德镇戏剧 C. 景德镇餐具 Out |
select |
作用: 为选择框加上标题,如果 select 命令为空,则 in …… out 命令输出的选择框将只有选项,而没有标题。 写法: Select 景德镇盛产什么? In A. 景德镇瓷器 B. 景德镇戏剧 C. 景德镇餐具 Out |
selleft |
作用: 设定选择框文字在显示时距离选择框左侧的偏移距离,用以调节文字位置。 写法: seleft 10 |
seltop |
作用: 设定选择框文字在显示时距离选择框顶端的偏移距离,用以调节文字位置。 写法: Seltop 10 |
mes |
作用: 显示一组对话,用以令游戏角色向用户传递信息。 写法: 1 、单纯显示 Mes 吃了吗?没吃?!……没吃回家吃去吧。 2 、强制换行 Mes 吃了吗? /n 没吃?!…… /n 没吃回家吃去吧。 3 、转换指定范围内文字颜色 Mes |
meslen |
作用: 规定 mes 命令在显示对话时每行最多的显示字数,超过将自动换行(不填时以系统判断的默认行数执行)。 写法: Meslen 20 |
mescolor |
作用: 规定 mes 命令在显示对话时文字的默认颜色。 写法: Mescolor yellow |
mestop |
作用: 规定 mes 命令在显示时距离消息框上方的距离,用以调节文字位置。 写法: Mestop 10 |
mesleft |
作用: 规定 mes 命令在显示时距离消息框左边框的距离,用以调节文字位置。 写法: Mesleft 10 |
messtop |
作用: 关闭当前画面上的消息框或选择框。 写法: messtop |
gb |
作用: 显示指定的背景画面。 写法: gb res/background.png |
cg |
作用: 显示指定的角色画面。 写法: 1、 单纯显示 cg res/role.png 2、 显示在指定位置 cg res/role.png 50 50 3、 替换当前 cg cg res/role.png to res/role1.png 4、 删除指定 cg cg del res/role.png (ps: 只填写 cg del 则删除全部 cg) |
sleep |
作用: 令画面延迟指定时间,此段时间内画面将无响应。 写法: Sleep 1000 |
flash |
作用: 令画面以指定颜色闪烁。 写法: Flash 200,125,200 |
cgwait |
作用: 暂停当前画面,当点击时继续运行。 写法: Cgwait |
Fadein |
作用: 以指定颜色进行屏幕淡入。 写法: Fadein black |
Fadeout |
作用: 以指定颜色进行屏幕淡出。 写法: Fadeout black |
shake |
作用 ; 让画面产生模拟震荡。 写法: Shake 30 |
play |
作用: 播放指定音乐。 写法: Paly res/m1.wav |
playloop |
作用: 循环播放指定音乐。 写法: Play res/m1.wav |
playstop |
作用: 停止音乐的播放。 写法: Playstop 0 (0 为音乐索引号,按照添加顺序累加,直接 playstop 将停止所有音乐的播放 ) |
petal |
作用: 画面呈现樱花飞舞效果。 写法: Petal( 停止为 petalstop) |
snow |
作用: 画面呈现银装素裹效果。 写法: Snow( 停止为 snowstop) |
rain |
作用: 画面呈现落雨纷纷效果。 写法: Rain (停止为 rainstop ) |
set |
作用: 预定义脚本变量。脚本变量也可在 AVGScreen 中通过 Command 类设置,也多用于 AVGScreen 与脚本交互,或者定义需要重复使用的数据信息。 写法: set var = “res/background.png” set var1 = 100 |
|
作用: 将脚本中的预定义变量内容于指定位置显示出来。 写法: 1 、 set var = “res/background.png” mes print(var) 2 、 set var =7 If var == 7 XXXX else XXXX endif 3 、 set var=10/2*36-7 |
reset |
作用: 清空脚本中一切缓存,此时所有预订义变量都将不复存在。 写法: Reset |
//,#.’ |
作用: 以上三者为行注释符号,自该符号起一整行数据将不被脚本读取。 写法: //XXXX #XXXX ‘XXXX |
/**/ |
作用: 区域注释符号,自 /* 起,直到 */ 结束的所有数据将不被脚本读取。 写法: /* XXXXXXXXX XXXXX XXX */ |
exit |
作用: 离开 AVGScreen 窗体。当执行此命令时脚本将被强制终止,并执行 onExit 函数,多用于转换 Screen 。 写法: exit |
说到这里,其实我们可以看出 LGame 默认给出的脚本功能非常有限(相对专业 AVG 引擎而言),只包含了最基础的 AVG 功能。
但是,那并不重要,因为 LGame 是一款通用(万能)的游戏开发框架,只要 LGame 将相关修改权限交给游戏开发者,游戏开发者就完全可以通过 LGame 组件对 AVGScreen 扩充出任何您所需要的功能。
下列是一个继承自 AVGScreen 的窗体:
值得说明的是,即便什么都不再实现,继承自
AVGScreen
的窗体也可以起到解释并执行指定脚本的作用。另外
J2SE
版与
Android
版更新内容完全相同,故不再赘述。
事实上,
AVGScreen
的操作使用非常之简便,只要结合
LGame
现有的强大组件与精灵支持,就算要制作出传说级的
AVG
(或
galgame
),也只是轻而易举的事情罢了(当然,大前提是有美工支持,或者套用其它游戏图片……)。
再者,虽然
AVG
类游戏制作非常简单,某些类型的
AVG
游戏甚至非常卖座(比如月姬、圣杯战争、初音岛之类以及很多纯
H
的),但在
Android
上的
AVG
游戏却非常罕见,这给无论是原创或移植游戏都留下了巨大的商机。
另外
0.2.8
中也修正了所有大家反馈回来的
Bug
(这次改版后应该没有特别明显的
Bug
存在了),并针对精灵类作了优化,修正了一些耗时的算法,同时为
LGame
的标准精类(不是仿
j2me
的那个)添加了自由旋转以及色彩过滤功能,并且增加了一些画面特效,具体留待正式发布时再详细说明。
小弟本周六、日两天准备死磕文档,没有发生人力不可抗拒之意外的话(诸如停电、受伤、其它项目赶工、硬盘崩溃、乃至海啸、地震、战争、外星人入侵、小弟蒙主召唤等等),文档以及
LGame-0.2.8
会在
2010
年
9
月
15
日晚
准时发布,不见不散。

MySQL index cardinality has a significant impact on query performance: 1. High cardinality index can more effectively narrow the data range and improve query efficiency; 2. Low cardinality index may lead to full table scanning and reduce query performance; 3. In joint index, high cardinality sequences should be placed in front to optimize query.

The MySQL learning path includes basic knowledge, core concepts, usage examples, and optimization techniques. 1) Understand basic concepts such as tables, rows, columns, and SQL queries. 2) Learn the definition, working principles and advantages of MySQL. 3) Master basic CRUD operations and advanced usage, such as indexes and stored procedures. 4) Familiar with common error debugging and performance optimization suggestions, such as rational use of indexes and optimization queries. Through these steps, you will have a full grasp of the use and optimization of MySQL.

MySQL's real-world applications include basic database design and complex query optimization. 1) Basic usage: used to store and manage user data, such as inserting, querying, updating and deleting user information. 2) Advanced usage: Handle complex business logic, such as order and inventory management of e-commerce platforms. 3) Performance optimization: Improve performance by rationally using indexes, partition tables and query caches.

SQL commands in MySQL can be divided into categories such as DDL, DML, DQL, DCL, etc., and are used to create, modify, delete databases and tables, insert, update, delete data, and perform complex query operations. 1. Basic usage includes CREATETABLE creation table, INSERTINTO insert data, and SELECT query data. 2. Advanced usage involves JOIN for table joins, subqueries and GROUPBY for data aggregation. 3. Common errors such as syntax errors, data type mismatch and permission problems can be debugged through syntax checking, data type conversion and permission management. 4. Performance optimization suggestions include using indexes, avoiding full table scanning, optimizing JOIN operations and using transactions to ensure data consistency.

InnoDB achieves atomicity through undolog, consistency and isolation through locking mechanism and MVCC, and persistence through redolog. 1) Atomicity: Use undolog to record the original data to ensure that the transaction can be rolled back. 2) Consistency: Ensure the data consistency through row-level locking and MVCC. 3) Isolation: Supports multiple isolation levels, and REPEATABLEREAD is used by default. 4) Persistence: Use redolog to record modifications to ensure that data is saved for a long time.

MySQL's position in databases and programming is very important. It is an open source relational database management system that is widely used in various application scenarios. 1) MySQL provides efficient data storage, organization and retrieval functions, supporting Web, mobile and enterprise-level systems. 2) It uses a client-server architecture, supports multiple storage engines and index optimization. 3) Basic usages include creating tables and inserting data, and advanced usages involve multi-table JOINs and complex queries. 4) Frequently asked questions such as SQL syntax errors and performance issues can be debugged through the EXPLAIN command and slow query log. 5) Performance optimization methods include rational use of indexes, optimized query and use of caches. Best practices include using transactions and PreparedStatemen

MySQL is suitable for small and large enterprises. 1) Small businesses can use MySQL for basic data management, such as storing customer information. 2) Large enterprises can use MySQL to process massive data and complex business logic to optimize query performance and transaction processing.

InnoDB effectively prevents phantom reading through Next-KeyLocking mechanism. 1) Next-KeyLocking combines row lock and gap lock to lock records and their gaps to prevent new records from being inserted. 2) In practical applications, by optimizing query and adjusting isolation levels, lock competition can be reduced and concurrency performance can be improved.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Atom editor mac version download
The most popular open source editor

SublimeText3 Linux new version
SublimeText3 Linux latest version

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),