Best way to get BlitzMax games on Switch and Mobile?

Started by GreyAlien, January 11, 2018, 19:04:58

Previous topic - Next topic

Pingus

@Derron, Thanks for your hints. The row/column idea worth a try. Other suggestions are already implemented more or less.

@Brucey, good to know that IOS *could* work. To go further, is the issue more related to 'time' (yours), or Mac dev subscription ? Because the second issue is pretty easy to solve, the first one... probably not ;)

@GreyAlien, I'm now very curious to know more about how much stuff is in you main loop :) Is it because of the AI ? I naivly thought that once the deck is set up, there is not that much things to check each loop (there are of course, especially with the interface, but there is no interaction between cards ?).
200 hz !!! omg, what needs such refresh rate !?

Derron

I wonder about the 200Hz too.. interaction/input handling should come along with 30-60Hz (depends on how small you want the visible delay to be). So please explain elaboratively :-)


@ iOS and Switch
Think especially for the Switch it is not of use for Brucey to pay for a DEV kit as he does not personally target it. So if there are some users lurking around - interested in Blitzmax + switch (think they are less than the finger count of a carpenter) they should consider funding it. Of course this is not really useful if using another language/toolchain is a viable/easier - and cheaper - option.

Same could be said about iOS. I fully understand that developing for a platform you personally do not really use is OK as long as you do not have to pay for it (there is that "must be possible"-interest in doing things). And Apple is one of these "need to pay first" eco-systems ...

Dunno how many are interested in a development of BlitzMax - maybe doing a patreon-thing could help development. On the other hand I am not really like that idea as it "forces" Brucey to use his spare time for this as else the nagging will start ("but I paid..."). So this kind of financial support is more of a "hint" on what to do next.

Best thing would - of course - be direct help on the sources. So if one is capable of doing "bare metal" system stuff, then I am really sure Brucey would appreciate Pull Requests on the brl-modules and the compiler. I do not have the knowledge on the system stuff - and no access to iOS or Switch (I have a Wii laying around ...uhh ohh). So I can only provide motivational onliners (keep going! Go goo gooooo!) or do code checks.

Another thing to consider: all these additional targets would benefit from "helper tools/assistants" doing all the stuff needed after "compilation" (packaging, signing, transfer to device, ...). Also the IDE needs to be updated then - do you still want to use MaxIDE? ... this opens a big big box of tasks derailing from the original task. Not all of us like to run things via commandline.


@ GreyAlien
How many do you estimate would a Switch port by an external company cost - think each "update" (patch) would cost in addition. And how many further projects would/might be ported too? If it was only one single project then it might not be worth the hassle - especially when considering the needed maturity (bugs, issues...).
But if you plan to do many things on the Switch, you might think of reaching out to Brucey - to at least enabling him of doing the needed researches. Of course the risk is that the results stay fruitless.


bye
Ron

Brucey

Getting access to the Switch resources appears to be a roadblock for me currently.
In a reply I received from their developer support, they want an overview of my planned project, summary developer experience/history, and stuff like screenshots, videos and links to, I surmise, my previously released games :-)

Alas, being just a lowly... tool... I don't foresee this avenue opening up any time soon.

Well, I did ask, at least :o)

Derron

Have read that in reddit threads (or so) of some months ago too. Seems nintendo wants to know what you plan to do with the access.

Maybe just reply them that you plan to add support for the switch for your programming language / tool-chain. And if really desired you make a screenshot of some syntax highlighted source code :p

bye
Ron

GreyAlien

#19
Thanks for asking Brucey, OK so they are still acting as strict gate keepers it seems. They used to want the person applying to have a company and a separate office from home!

At present I'm not certain I want to do a Switch port, it was more just testing the water for the viability as I recall in the past people had got Monkey working all sorts of weird stuff. But if I do want to go that route, I'll be back waving $ or dev kits or something.

What is way more likely in the short term is decent iOS support. I'm in talks with a publisher about porting one of my games but I'm not sure if they'll want to rewrite it based on my source, or to try to get it working in BlitzMaxNG. I'll know in a few weeks. It may all come to nothing anyway.

@Pingus OK sure the main loop doesn't continuously scan the cards, but nor should a match-3 if nothing is moving/no input. But when the player performs various different actions then I do have to loop through the cards, sometimes recursively, sometimes with loops within loops etc. And when those actions occur I don't want the framerate to momentarily hitch.

Re: 200Hz, I believe I set that up when people still had CRTs and some people were running them at 75Hz, or 90Hz or 120Hz! I wanted to chose a core loop that would work on all of those no problems (with no dropped frames) and was easy to work out as part of 1 second (it's 1/5th). It also means that collisions with fast moving objects work really well and don't need ray casting. I was using it for my match-3 games to keep them really smooth as the "gems" fall down at different speeds and collide etc. Plus all particle effects and everything just look really smooth. It's probably overkill I know, and also annoying to change if porting to phones, but there you go.

Derron

#20
If you are interested in doing some iOS stuff: create a basic application (maybe using your framework - which you made NG compatible - in advance of course :-)). Then try to build something for iOS.

From then on you just nag Brucey here and there to fix the issues you encounter.

Later on extend your basic app until it includes all the stuff you want to use: audio, profiles, ... so to check if there are some "bare metal system"-modules are missing (dunno if SDL cares about everything already). Means file access must be working (similar to android's sharedPreferences / SD-card access and so on).

While doing this you/Brucey/others might recognize if there are some "NG utilities" missing (little assistants for signing apps, preparing stuff, ...).


Think first hurdle is to make your framework stuff work with NG - I got mine (github.com/GWRon/Dig.git) pretty much working with NG (basic apps should run on Android, have no iOS device here, so cannot test it).

What I think is pretty much a pity: emscripten seems to have trouble with the GarbageCollector used in BlitzMax (NG) - or something in the likes, else we could nudge Brucey to make BlitzMax->Html5 happen :p


@ 200 Hertz
Ah ok, think that might work if there is not much stuff to simulate (just some particles and loops). TVTower's logic loop is already using about 3ms - ok I do LUA stuff in it (AI players) and simulating little things from the world. Did you split the logic simulation and input/ressource/...handling - so it just checks for mouse interaction every "x loops" (input polling takes cpu cycles - at least Brucey added a switch to disable polled input when doing some keystate fetching).


bye
Ron

GreyAlien

My framework does already work with NG, as I used it to compile Regency Solitaire for Linux with help from Brucey. So that's a good step. But yeah for iOS it would have to drop back to a very basic project and gradually add things and see what worked and didn't.

Xerra

BlitzmaxNG definitely used to compile to IOS via the creation of an Xcode project as Brucey borrowed the Blitzmax source of an old game of mine and converted it with very minimal changes. I think I've still got a build on my Ipad even now. As I recall it even had compiler specific functions so the same source could be compiled for multiple platforms and have specific routines for devices like tap screen and mouse functions.

That was almost two years ago though and Xcode has been updated probably loads since then.

Not sure I could test it again now, though, as my IOS certificate expired a few months back and I'm not sure if you can still build to your own devices without having it.

M2 Pro Mac mini - 16GB 512 SSD
ACER Nitro 5 15.6" Gaming Laptop - Intel® Core™ i7, RTX 3050, 1 TB SSD
Vic 20 - 3.5k 1mhz 6502

Latest game - https://xerra.itch.io/Gridrunner
Blog: http://xerra.co.uk
Itch.IO: https://xerra.itch.io/

LT

Has anyone actually built an Android and/or iOS project and sold it using NG?  I'm working on a game that I'd love to port, but it does make use of simple 3d.  How does the graphics part work on mobile?  Does it require switching to SDL and has anyone confirmed that works on iOS?

Also, I want to give a shout out to GreyAlien for his recent Twitch talk, which I enjoyed.  :)

GW

Ng has a alternate max2d mod backed by SDL, and I'm pretty sure that GL-ES works too on mobile too.

LT

Thanks, GW.  I know about the max2d mod, but has it been tested/used for something commercial?

Yellownakji

As of 0.98, the initial commit for NX support is live.   Everything will compile in 'homebrew' mode, however and it's super super basic; just enough for things to run and be molded.   NRO builds will run in RyuJiNX emulator but the emulator is still new and poop.  You'd have to have an actual modded switch for accurate testing.

But after discussing with Brucey about it and going over technical anomalies, well, there you go.   It happened.

So, if you know SDL, enjoy. Brucey had to reverse engineer a lot, so major thumbs up.

also sorry for replying to an old topic.

Derron

Saw things created on github, so assume some Switch-stuff is happening. Good to read.

bye
Ron