Arcade Tool for people who want to mess with it

I’ve made something truly horrifying

9 Likes

uhh what have you done zak what have you done you need the catsack version of the ghostbusters

hey zak how would i make this work with ue4 or can it not do that cuz i want to try this in ue4

@Matt-Senpai
You don’t want to add more platforms the way I did, I just hardcoded a Y value so platforms can’t work. You want to properly define the geometry in a table or something so you can iterate over all geometry and check for collisions. I’d make a class in Python but Lua is a little different, here’s some info on handling things somewhat as objects, I yet to do it myself so I can’t help you just yet, I just woke up to a new day. https://www.lua.org/pil/16.html

@Zak
Wow… Cathulhu

@Mattio
So the Cathulhu was a test of a new feature I’m working on.

I wrote a quick ECS framework (similar to Unity) tonight which may be the direction I want to go in terms of simplifying game creation.

https://dl.dropboxusercontent.com/u/2686756/runtime_update_and_ecs.zip

I had to make a small change to the runtime to enable Lua library loading to get this to work.
Just extract this to where the tool is and replace runtime.dll

Make sure the ecs folder is in your projects folder.

Try it out using tool ecs

If you want to use ECS in a different project just put it in your project folder and add it to the list of scripts in your .mproject file.

open up ecs/main.lua to see how it’s used.
check out ecs/ecs.lua to get a look under the hood at how the whole thing works.

4 Likes

Decided to throw my hat in the ring and make a basic version of Pong

Here’s some source code if anyone’s interested: https://drive.google.com/drive/folders/0B273_bKUMiNfMVM3V3pIcmY3NEE?usp=sharing

Feel free to do as you please with it. Now for some random questions

@Zak Are the Width and Height settings in the .mproject files supposed to do anything yet?

@anon38270777 Did you only run tool.exe? If you did try this:

  1. Open the folder with tool.exe and hold shift and right click and then click on “open command window here”
  2. Type in “tool [project folder name]” to run a project

I don’t know much about Lua, but if it has Libraries or Frameworks like other languages can those be used with the Arcade Tool?

I also want to thank you Zak for making a really cool thing to mess around with in preparation for the TU Arcade later on! :smiley:

Also huge thanks to you @Mattio for some small starter code (no offense Zak with your 600 lines), it would’ve taken far longer for me to make something if it wasn’t for you

11 Likes

Although I know nothing about code and programming, this is super cool to see a dev release an early build of a tool and the community to embrace it and get to town learning and using it. True usage of the term ‘early access’. Great work @Zak!

7 Likes

The Width and Height settings are not implemented yet.

The plan is that you would use these to set the “virtual” resolution and in the game it would be auto-scaled to fit whatever “device” (including the tool) it was rendered on.

@Zak How would i get this working with ue4 i wanted to try this out in ue4 for fun

The UE4 stuff isn’t ready yet. I’m still working on it.

ok thanks for telling me i was hoping i could but sometimes you have to wait :stuck_out_tongue:

I feel like a noob for asking, but is there a reason why #1 works but #2 doesn’t?


#2 also doesn’t work if TEST isn’t local.
Is this just normal lua behaviour I’m not used to because of Garry’s Mod?

2 Likes

Good catch, I completely forgot about this. Yeah this is a peculiarity exclusive to my arcade API.

To minimize overhead, there is only one Lua state across all machines. This creates an issue where the global table is vulnerable to modification which would allow a rogue arcade game to break other arcade games at runtime.

Currently to solve this I enforce a rule where all top-level definitions need to be functions.
The API copies the global table _G where all lua functions are defined into a function environment.
This environment is made current only when top-level functions are called by the API.
Doing this prevents any script from doing things like overwriting print() which would affect all arcade games that might be running.

One of the side-effects as you have noticed, is that you can’t really define any tables or variables in the top-level scope.
You must define them within init()

There is a reference to the instance-local table called game
If you set something like game.TEST = {} then it can be accessed from any other top-level function.

This isn’t the most ideal solution, and I might change it as I develop the arcade API.
I’m pretty sure I can find a way to make the local environment current when the script is initially parsed.

Earlier I posted a small patch which allows external scripts outside of main to be loaded into the class-local scope. Doing so makes it possible to construct simple libraries (like ecs.lua) without having to put everything in init().

1 Like

Thanks for clearing that up. I thought I was going mad. I’ve put everything inside of init() for now as it works all as expected then. I’ll have a better mess around with moving everything into libraries tomorrow.

For now, I’ve got the first steps of a rubbish UI system finished up.

5 Likes

Man, that’s awesome! What do you plan on doing with it?

1 Like

Not much planned for it currently, just seeing what I can get working in the Arcade. I’d like to get parenting working properly and then work on buttons and go from there.

(I’d also like to get it in a non-terrible state before doing anything with it :laughing:)

2 Likes

I plan to work on the runtime some more tomorrow.
I might release an actual alpha of this.

Maybe it’ll have some of these features:

  • Custom resolution implemented
  • Project creation menus
  • Integrated ECS
  • Better Lua scoping
5 Likes

Really good stuff @BOTdan !!
Tonight I just made a nice looking start screen with some nice animation, start > play > die then get a failed for 2 seconds before it goes back to the main screen.
Nice simple graphics and the bouncy effect really adds to the quality :smiley:


(I better not actually make a flappy cat game, I will hate myself :smile_cat:)

7 Likes

I got some tinkering going for this, but i won’t be making a game until the API is fully fleshed out, I got other things to do right now.

https://f.lewd.se/l6PLAS_2017-08-27_13-17-48.mp4

the code is well commented so the majority should be able to understand it.
https://drive.google.com/file/d/0B5loKLVMT21HdTBheUlzUnN0TzA/view?usp=sharing

6 Likes

###Just finished auto-scaling for custom sizes, now you can actually see the stuff!

11 Likes