[thumb]http://files.facepunch.com/ziks/2015/January/12/cabinets2.jpg[/thumb]
A few of us working at Facepunch are working on an Arcade simulator, this is the thread for our first game platform API.
This is for the programming nerds that want to start developing arcade games before the core game is done.
We'd love to hear your suggestions for the API or improvements to the documentation.
[b]Embedding games[/b]
You can embed games in the forums by packaging your game in the development kit and uploading it [url=http://arcade.facepunch.com/]here[/url]. Then put your game's ID in [noparse][arcade][/noparse] tags:
[noparse][arcade]01ca6936-7663-4389-9aa3-e114da2af4e0[/arcade][/noparse]
Feel free to use this thread to share your games, for example:
[arcade]01ca6936-7663-4389-9aa3-e114da2af4e0[/arcade]
[b]Documentation[/b]
[url=http://facepunch.github.io/arcade/cs/annotated.html]C# API Documentation[/url]
[url=http://facepunch.github.io/arcade/cs/getting-started-cs-index.html]Tutorial: Getting Started – C#[/url]
[url=http://facepunch.github.io/arcade/cs/forum-embed-index.html]Tutorial: Embedding Games[/url]
[b]Downloads[/b]
[url]http://arcade.facepunch.com/downloads[/url]
Is there any way to directly start a game from the command line? Kind of like Love2D.
I played around with this a bit a few days ago. Pretty fun mess around with and simple as well. You all did a great job.
[QUOTE=jmazouri;46488253]Is there any way to directly start a game from the command line? Kind of like Love2D.[/QUOTE]
Not yet, but it would be useful to have. I'll implement it for you by tomorrow.
Is it possible to define the game that should be loaded at startup of BBDK.exe ?
[editline]14th November 2014[/editline]
Also, is it possible to clear the console? If I'm fixing errors and running the game again the errors stack up quickly.
[editline]14th November 2014[/editline]
It seems that Vector2f.Normalized is returning (NaN, NaN) when the vector is too small to be normalized. Can this behaviour be changed to return a Vector2f.Zero. This would replicate the behaviour of the built-in Unity vector.
[quote="Unity Docs"]If this vector is too small to be normalized it will be set to zero.[/quote]
If you'd like to test:
[code]
Debug.Log( Vector2f.Zero.Normalized );
[/code]
The embedded game doesn't seem to work on Linux using Firefox. It just stays black. I've let it running for 5 minutes.
What's up with the CPU using almost 27% CPU power when moving a sprite, and about 2% when not.
Another thing: Using linux with x11 and xfce as the Desktop manager/Window manager, I get very weird problems when I move a window while the BBDK is running: especially when certain sprites are moving, my windows movement speed is severly slowed down when I drag it across the screen.
I checked the CPU usage of the executable, and it shoots up to 20% from 3% when I drag a window.
I think somebody forgot a sleep(0) or something.
[editline]14th November 2014[/editline]
Also please please please add hotloading, thanks
[QUOTE=Asgard;46489744]Is it possible to define the game that should be loaded at startup of BBDK.exe ?[/QUOTE]
I'll implement that tomorrow.
[QUOTE]Also, is it possible to clear the console? If I'm fixing errors and running the game again the errors stack up quickly.[/QUOTE]
That would be useful, I'll add that too.
[QUOTE]It seems that Vector2f.Normalized is returning (NaN, NaN) when the vector is too small to be normalized. Can this behaviour be changed to return a Vector2f.Zero. This would replicate the behaviour of the built-in Unity vector.[/QUOTE]
Yeah checking for zero vectors each time would get annoying, I'll add this.
[QUOTE=DrDevil;46490226]The embedded game doesn't seem to work on Linux using Firefox. It just stays black. I've let it running for 5 minutes.[/QUOTE]
I don't think there's an official Linux Unity web player yet, but you might have some luck with this: [url]http://www.gamingonlinux.com/articles/unity3d-web-player-in-linux-browsers-thanks-to-pipelight-.2996[/url]
[QUOTE=DrDevil;46490531]Another thing: Using linux with x11 and xfce as the Desktop manager/Window manager, I get very weird problems when I move a window while the BBDK is running: especially when certain sprites are moving, my windows movement speed is severly slowed down when I drag it across the screen.
I checked the CPU usage of the executable, and it shoots up to 20% from 3% when I drag a window.
I think somebody forgot a sleep(0) or something.[/QUOTE]
That's probably a Unity problem, but I'll do some profiling on our end.
[QUOTE]Also please please please add hotloading, thanks[/QUOTE]
I'll certainly look into it.
this is really fun to mess with
do the left and right analogues support actual analogue input?
I mean, the axis it passes does, but will the actual game in the arcade support controllers or can we assume we will only ever get -1, 0, 1?
[editline]edit[/editline]
[arcade]http://puu.sh/cRDCk.bytes[/arcade]
shitty attempt at car physics, it needs work but I'm pretty proud of this so far :)
New build that lets you specify a game to load via command line (just as the first arg). Also means you can launch it straight into a game by dragging that game's directory or package file onto the executable.
I'll be working on the other recommendations on Monday.
[QUOTE=krail9;46492149]
I mean, the axis it passes does, but will the actual game in the arcade support controllers or can we assume we will only ever get -1, 0, 1?
[/QUOTE]
I don't see why we wouldn't add analogue stick input for controllers at some point.
Cool taxi :)
In the latest build you can clear the console by right-clicking on the console toggle button, and Vector2f.Normalize will return Vector2f.Zero when used on a vector with zero length.
I've noticed that if I start a game from the command line, and there's some errors in the code, they won't print to the console unless I manually switch games.
Related: Is there any official bug tracker yet?
[QUOTE=jmazouri;46511042]I've noticed that if I start a game from the command line, and there's some errors in the code, they won't print to the console unless I manually switch games.[/QUOTE]
I'll correct that tomorrow, thanks for pointing it out.
[QUOTE]Related: Is there any official bug tracker yet?[/QUOTE]
Just set this up for you: [url]https://github.com/Facepunch/arcade-issues[/url]
Would you like me to make a report for the CPU usage issue, or can I leave it here?
[QUOTE=DrDevil;46490531]Another thing: Using linux with x11 and xfce as the Desktop manager/Window manager, I get very weird problems when I move a window while the BBDK is running: especially when certain sprites are moving, my windows movement speed is severly slowed down when I drag it across the screen.
I checked the CPU usage of the executable, and it shoots up to 20% from 3% when I drag a window.
I think somebody forgot a sleep(0) or something.
[editline]14th November 2014[/editline]
Also please please please add hotloading, thanks[/QUOTE]
Same setup as him, doesn't even work for me. Using Chrome.
[QUOTE=Asgard;46511806]Would you like me to make a report for the CPU usage issue, or can I leave it here?[/QUOTE]
Having them all in one place would be best, so adding it to Github will be a great help.
[editline]17th November 2014[/editline]
[QUOTE=proboardslol;46511990]Same setup as him, doesn't even work for me. Using Chrome.[/QUOTE]
I'll reinstall Arch on my laptop at some point soon so I can investigate the issues on Linux directly.
Waitup actually the Unity3d webplayer wasn't installed (though pipelight had it set as enabled :?)
edit: have both unity3d and x64-unity3d (experimental) enabled on pipelight and neither have changed anything
Don't worry, the embedded game in the opening post doesn't work for me either.
Windows 7 64-bit, using Google Chrome. I have AdBlock and NotScript installed, but NotScript reports that all elements on the page are unblocked.
Also worth noting I have the VLC web plugin installed, and it is notorious for breaking embeds for me.
[QUOTE=Gmod4ever;46514680]Don't worry, the embedded game in the opening post doesn't work for me either.
Windows 7 64-bit, using Google Chrome. I have AdBlock and NotScript installed, but NotScript reports that all elements on the page are unblocked.
Also worth noting I have the VLC web plugin installed, and it is notorious for breaking embeds for me.[/QUOTE]
Same setup for me, except no VLC web plugin or NotScript, rest is the same and works fine.
Maybe try disabling them and checking if it works then?
Also, this is really cool, gonna muck around in this.
New build; features improved error reporting, fixed errors not showing for games launched from command line, and added support for 2 channel PNG files.
Is there a list anywhere of the actual input mappings? I keep hitting random buttons on my keyboard until something works...
[QUOTE=Sidneys1;46571724]Is there a list anywhere of the actual input mappings? I keep hitting random buttons on my keyboard until something works...[/QUOTE]
Here you go: [url]http://facepunch.github.io/arcade/cs/controls-index.html[/url]
New build, adding a few new methods to the RawImage class:
[url]http://facepunch.github.io/arcade/cs/class_game_a_p_i_1_1_budget_boy_1_1_raw_image.html#a51bd7a60ad65422558c8beeefe47931a[/url]
Downloads page: [url]http://arcade.facepunch.com/downloads[/url]
I seem to have a issue with the flipX
This is normal
[IMG]http://i.imgur.com/ff6f9yx.png[/IMG]
This is with flipX (Sprite.FlipX = true;)
[IMG]http://i.imgur.com/7qvRpZR.png[/IMG]
this only happens sometimes btw
Also I have noticed your documentation is off, you have GetAnimation, but in your GameAPI.dll it only has CreateAnimation
[url]http://facepunch.github.io/arcade/cs/getting-started-cs-3.html[/url]
[QUOTE=lhendrey45;46935091]I seem to have a issue with the flipX
This is normal
[IMG]http://i.imgur.com/ff6f9yx.png[/IMG]
This is with flipX (Sprite.FlipX = true;)
[IMG]http://i.imgur.com/7qvRpZR.png[/IMG]
this only happens sometimes btw[/QUOTE]
That's really odd, could you send me a minimal example that reproduces the bug that I can test while fixing it?
[QUOTE]Also I have noticed your documentation is off, you have GetAnimation, but in your GameAPI.dll it only has CreateAnimation
[url]http://facepunch.github.io/arcade/cs/getting-started-cs-3.html[/url][/QUOTE]
Thanks, I'll fix that now.
[editline]15th January 2015[/editline]
Also here's something I've been working on while testing things:
[arcade]4c41bc68-4894-498e-9f13-29694714a04a[/arcade]
Inspired by krail9's car game test.
Yo I made that!
[editline]21st January 2015[/editline]
I'm currently just using wall entities and rendering them each update.
I'm gonna try out the actual Tilemap now, thinking it's optimized.
Oh yeah Tilemap will bring that graph right down. It uses the least bits possible per tile depending on how many types of tile you have, for example a map with only two tile states will use 1 bit for each tile (a 16x16 grid would be 32 bytes + header).