Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Launching a game on Xbox

Author
Message
metamorpho
7
Years of Service
User Offline
Joined: 17th Oct 2016
Location: Planet Earth
Posted: 10th May 2021 18:35
Hello everybody!!

Here on the forum I learned that can export a project to HTML5 and then convert it via UWP and run on Xbox. I don't quite understand what's going on with HTML5 in the UWP, so maybe the questions do not sound right.

Three questions came up. Please tell me:

1. In HTML5 format, the speed of my browser game drops dramatically. When converting HTML5 via UWP and launching the game on Xbox, the game speed will be the same as HTML5 in the browser or will it grow ?

2. In HTML5 format in the browser, the commands for saving to the results file do not work. When converting HTML5 via UWP and launching games on Xbox will it work
commands to save to a results file?

3. It will be good for playing on Xbox if the Xbox-gamepad is supported. How to poll Xbox-gamepad - are there such commands on AppGameKit Classic?
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 10th May 2021 23:37 Edited at: 10th May 2021 23:40
i know next to nothing about xbox but, if the browser is a "real" browser, the Load/SaveSharedVariable commands should work as cookies.

and, in case you run into similar issue where the cookies wouldn't save, see tboy's advice here which worked for me).
[My Itch.io Home] [Now Playing]
[AGK Resource Directory] [TGC @ GitHub]
[CODE lang=agk] YOUR CODE HERE [/CODE]
[VIDEO=youtube] VIDEO ID [/VIDEO]
[AGK Showcase][Google Forum Search]
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 11th Jun 2021 03:27 Edited at: 11th Jun 2021 04:00
Quote: "Here on the forum I learned that can export a project to HTML5 and then convert it via UWP and run on Xbox."

WOW

very interesting

I have been considering playing around with that UWP for Xbox, and if my HTML5 builds will work, then that is definitely on the to-do list. (now I need an Xbox 1, because my old 360 is not going to work)

Quote: "1. In HTML5 format, the speed of my browser game drops dramatically. When converting HTML5 via UWP and launching the game on Xbox, the game speed will be the same as HTML5 in the browser or will it grow ?
"

I saw a mention of it crawling in DEBUG mode, but turning that off makes it go faster, so make sure you are not converting in debug mode.

Quote: "3. It will be good for playing on Xbox if the Xbox-gamepad is supported. How to poll Xbox-gamepad - are there such commands on AppGameKit Classic?
"



EDIT
I just checked out those threads, and it seems to be a problem getting the controllers to work.

When I was setting some of my world records using MAME, I had hacked a USB keyboard with an old ATARI 2600 controller for the input device and it worked fine.

The thought here is if the keyboard inputs work, then there may be a crude work around for the controllers.

I do not have an Xbox One to play around with, but I am definitely going to be getting one to see what I can come up with. (probably will fail, but should be fun to try)

I guess I can play around with Windows 10 until I get the console.

EDIT 2

Quote: "I discovered that if you plug in a usb keyboard into the Xbox One the AppGameKit keyboard commands work. So if you have keyboard controls in your game they should work fine on the Xbox One."


Yep , the USB keyboard hack should work fine.

I must have forgotten about that thread or somehow missed it. (didn't have an Xbox One though, so may have skipped it back then, but they are cheap used now, so...)

Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 11th Jun 2021 14:41 Edited at: 11th Jun 2021 15:28
So.. I just installed Visual Studio 2019 with all the bells and whistles, but JAVASCRIPT for UWP does not seem to find any matches when following the instructions provided in the other threads????

DO I really need to use an old 2015 version to make this work????

EDIT

OKAY the 2015 download is for DVD only... most new computers do not have a disc drive!

However the 2017 version is a download (I only installed the Universal Windows package this time! less than 2 gigs vs the 8+gigs for the 2019), and it will let you create a JAVASCRIPT UWP project.
New Project >>> Blank App - Web Context (Universal Windows)

I still do not have the xbox yet, but if it will work on windows 10 using the UWP then it should work on Xbox.

... so I'll let you know how it goes if I can get things working.

Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 11th Jun 2021 16:11 Edited at: 11th Jun 2021 16:17
BUMPITY BUMP BUMP BUMP

YES!!!!!!!!!!!

My test worked!!! (using Visual Studio 2017 (UWP package install)

Just follow the instructions provided in this thread...

https://forum.thegamecreators.com/thread/217231

The only exception was the drag and drop into the directory didn't work, but copy/paste does if you highlight the main directory for the app (at the top of the list) before you click paste.

Now I need to get an Xbox and get back to work on Gladiator Quest !!!! WOOOOHOOOO!

THANKS apocolyp4 !!!!


On a side note: this is a much better way (IMO) to test the HTML5 builds rather then emulating a server via XAMPP etc. which is how I used to test them.

Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 14th Jun 2021 16:07 Edited at: 14th Jun 2021 20:27
OKAY ... EUREKA!

I have the Xbox Controllers detected in HTML5 Builds using the commands already available in AppGameKit .

I'll now begin to work on a simple app to demonstrate for those who have the Xbox One. (or later ...X/S )

The commands we have are fine... the main triggers are the Z and RZ

Buttons..

A = 1
B = 2
X = 3
Y = 4

Left Top Trigger = 5
Right top trigger = 6

Left Button = 7
Right Button = 8

9-12 = reserved?

Game Pad Left = 13
Game Pad Up = 14
Game Pad Right = 15
Game Pad Down = 16

Raw Joystick inputs for joysticks, and that Z index is for the main triggers (left and right)

It will give you an error that the JOYSTICK 0 does not exist at line whatever if you do not have the code wait, because it needs you to press a button to detect the controller as slot 1 (I only have one controller to test with but this one is working fine for the first index)

Here is all I had to add at the top of my code (prior to calling any GET RAW JOYSTICK.. commands to get it to work for HTML5 (the HTML likes the 'Z' input to be triggered for joystick detection )



As you can see, I simply give the command to detect the joystick, then send it in a little loop to give it time to do its thing.

The loop just prints a message to say it is waiting , and prompts the user to trigger the input for the joystick to get detected.

Try it .. it works (tested running XAMPP virtual server locally, and converting the HTML5 build to UWP via VS 2017)

Just posting this here because some of the old threads mentioned the joysticks not being able to be detected in the HTML5 builds, but the old threads were locked, so...

... so cool how the trigger values (that Z axis) are floats for sensitivity!

Here is something you can test .... sloppy I know, but you should be able to get the idea.





.., build that as HTML5 and test your Xbox controller. (have fun)

Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1
Conjured Entertainment
AGK Developer
18
Years of Service
User Offline
Joined: 12th Sep 2005
Location: Nirvana
Posted: 15th Jun 2021 16:06 Edited at: 16th Jun 2021 01:17
SO, I went out and bought a new XBOX controller..... works for X/S and Xbox One.

Tested it on the html5 build, and it detected it fine.

The only issue is that it is an enhanced controller with extra buttons, and those do not show up as regular joystick button inputs.

However, all of the other normal controls (The Xbox One buttons) are being recognized and worked fine.

So, the old threads must have been before an update that addressed the HTML Joystick Controller issues.

I still don't have an Xbox One to test, but if the HTML5 builds that get converted to UWP via VS 2017 do not work right on Xbox One consoles, then the issue is with the Xbox, because they run fine on Windows 10 with the UWP.

If this has been working fine all this time, then I am wondering why there are not a bunch of Xbox releases in the showcase.

As one person mentioned, an HTML game on an Xbox is like having a Ferrari pulling a lawn mower trailer, but games like 'Gems of War' and other casual games rated 'E' seem to be doing well with 2d graphics.

The user base of the Xbox is huge, and I for one am going to play there. (once I have something posted (probably slots or something simple) then I will be sure to post it in the showcase.

Maybe I am just behind the times on this one, but I thought I would share my discoveries in case others are as confused about the Xbox compatibility as I was.


EDIT


So, all in good fun... I went ahead and mixed and matched the new Xbox One X/S controller and the old Xbox360 controller, and they work fine together on Windows 10 (UWP) converted from AppGameKit HTML5 builds.

Have fun, I know I am...



It seems like they will both be detected simultaneously, if already plugged in, once that trigger is held a couple seconds.

So.... I unplugged the second one, just to make sure I was not bypassing the Joystick 2 check, and it prompted me... then as soon as I plugged it in, it recognized it on its own.

It seems that the entire index is dependent on the first one being recognized, so if you have a RockBand or other 'dongle' in the Controller 1 slot on the Xbox, then it could be an problem. (untested)

Anyway, I am glad I have been playing around with the HTL5 builds recently, because that is going to pay off on some split screen action. (been dreaming about a Xenophobe type split screen)

Finally can have some multiplayer fun on a leading cutting edge console.... Happy days! (yeah yeah other fancy engines that require teams, but for simple indies like me this really shines!)


EDIT

Well, is seems that the Microsoft Store Policies are really 'E' rated and not for anything with adult content, or any kind of violence.

So, Casino is out... gambling.
All Shooters are out ...violence.

Puzzle games and Driving Games (off road) seem to be about it... bummer dudes.

Coding things my way since 1981 -- Currently using AppGameKit V2 Tier 1

Login to post a reply

Server time is: 2024-04-23 23:55:51
Your offset time is: 2024-04-23 23:55:51