This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
ArchAngel075's profile picture

PlatformMe - creating platform games with ease. [re-make in progress][expect no update for long time!]]

Started by ArchAngel075, 23 May 2013 - 10:39 AM
ArchAngel075 #1
Posted 23 May 2013 - 12:39 PM
[REMAKE IN PROGRESS]
-A remake of this is currently being done, I ask that you don't use the previous releases as it does not represent the reworked programs' features in anyway.

Here is older OP for beta 1 to beta 4 :
SpoilerPlatformMe Beta Version 4



A set of utilities for any user to create easily and smoothly almost any game he/she desires!

I intend to strip the need for programming knowhow.. Eventually once enough frame work is written I can implement the PlatformMe Builder.
The builder is a sort of "worldEdit", where using an assortment of GUI's the creator can make a game easily!
*Currently all Tile Events and Key events require programming knowledge.*

There is currently a bug in version Beta_3 where the maps wont render tiles correctly :
Any tiles that skip other tiles (ie at pos 1_2 ; 1_3; 1_6) will instead render after the last tile in that row.
A fix has be made in the coming version Beta_4. The fix also re-enables colorable tiles with added unique coloring per tile.)

I made a remake of bret122798s' game moneybags! (with permission ofcourse!) using PlatformMe!
Details in the spoiler!
SpoilerSo I got permission from bret122798 to replicate his game using PlatformMe :

And thus in just one hour of entering AI and such :
It is the closest replica i can get in one hour…

pastebin get 42MUWqH4

Just save it as any file and run that file.
It will automatically create the pme and moneybags map.
Once unpacked run pme, and choose map moneybags!

Makes use of oeed's packager, expect massive use of his packager in future updates. specially to compacting map files and save games!

*Do note that the package must be run in ROOT "/" else pme will not work properly!

Todo List and planned features :
SpoilerVersion Beta_4 :
-Create Builder program, allows creators to easily edit Tiles and maps with ease and without text editing themselves. Created
Create Tile Builder - Create and edit Tiles for placement in a map. implemented
Create Map Builder - Create and edit Maps easily with a simple gui. implemented
-Fix Tile render bug |fixed
-Add color Support to tile render. Added
-Improve Tick system -might be impossible- Managed to improve it, now it handles much smoothly and is 90% responsive.
-Add "Gravity" variable to entities to allow the ability to disable vectors on them. Added
-Add map focus shifting, allows for maps larger than screen. Added and properly working with vectors. the Builder also supports it.
-Add sloped tiles variable for slopes and steps. Added
—————————————————————————————————————————————————–
Version Beta_5 :
this will not be done, due to the remake in progress, instead see the remake as the next update.
——————————————————————————————————————————————————

Updates and Downloads :
SpoilerNEWEST VERSION :

Version Beta 4
[attachment=1203:PlatformMe BetaV4.zip]
SpoilerWhats been Added/Changed! :
1. |Created Builder program, allows creators to easily edit Tiles and maps with ease and without text editing themselves.
2 |Created Tile Builder - Create and edit Tiles for placement in a map.
3 |Created Map Builder - Create and edit Maps easily with a simple gui.
4. |Fix Tile render bug
5. |Add color Support to tile render.
6. |Improved Tick system*. *See bug #1.
7. |Added "Gravity" variable to entities to allow the ability to disable vectors on them.
8. |Added map focus shifting, allows for maps larger than screen.
9. |Added sloped tiles variable for slopes and steps.

BUGS :
1. |The rendering of the map flickers alot, this is due to how the tiles are rendered, can not be fixed. Though can be lessened by decreasing the ticks.

Version Beta 3
[attachment=1179:PlatformMe BetaV3.zip]
SpoilerImproved comments and help lines in Pme file drastically,

1. Maps are now more harder to "build" by hand due to the new rawMap feature (see below)

2. Maps now use a rawMap system, where within a rawMap file goes the Tile data in the format { NAME | POSX_POSY | GRAPHIC }
2.1 There can be NO white-spaces within the tiles "{}"
2.2 The NAME is the name of the tile and is where the tiles default variables come from.
2.3 The POSX_POSY use my coordinate system, where POSX is the tiles X value and POSY is the tiles Y value.
2.4 The GRAPHIC is the tiles character used, this means that tiles nolonger share a graphic (ie all "grass" tiles do not use a single graphic).
2.5 AGAIN no white-spaces!

3. The map system now places all data unique to that map in a folder in the folder "Maps". This means that Entities, Tiles, Tilesets etc are unique to that map.
4. Tile and AI scripts now have arguments called with them.
4.1 tArg[1] is always the name of the Entity, or Tile. ie, grass; monster; NPC_Merchant etc.
4.2 tArg[2] is always the index of the Entity(should he have one), or Tile. ie 1,7,2.
4.3 self is now the named index, ie : grass_1, monster_3, NPC_Merchant_5.
4.4 NOTE : these are not automatically inserted into script files, But it is reccomended to insert them or to take note of this feature.
4.4.1 as a piece of advice here is the block of code you should allways add (in future the Builder will auto add these)

Spoiler


local tArgs = {...}local name = tArgs[1]local index = tArgs[2]local self = (name .. "_" .. index)

5. Some functions are disabled as they have no use as of yet or are not yet ported over to the new system for handling map data.
6. Changed how map data is rendered, absolutely 0 blinking when rendering the map, yet entities still stutter. Note that mapdata rendering will be changed again as the current system is a half-complete system.
7. New functions were added, many functions removed or rewritten. Especially those regarding map handling.
8. sadly Ticks had to be slowed down, and key-events are not as responsive as before, i tried fixing this but no success. (got as close to fast rendering yet responsive keys as possible)
9. setData/getData functions' arguments' for Tiles are now different, the entity argument requires the INDEX of the tile concatenated with the files name using a "_". ie : NAME_INDEX.
10. Example map now renamed to "ExampleW"
11. On startup of Pme the program now lists all Directories in root/Maps folder.
12. Tiles no longer support color due to new map render code. (If coloring is to be added, then the non-stuttering map feature will be lost) (i may implement an optional part for stutter vs color)

Beta Version 2
[attachment=1174:PlatformMe BetaV2.zip]
SpoilerAdded many functions into framework for easier access to tile char types or Variable fetching.
Improved movement system to use Vectors, collison. Simply modify the Players VectorX,VectorY values.
Added World folder, contains vecotr handling file. the contents of World are called before anything else.
Created Entity folder, holds the files that store Entities variables, ie the players HP.
Created TileData folder in Tiles folder. Holds all variables to do with tiles.
Example map1 is now completely external.

To run the program just execute Pme. For example map use world2 when asked for map name.

Documentation -Completed-

Documentation :
SpoilerV2
SpoilerBetaStartUp()
[
Runs a simple map launcher.
This is purely for alpha/beta. In later versions a more definit GUI will be used.
]

INIT()
[
This is the ticker. Every millisecond the renders and world events are executed.
]

renderMap()
[
Reads the map file, loads into a buffer for easier reference and renders the map on screen.
]

renderPlayer()
[
Renders the player, later this will handle animations and entities.
]

getFlags()
[
This will create a timer and then listen for events ;
Should an key event fire then its code is executed and the function continues on.
All tiles adjacent the player have their respective events called.
]

getData(entity,Type,toFind)
[
entity- Entity name, ie for player entity "Player" is used.
Type- the Type of object we use, "Entity" refers to Entity folder, "Tile" refers to TileData
toFind- What we wish to find, ie the "HP" of Entity Player.

Gets the value of [toFind] from the entity [entity] of type [Type]
]

setData(entity,Type,toFind,with)
[
entity - Entity name, ie for players entity "Player" is used.
Type - the Type of object we use, "Entity" refers to Entity folder, "Tile" refers to TileData
toFind - What we wish to edit, ie the "HP" of Entity Player.
with - What the new value is.

Sets the value of [toFind] to [with] from the entity [entity] of type [Type]
]

tileAtEntity(entity,tilePos)
[
entity - the entity whom we wish to refer to, ie "Player"
tilePos - unique string of format "x_y"

returns the [CharType] at postion X and Y in relation to entity [entity].
ie : tileAtEntity("Player","0_1") - returns the [CharType] at {the X position+0 and the Y position+1 of the entity [Player]}
]

doEvents()
[
Executes all the files in the "World" and "Graphic" folder.
This will be used to run world events such as entity spawning or "GUI" rendering.
-Currently GUI is not implemented
]

posTileAtEntity(entity,tilePos)
[
entity - Entity to refer to.
tilePos - format "[x]_[y]"

Returns the true coordinates of the tile at the position [tilePosX] and [tilePosY] from the entity [Entity]
2 values returned :[X] integer , [Y] integer
]

replaceTile(tilePos,with)
[
tilePos - the true cordinates of the tile. format "[x]_[y]"
with - string to replace the character with.
]

Other :
NOTE :
When ever setting a variable in a variable folder the format is :
VarName = {VarValue}
the {} MUST exist!

When creating a new Tile, first create a blank text file in the Tiles foler, name the file "Tiles_[#]". replace [#] with the Tile ASCII character it will render as.
In the TileData folder, create the same file.

In the First Tile_ folder you insert code that interacts with the game. It can be blank!
in the TileData Tile_ file you insert Variables that the get/setData() function can interact with.

In the Player folder should sit a Player text file.
NOTE :
Any entity that moves should ALLWAYS have the following variables [case sensitive]
positionX
positionY
vectorX
vectorY

The Player file contains variables that the get/setData() can interact with

To create a key event :
in the Keys folder, create a text file and name it format : Key_[X] , where [X] is its Number. (ie for ENTER its 28)
inside the File goes any code that is run on key press.

Any files in World folder are run before any other event. In here goes any file of Any name style.
Useful for making a variable adjuster on tick.

CREDITS :
Spoiler
I'd like to credit wraithbone for his GUI functions, they really sped up making a GUI for the Builder!
wraithbone's GUI

Credits to brett122798 for allowing me to duplicate his game MoneyBags with my program!

Any suggestions are welcome, any ideas or systems to implement are welcome.

You are free to edit any code but may not distribute the program(s) or edited program(s) without my permission.*
*You may post any maps you have created along withthier required Tile and Key files.


PlatformMe is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
nutcase84 #2
Posted 23 May 2013 - 08:24 PM
  • Pastebin. No one wants zips.
  • Screenies to show your work.
  • More info on how to use it.
Engineer #3
Posted 24 May 2013 - 02:41 AM
  • Pastebin. No one wants zips.
  • Screenies to show your work.
  • More info on how to use it.
  • He put in a folder, so pastebin is not an option.
  • It are utilities, so no GUI.
  • If you are a decent programmer, an you browse through the code. You will know to use it

learn to f-ing read and dont wine because somebody does not have screenies.
theoriginalbit #4
Posted 24 May 2013 - 02:50 AM
If you are a decent programmer, an you browse through the code. You will know to use it
That being said, developer documentation of sorts would really come in handy when there becomes more code, functions, etc.
ArchAngel075 #5
Posted 24 May 2013 - 06:08 AM
EDIT ##Removed typos, added/removed lines##

ill be making a documentation of use once I have created enough framework to satisfy the need for it.
This seems to actully be true for the next version, as the built-in functions in adding warrent it.

the next update {Beta2} will include :
[
Blue - adding
Red - to be added
purple - added
]
a more vector based movement system.
built in functions for refering to tiles around the player.
external variable folder and files for entities
basic world event handling
built in functions for replacing a tile in map.
built in functions for shifting map focus.

Features, systems and functions at the time of this post :
SpoilerBetaStartUp()
[
Runs a simple map launcher.
This is purely for alpha/beta. In later versions a more definit GUI will be used.
]

INIT()
[
This is the ticker. Every millisecond the renders and world events are executed.
]

renderMap()
[
Reads the map file, loads into a buffer for easier reference and renders the map on screen.
]

renderPlayer()
[
Renders the player, later this will handle animations and entities.
]

getFlags()
[
This will create a timer and then listen for events ;
Should an key event fire then its code is executed and the function continues on.
All tiles adjacent the player have thier respective evetnts called.
]

getData(entity,Type,toFind)
[
entity- Entity name, ie for player entity "Player" is used.
Type- the Type of object we use, "Entity" refers to Entity folder, "Tile" refers to TileData
toFind- What we wish to find, ie the "HP" of Entity Player.

Gets the value of [toFind] from the entity [entity] of type [Type]
]

setData(entity,Type,toFind,with)
[
entity - Entity name, ie for players entity "Player" is used.
Type - the Type of object we use, "Entity" refers to Entity folder, "Tile" refers to TileData
toFind - What we wish to edit, ie the "HP" of Entity Player.
with - What the new value is.

Sets the value of [toFind] to [with] from the entity [entity] of type [Type]
]

tileAtEntity(entity,tilePos)
[
entity - the entity whom we wish to refer to, ie "Player"
tilePos - unique string of format "x_y"

returns the [CharType] at postion X and Y in relation to entity [entity].
ie : tileAtEntity("Player","0_1") - returns the [CharType] at {the X position+0 and the Y position+1 of the entity [Player]}
]

doEvents()
[
Executes all the files in the "Entity", "World" and "Graphic" folder.
This will be used to run world events such as entity spawning or "GUI" rendering.
-Currently GUI is not implemented
]
—-
If you wish to see a system implemented. such as being ble to delete or create a tile using a built in function please feel free to post.
If you have suggestions for bettering my code please feel free to share.

Dispite above mention of documentaion i will include some basic comments in the code.
nutcase84 #6
Posted 24 May 2013 - 11:30 AM
  • Pastebin. No one wants zips.
  • Screenies to show your work.
  • More info on how to use it.
  • He put in a folder, so pastebin is not an option.
  • It are utilities, so no GUI.
  • If you are a decent programmer, an you browse through the code. You will know to use it
learn to f-ing read and dont wine because somebody does not have screenies.
  • Pastebin installer.
  • Show a example program made with this.
  • Why would I waste my time looking through code?
ArchAngel075 #7
Posted 24 May 2013 - 01:15 PM
  • Pastebin. No one wants zips.
  • Screenies to show your work.
  • More info on how to use it.
  • He put in a folder, so pastebin is not an option.
  • It are utilities, so no GUI.
  • If you are a decent programmer, an you browse through the code. You will know to use it
learn to f-ing read and dont wine because somebody does not have screenies.
  • Pastebin installer.
  • Show a example program made with this.
  • Why would I waste my time looking through code?

1. Will create a pastebin installer once a self installer is made (one that generates the default files)
2. An example of code is included with the zip, at present it is a hardcoded example.
3. Why would you waste time looking through not very detailed or complete documentation?

The next update is allmost done, although im having issues with the variable playerHP somehow repalcing the yVector of Player.
Engineer #8
Posted 24 May 2013 - 04:36 PM
  • Pastebin. No one wants zips.
  • Screenies to show your work.
  • More info on how to use it.
  • He put in a folder, so pastebin is not an option.
  • It are utilities, so no GUI.
  • If you are a decent programmer, an you browse through the code. You will know to use it
learn to f-ing read and dont wine because somebody does not have screenies.
  • Pastebin installer.
  • Show a example program made with this.
  • Why would I waste my time looking through code?

-snip-
includes a concept map i put together for testing the framework.
(Just run Pme) (for concept test try map1)
-snip-
The second part: Really, are you kidding me? Do I have to make a sample program if I have made an API? get lost
and the third: Get off this forums, because you are wasting your time reading this sentence.

And now finally on topic:

Im excited to see this completed. As of now, I cant really give it a rate if I must give a rate.
LDShadowLord #9
Posted 24 May 2013 - 04:56 PM
If you could somehow work with Nitro to create some form of CC-based game engine that would be awesome.
Anyway, looks good from here. Have yet to try it out to its full extent yet though.
ArchAngel075 #10
Posted 24 May 2013 - 05:18 PM
Updated V2, now calling Beta since the concept has passed.

See OP for update log.

I forgot to add a function that changes map focus, it will be added with V3.

V3 planned :
Shift map focus.
CreateEntity (basic AI)
DeleteEntity
SimpleGui handling.

V3 Hopefull (what i wish to hopefully be able to include)
A really basic form of the MapBuilder, with an attempt at adding non hand-programmed events.
–should allow the ability to for example write a Tile Event :
{Conditions}
+ IF [This Tile Char] IS [Tile Position Under [Player]] THEN
{Start Actions}
+ SETVAR [Player].playerHP TO [Player].playerHP - [<INTEGER>1]
+ CHANGETILE [Tile at Postion [Player]] TO [<STRING>"="]
{End Actions}

In truth the above will look similar to the Tile_^ tiles code in map1 if read in the file itself.
Yet the Builder will read the code and translate it to blocks of simpler code.
By clicking on a Block a context menu is given.
ie anything in [] is a player changed variable. the Capatilised words are repalced with things like IF [] IS [] THEN = if condition = condition then

Hopefully ill be able to put it together.



I am requesting any advice on improving my Vector code, as currently you can only have one key executing at a time.
If there was a ay to flag keys true/false it would be easier to have fluent movement plus i can then add a condition function ifFlagged(key,state), returns true if flagged, flase if not.

Any suggestions are allways welcome! If you feel the need for a simplyfied version of a function to do something please state it. the more built in functions the more variaty!
ArchAngel075 #11
Posted 24 May 2013 - 11:12 PM
Quick post on changes to come :

New folders will be created :
Globals , inside World folder.
Reference , inside Entity
AI ,inside root

renamed renderPlayer() to renderEntity()
renderEntity() now renders all entities at their respective positions.
All contents of World folder are executed, this is mainly for Spawning in new entities.
The contents Globals folder inside World are not executed, instead The Global file inside Globals handles any Global Variables.
The AI folder handles ticked ai code. Every tick the Main program calls the respective AI code for each existing Entity inside the Entity folder. Including player.
All AI files will be executed with arguments entityName. trgs[1]. renamed internally automatically to "self" for ease of use inside AI code.
Ai code can apply vectors and check the position of itself. But at present can not check the location of itself in relation to other entities. A set of unctions will be made to fix this. see Added Functions


Entities are now actual objects with thier own internal variables instead of multiple objects sharing one set of variables.

New functions :

createEntity(entity,entityName)
[
entity - the reference name of the new entity (see V2.1 documentation)
entityName - the new entity's file name - normally set to same as entity, unless the AI code is different but Variables are same.

creates a entity with variables from path "Entity/Reference/[entity]" and AI code used from "AI/[entityName]" in the folder "Entity" with name "[entityName]"
If the variable path "Entity/Reference/[entity]" does not exist or a file with name "[entityName]" in folder "Entity" already exists then the function fails.
]

createEntityN(entity,entityName)
[
entity - the reference name of the new entity (see V2.1 documentation)
entityName - the new entity's file name base - normally set to same as entity, unless the AI code is different but Variables are same.

creates a entity with variables from path "Entity/Reference/[entity]" and AI code used from "AI/[entityName]" in the folder "Entity" with name "[entityName]"
If the variable path "Entity/Reference/[entity]" does not exist or a file with name "[entityName]" in folder "Entity" already exists then the function fails.
YET :
if no other file of path "Entity/[entityName]" exists the created file name is edited to "Entity/[entityName]_[N]" where N is 0
if another numbered file of path "Entity/[entityName]_[N]" exists the created file name is edited to N+1

Numbered enities get their AI from their [entityName] AI file. Yet their variables belong to themselves.
]

posToCords(entity,Type)
[
entity - the Entity or Tile to fetch coordinates off
Type - Type of object the function interacts with. atm Only "Entity" can work.

converts the [positionX] and [positionY] variables from [entity] into the unique Coord format "[x]_[y]"
Useful for easily converting a entities coordsto the commonly used coords system Pme uses.

returns string in format "[positionX]_[positionY]"
]

xyToCords(X,Y)
[
X - integer.
Y - Integer.

Converts the two given Cords [X],[Y] into the unique Coord format "[x]_[y]"
Useful for when using a entity as a reference wont work.

returns string in format "[X]_[Y]"
]

allEntities()
[
Returns table containing all Entities in the Entity folder. Useful for systems that involve affecting all entities.
]

EntitiesInRangeCircle(ref,range)
[
ref - Unique Cords in format "x_y" - tip : Use the toCords() functions
range - integer.

Takes all entities from a table allEntities() returns and calculates true distance in a straight-line between [ref] and the Entities from allEntities() and adds t temporary table.
returns table containing the Entities within range [range] of reference point [ref]
formula used = [Calculate distance of straight line between two points]
-usefull for area events and AI code.
]


This post will be updated as features are completed, should a feature listed before disappear it means its broken or being improved/modified.
If a feature is in this post then it is part of the V3 update.
Main purpose of this post is to keep people up to ate with changes so they can be aware of code breaking updates or features they may want.
ArchAngel075 #12
Posted 25 May 2013 - 10:53 AM
Shifting Map Focus is proving an issue, as it can render the map around the player and update on the go. Though there is a bug where you can force an invisible wall to your left.

Once map Focus shift is fixed up I will move onto simple GUI handling.
Once the framework for the GUI is made after mapFocus The WorldEdit will be started.
ArchAngel075 #13
Posted 27 May 2013 - 01:30 AM
After Multiple attempts to create a camera system, I've decided to instead push it aside and revert to before the CameraSystem edits.

My next focus is to improve Tiles, a system where a single ASCII character can be more than one tile, have its own colour and allow for unique tiles.

Unique Tiles is a system where EACH AND EVERY tile within a map has ITS OWN set of variables inherited on creation from its reference.
Example uses of this system :

"Trees"
-=
If I were to create runtime a "tree" tile of character "-" above a ground tile "=". then 15 seconds later another tree tile in a new spot then onCreate set the treeTile1's variable [LifeSpan] = 10
and tree2 to [LifeSpan] = 3…
After 10 seconds the first tree will "grow" pushing a event to spawn more trunk tiles onto the tree as needed.
After 15 seconds the next tree spawns
After 5 seconds the next tree grows

This way a single defined tile [Tree] can be unique to all other tree tiles. Also colorization can be changed aswell as its ASCII character (tree 1 can be a "%" where tree 2 can be a "-")

Lastly this will majorly affect how maps are made. Thus to simplify map making I decided the first GUI based builder will be the TileMaster and MapEdit.

—–

BUT :
Exams have started in school and as such im working incredibly slow. Therefore don't expect any updates for the next three weeks –
(I may upload the current version of Pme to allow for some basic AI playing around-with and the testing of vectors ?)
UMayBleed #14
Posted 27 May 2013 - 05:11 PM
Great work, this might be very useful.
ArchAngel075 #15
Posted 28 May 2013 - 12:44 AM
Quick post update on the status of the new map system :

SpoilerSuccess on creating a gen system for unique Tiles.
Only downside i am seeing is the rendering may slow down since a 50X by 18Y map uses 882 tiles roughly.
First attempt at generation thus caused ~882 files to be generated.. Im sure no one wants their Computecraft folders killed by 882 files..
Second attempt tool a look at how the Unique Tile variables could be stored, In the end i managed to completely eliminate the need for 882 files.
By editing the original gen code i made i had it instead of creating a file for each tile, it will now copy the variables from the Tiles reference and paste into a TileMaster file.
This has a file count of 1 now, Also edited the get and set *Data functions to be able to edit these files (was infact needed to generate the files)
-
Next step was reading the Tiles and rendering them on screen as the Tile's positionX and Y are saved within them.
While having the tiles store thier positions makes the moving of tiles very easy, it seems to pose a issue to rendering as EACH tile is read and then printed.
Due to the nature of how the program reads Raw map files it is required to have a "AIR" or "NONE" tile that fills in the spaces where no tile exists.
The need for AIR tiles means we get a RAW map looking like [AIR][GRASS][AIR] etc…
IF this system poses a threat to constant map rerendering then i shall look at how Raw map data are stored.
Perhaps insert the position of Tile into the Raw. ie [GRASS|1_1][GRASS|1_2]
this makes reading the file easier since only a raw copy needs to be read and the variables are pulled from TileMaster.

anyways
In the end success to improving how maps work, i can see massive potential for the use of this in future!

Next task :
1. Continue rewriting Pme to allow vectors and entity rendering again.
2. Implement a onTick calling of a tiles scripts


Again - these posts are mainly for letting people interested in Pme know what the state of things are at.

Criticism welcome - suggestions too.
-end-
ArchAngel075 #16
Posted 30 May 2013 - 06:27 PM
A new update to version Beta_3 is soon to come (about 20 minutes!)

The update ,at the time of this post, contains the following changes :
Spoiler1. Maps are now more harder to "build" by hand due to the new rawMap feature (see below)

2. Maps now use a rawMap system, where within a rawMap file goes the Tile data in the format { NAME | POSX_POSY | GRAPHIC }
2.1 There can be NO white-spaces within the tiles "{}"
2.2 The NAME is the name of the tile and is where the tiles default variables come from.
2.3 The POSX_POSY use my coordinate system, where POSX is the tiles X value and POSY is the tiles Y value.
2.4 The GRAPHIC is the tiles character used, this means that tiles nolonger share a graphic (ie all "grass" tiles do not use a single graphic).
2.5 AGAIN no white-spaces!

3. The map system now places all data unique to that map in a folder in the folder "Maps". This means that Entities, Tiles, Tilesets etc are unique to that map.
4. Tile and AI scripts now have arguments called with them.
4.1 tArg[1] is always the name of the Entity, or Tile. ie, grass; monster; NPC_Merchant etc.
4.2 tArg[2] is always the index of the Entity(should he have one), or Tile. ie 1,7,2.
4.3 self is now the named index, ie : grass_1, monster_3, NPC_Merchant_5.
4.4 NOTE : these are not automatically inserted into script files, But it is reccomended to insert them or to take note of this feature.
4.4.1 as a piece of advice here is the block of code you should allways add (in future the Builder will auto add these)

Spoiler

local tArgs = {...}
local name = tArgs[1]
local index = tArgs[2]
local self = (name .. "_" .. index)

5. Some functions are disabled as they have no use as of yet or are not yet ported over to the new system for handling map data.
6. Changed how map data is rendered, absolutely 0 blinking when rendering the map, yet entities still stutter. Note that mapdata rendering will be changed again as the current system is a half-complete system.
7. New functions were added, many functions removed or rewritten. Especially those regarding map handling.
8. sadly Ticks had to be slowed down, and key-events are not as responsive as before, i tried fixing this but no success. (got as close to fast rendering yet responsive keys as possible)
9. setData/getData functions' arguments' for Tiles are now different, the entity argument requires the INDEX of the tile concatenated with the files name using a "_". ie : NAME_INDEX.
10. Example map now renamed to "ExampleW"
11. On startup of Pme the program now lists all Directories in root/Maps folder.
12. Tiles no longer support color due to new map render code. (If coloring is to be added, then the non-stuttering map feature will be lost) (i may implement an optional part for stutter vs color)

Documentation for V.Beta_3 soon to come.

Tasks for next Projected Version [BetaV4] :
SpoilerMap Builder - Basic GUI based map builder program.
TileMaster - Basic tile creator program. Used by Map Builder
Script Writer [SW] V-1 - most basic form of the script writer program, the true friend of PlatformMe users - write AI-Tile-World-Key scripts without knowledge of programming.
-SW V-1 will only support Tile scripts.
MouseEvents - Long overdue, easy to implement
Clean Up map rendering - remove the need to spam a file creation and deletion every 0.05s . move it to be fully tabled based system.

Tasks that may be done in next Projected Version [BetaV4] :
SpoilerMultiKey events, i wrote a external program that does this, earlier implementation during V3 coding proved unsuccessful.
Colors for Tiles - this was removed, due to how map rendering is done now, it is unlikely that it will return soon.
improve ticks - Not really possible afaik, but it is always worth the shot.

I am debating whether to make a video tutorial on hand writing out a map, to teach others how to use functions and to better understand how the systems work.

As usual :
Criticism welcome - suggestions too.

-Busy cleaning up and adding comments to Pme and Example Map.- Upload soon
ArchAngel075 #17
Posted 04 June 2013 - 06:40 PM
There is currently a bug in version Beta_3 where the maps wont render tiles correctly :
Any tiles that skip other tiles (ie at pos 1_2 ; 1_3; 1_6) will instead render after the last tile in that row.
A fix has be made in the coming version Beta_4. The fix also re-enables colorable tiles with added unique coloring per tile.)

I noticed this during the making of the Map and Tile Editors of the Builder.

The bug has been solved, without coloring added yet. (Will be added after the builders are done)

The coloring system will use both Variables and rawMap.

A tile if provided no color at all ill default to white, the first thing the tile checks is its rawMap format for the color to use, next it checks its Default Variables should no rawMap color exist.

All tiles will now be given a variable "GraphicalColor = {white}" on creation, Using the TileMaster can edit the default color to use on startup.

This can allow creators to set colors on startup, but a variable edit can easily change it ingame.
—-

Ill be uploading images of the editors soon enough, once the Map Builder is implemented, a copy Variable feature is given to the Tile Builder and new documentation of version Beta_4 is done ill release the update.

Moved the Script Builder of Tiles etc to version Beta_5.

I also would like any suggestions for internal functions anyone would wish to have implemented to increase functionality.
ArchAngel075 #18
Posted 06 June 2013 - 12:11 PM
Quick post to let readers and users know of progress and features to come in the soon-to-be-released beta_4 as well as general info updates :

Firstly adding a new set of default variables to the tiles :
NOTE- Any words in [] are the type, ie [integer] means the variable only takes integers.
NOTE- Following the type declaration might be a set of values that may only be used, these will be blue. Values MUST be without quotations even if a string! ie, {right} , not {"right"}
NOTE- Remember, the following does not display exactly HOW variables are used in the data files, instead use VARIABLE_NAME = { VALUE } .

1. emitsLight = { [boolean] } -guess what this will be used for :D/>/&amp;gt;
2. sloped = { [string] Left or Right or None } -realised slopes are not automatically supported so Ill get to work on this (putting aside the Builder till it's added)
3. transparent = { [boolean] } -remember emitLight?
—-
Entities should have the following variables :
1. vectorX = { [integer] } -Vector X of entity, used by Vector
2. vectorY = { [integer] } -Vector Y of entity, used by Vector
3. Gravity= { [boolean] } -Temporary boolean for the limitation of vectors, this will prevent the entity from being affected by Vectors (good for self designed movement systems).
4. Graphic = { [string] } -Any character that can be printed, this includes words, but the positionX/Y only applies to the first character.
5. positionX = { [integer] } -Will control the X co-ordinate where the entity renders and exists.
6. positionY = { [integer] } -Will control the Y co-ordinate where the entity renders and exists.
7. GraphicColor = { [string] A color } -Sets the color of the entity, note use a color name, ie : green ; orange etc. the program automatically can convert string forms of colors to number form.
8. emitsLight = { [boolean] } -same as Tiles
Note that Beta version_4 will not have a entity editor that auto generates these variables, thus for now you will need to have to enter these your self. Should any of these be missing then expect bugs.


-I've added a TODO list to help track features.
-As seen a few variables related to lights exist, A possible feature in future may in fact be lighting effects, with transparency, flickering and realistic(in ascii terms) rendering. again this is a hopeful feature.

Ive just about finished up with the Builder Version_1 :
Can create, edit and delete tiles from the Tile list.
Can create,edit and delete Worlds from the World list.
-Both are fully GUI based, reducing any need to type out unneccesary bits of code such as the annoying map format used in rawMaps or tile variables.

Major Bugs:
-Pressing any key but F2 in the world editor will cause it to crash.
-There is currently no way to scroll the variables listed in the Tile Editor.


No idea when i can release the update though as im still ironing out annoying micro bugs such as faulty renders and ensuring no crashes occur on anything.
ArchAngel075 #19
Posted 08 June 2013 - 07:35 AM
AND!
UPDATE!

NEWEST VERSION :

Version Beta 4
Download :
PlatformMe BetaV4.zip

Details :
SpoilerWhats been Added/Changed! :
1. |Created Builder program, allows creators to easily edit Tiles and maps with ease and without text editing themselves.
2 |Created Tile Builder - Create and edit Tiles for placement in a map.
3 |Created Map Builder - Create and edit Maps easily with a simple gui.
4. |Fix Tile render bug
5. |Add color Support to tile render.
6. |Improved Tick system*. *See bug #1.
7. |Added "Gravity" variable to entities to allow the ability to disable vectors on them.
8. |Added map focus shifting, allows for maps larger than screen.
9. |Added sloped tiles variable for slopes and steps.

BUGS :
1. |The rendering of the map flickers alot, this is due to how the tiles are rendered, can not be fixed. Though can be lessened by decreasing the ticks.

Im pretty happy about this update, especially since i realised that i can implement map focus shifting.
I also updated the Pme file with more comments on new functions!
Note I altered the Tile rendering again, it now has full color support (both in the Builder and Framework_Pme).
I also added GUI implementation, so now you can create gui files that render only if their variable is true. More details will follow.
The Builder is pretty powerful, speeding up map creation drastically (i even abused it to test map Focus Shifting.).
Currently you cant do any script editing in the Builder, but that's to come! Lastly I will implement the Entity Builder with the Script Builder in Beta_5.

I'd like to credit wraithBone for his GUI functions, they really sped up making a GUI for the Builder!
wraithbone's GUI

I am also going to make a duplicate of brett122798s' game MoneyBags using this program. I have received permission to do so.
The power of PlatformMe expands immensely with this unique tile system, and I beleive that with time and effort one can even make a alpha version of terraria in it!

I am also looking into implementing SaveGames and compacting the files down. There are plenty of File Packaging programs out there and it should be fairly easy to make the "games" actually a single file with them.

As usual, please post any bugs or suggestions for features!
ArchAngel075 #20
Posted 08 June 2013 - 01:57 PM
So I got permission from bret122798 to replicate his game using PlatformMe :

And thus in just one hour of entering AI and such :
It is the closest replica i can get in one hour…

pastebin get 42MUWqH4

Just save it as any file and run that file.
It will automatically create the pme and moneybags map.
Once unpacked run pme, and choose map moneybags!

Makes use of oeed packager, expect massive use of his packager in future updates. specially to compacting map files and save games!

*Do note that the package must be run in ROOT "/" else pme will not work properly!

This is also an example of how games will be distributed in near future. Ofcourse true future games will use many maps. But as a word of caution : allways supply Pme with packaged games along with the maps folder with your map in it!

enjoy the dodging!
ArchAngel075 #21
Posted 11 June 2013 - 05:44 PM
So after much typing, fiddling and frustration…

no update! …

Simply because I've decided to re-write everything from the ground up.

Why :
Currently the program is too damn buggy, the ay it stored data is horrible (i whent file read crazy) and there is that annoying stuck key bug…

BUT
I currently have a fixed up rework in progress, it already has a smoother tick system that has zero sticky-keying and the new system for storing variables on entities and Tiles will be more easier to work with.

Currently in beta 4 this is how id want to access X-position of a tile within its own script : getData(this,"Tile","positionX") , and that returns as a string so we still need to use "tonumber()" do use it in other places…

how getting variables in the new system will work : Tile[index].Xpos . thats it! Yes i discovered how to store values in tables and then get that value using a named variable (ie table = {Xpos = 25} ) thus we can now gain infomation much more smoothly! also to get non defualt variables we use tile[index].var.variable_name we even return what variables it has using this method and more!

say for instance we have 2 maps, m1 and m2. using this system we can get data from each seperatly with m#.Tile.etc Also the way we insert the data is no more based on a annoying file.readLine(), instead the raw-map files are actual programs that just use table.insert(_Tiles,Tile). So writing a program that automatically does this for us is pretty easy!

Version wise of the remake is making this all the way to the point of where version 4.1 would be (that is where we are now in v4 but with light handling code).
A rename of the program is in order, but im unsure of what name to use.. feel free to throw some out there….

I looked into a gui based programming utility similar to gui based warcraft3 map making and realised that string.find(str,"(") doesnt work. Back to the drawing board!

Annnnd lastly : i will work on a game of my own using the new system to fully show off the utilities…
BUT till then i will be very silent on this post until the remakes release. I ask kindly for any and all requests to be given! If its given early, I can plan it and have it in the remake early.

oh and credit to brett122798 who gave me the realisation of the above things to do with tables! :P/>