123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|626|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Monkey -> Learning With Monkey

Page : 1 2 Next 3 4 5 6 7 8 9
Prev
Sun, 13 Jan 2013, 09:33
Jayenkai
So, I finally bothered to pick up Monkey, and I've just about started to play about with it.
My code is already a chaotic mess, much like my PMC template, but I can understand it, and jumping around the ever-growing chaotic craziness is second nature to me.

As the game template grows, and I add features, and test abilities, I'll keep this topic updated on my findings.

Monkey iOS Test 2

Having eventually gotten around to installing Monkey on the Mac, I was surprised to find that it was already prepared to do iOS targets. (On the PC, you need to install extra gubbins for different targets.. on the Mac.. well, all of that was already installed!)

So actually compiling iOS code was a doddle. You run Monkey, open the code, hit F5, bingo!
If you open the resulting project in XCode, you can then run it on your iOS Device.
\o/yeay\o/
.. or at least, yeay if your iOS Device is having a good day, otherwise you need to spend a fucking hour trying to get the damn Mac to notice it!
GAH!

...
anyway, the testing resulting in some nice framerates.
I can throw up HUGE sprites (640x640) at a rate of 100 per frame, while still keeping everything at 60fps!
I can equally get over 300 littler (64x64) sprites onscreen, at the same 60fps.

Basically, that's plenty, for a really nice background, some action, foreground, and then a bunch of particles.

.. hopefully my shite coding doesn't then slow it all down again, afterwards, 'cos I have a LOT of background stuff that needs coding in, too.

Plenty to do. much more testing to be done, and hopefully a lot of learning along the way.
.. I might even bother to clean up the code.
... nah, maybe not!

-=-=-
''Load, Next List!''
Sun, 13 Jan 2013, 09:39
rockford
Sounds like you're having a good start
Sun, 13 Jan 2013, 11:14
Jayenkai
This certainly took some doing..
(see timestamps between my two posts!)



One bit of code, three very different aspect ratios, all nice and scaled and switched, and everything!
Lots of head scratching to get that working nicely!

Note how the lower resolution (top right) doesn't use the Retina sprites.
Although you can't really see it, what with those sprites being nice and retro-chunky, I've actually got THREE sets of every single sprite (ffs!) due to the three main resolutions that Apple give us.
Shitty none-retina 320x240, Retina 640x480, and iPad Retina 2048x1536!!
My engine loads either image.png, image-hd.png or image-hd2.png, depending on the approximate size of the screen whilst loading. (iPad none-retina uses the same images as iPod retina, since they're close enough.)

And that's not just iOS. The code works equally well for HTML, and should (*should!) work nicely with all the other Monkey Targets, too.
*phew*
Now I just need to figure out why the iOS compilation isn't doing new-iPod-Wide, and then see about rotating the screen.
..
plenty more to do.

Jay's enjoying learning! Haven't done this in years!!!

Incase anyone's interested in the digits, they are as follows..
Scale of Sprites : Image Framerate : Game Update Rate - Sprite Limit* (Actual Display Resolution) (Ingame Resolution)

Sprite Limit is used in the sprite test thing, starts at 50, but can go right up to 2500. In HTML it starts to chug at about 750, give or take.
Actual resolution is what's onscreen, whereas ingame resolution is the one used by the coder.(jscrw/jscrh, if you've ever looked at my code before!)

-=-=-
''Load, Next List!''
Sun, 13 Jan 2013, 11:41
Dabz
The thing with Monkey is that you need to optimize your code off the bat, if you program in a sense that "the hardware will handle it" type set up (Basically, the one I've been doing for years because programming on a hefty PC had literally left me lazy), then, your inline to becoming gawp-eyed when you try a target and it runs like poo!

I've been there, done it, had a nice Match-3 engine up and running, all the hard work done (Because their buggers to do when you want commercial grade standard), ran it on a some targets, great, ran it on others (More notably, Android) and it collapsed to 2fps!

So, my recommendations are, optimize... optimize... optimize, sprite atlases, prebuild lists of objects (Like particles etc etc), keep the GC away from critical code, and most importantly, test your app on every platform as much as possible, dont write tons of gear for and just run in the HTML5 target.

I'm sure you look at this stuff anyway, but, it is important when developing for monkey, reminds me of the 8-bit days... Which is good!

Dabz

-=-=-
Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 8Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit
Sun, 13 Jan 2013, 12:37
Jayenkai
Indeed, practically every itty bitty function, I'm finding myself thinking about how well it'll work on every target. It's a real brain teaser!!



Apparently you can't have SUPER-HUGE sprites, of 1280x1280, even on iPad-retina. Might have to rethink my lovely rainbow menu system!

-=-=-
''Load, Next List!''
Sun, 13 Jan 2013, 12:54
Jayenkai
GLFW target on Mac works ok, but doesn't seem to like the 640x640 resolution on the menu's sprites, causing "quirkyness" and an eventual crash.
I'm assuming it'll be happier with 512x512. Will test later.
Meanwhile, a sound test has shown that iOS is happy with as much audio as you can imagine, while HTML5 craps out if you try doing more than about 8 channels at once! (Although that's probably system&browser based)
Also, HTML doesn't do audio pitch stuff, but at least iOS does

... Fuck, I've not made AGameAWeek, yet!!

-=-=-
''Load, Next List!''
Tue, 15 Jan 2013, 08:58
Jayenkai
I didn't do any Monkey work, yesterday, as I spent the day making a quicky shooty game in PMC, for AGAW!
Today, back to the Monkey, and I took some time redrawing my default-icons, so they look nice and super-high-definition.


Feel free to use these as required.

I also redrew my main menu, so it's now using actual sprites, instead of the retro-blown-up sprites. looks cheesy, and I might yet go back to retro-blown-up sprites, instead, but the point wasn't it's look.. the point was reducing the super-high-definition image sizes down from 1280x1280 to 1024x1024, and indeed, that seems to be all that the iPad Retina display needed, to get it all nice and working again.
woot!!

Menu screen working, icons doodled, now I need to make a nice "Paused" interface that works with keyboard, mouse, touchscreen and gamepad.
... oh, fucksocks..

-=-=-
''Load, Next List!''
Tue, 15 Jan 2013, 11:06
Jayenkai
Well, it does at least work with both mouse and touch! Going to have to add in some sort of keyboard/game pad support, though.
Here it is running on an iPad



\o/yeay\o/ Menu \o/yeay\o/

-=-=-
''Load, Next List!''
Wed, 16 Jan 2013, 11:05
Jayenkai
Menu screen enhanced by addition of buttons!!

Buttons are tappable, clickable, or keyboard pushable! Woot!
I also tweaked the pause menu, adding Escape to Pause and keyboard based functionality.
Nothing fancy, and I've not started adding Redefinable controls, yet, but the basics are in there.
Things are going well, so far, although I have realised my Sprite-Button maths is a bit screwy when it loads different sized sprites. *sigh*. That HAD to bite me in the arse, eventually!!

-=-=-
''Load, Next List!''
Thu, 17 Jan 2013, 06:54
Jayenkai

Lovely new addition of the day.
Bitmap Fonts!
\o/yeay\o/

They're not the best looking fonts in the universe, and unfortunately the lack of file-access has meant I've had to make to with monospaced fonts, but for the moment, it'll do the job that's intended.
.. So, that'll be the score display, then!!

It scales, but doesn't do rotation, won't recolour fast in HTML (Monkey Limit), and it's shit at centering, but .. the main bit works!!!
\o/yeay\o/

Also done today, I fixed the multi-resolution of sprite-button maths, and added my default "plink" noises all over the menu.

-=-=-
''Load, Next List!''
Thu, 17 Jan 2013, 07:33
Jayenkai
Half an hour later, I managed to get the maths working for rotated text!

huzzah!!
I'll probably never use that, but there you have it!

-=-=-
''Load, Next List!''
Thu, 17 Jan 2013, 08:34
9572AD
Do you load your images with the MidHandle flag?
I find that makes centering and non-wobbly rotation loads easier.

-=-=-
All the raw, animal magnetism of a rutabaga.
Thu, 17 Jan 2013, 08:38
Jayenkai
Yeah, it's the font centering that I can never quite get right, especially once you add NewLine into the mix.. grrr..

-=-=-
''Load, Next List!''
Thu, 17 Jan 2013, 09:14
Afr0
See this topic!

-=-=-
Afr0 Games

Project Dollhouse on Github - Please fork!
Thu, 17 Jan 2013, 09:21
Jayenkai
Keep in mind that I won't be using it for much text displaying, other than scores!! I don't need uber functionality! What's in there is plenty..

-=-=-
''Load, Next List!''
Fri, 18 Jan 2013, 08:51
Jayenkai
Today I might've got Gamepad support working.
I'm being a significantly lazy fucktard, today, and can't be arsed going upstairs to fetch the Xbox controller, to test the added functionality, but as far as I can tell, it oughta work.
...
Then I turned on the iCade to figure out how that works.
... Yeah, ok, nice and easy.
.. But fuck, I couldn't be arsed with that, today.
It's too sodding cold, and I hardly slept a wink, last night.
I'll do it tomorrow. .. And hope it works as easily as it looks!

-=-=-
''Load, Next List!''
Fri, 18 Jan 2013, 13:07
Jayenkai

View on YouTube
Sun, 20 Jan 2013, 07:44
Jayenkai


Holy crapnuts, was that difficult..
Not the score display, that bit was easy, it's just two strings sent to my wonderful new bitmap font text display routine.
The hard part was coming up with a multi-purpose reusable scoreboard function, as well as a way to load and save everything without breaking everything whenever any possible future additions/gamemodes get added into the mix.
Why so tricky?
Because Monkey only lets you store ONE variable.
ONE!!
Fucking one, ffs!!!

EVERYTHING has to be crammed into one chaotic string of insanity.
I'll be honest, I can cope with that as I've actually done similar things myself, lots of times, in lots of places.
Heck, even Socoder has a "Lots of data crammed into a single gigantic string" for every single user. (The "Which posts you've viewed" is a big-ass string!)
But to have ONLY ONE?!
All of the user's settings, all of the user's Badges, and then all the top 10 High scores and Last scores for each gametype/setting/difficulty.
That's a LOT of data to cram together.
As well as checksums along the way, and enough leeway to allow for new gametypes later, it took a lot of thinking, and rethinking, to get everything going.

I can already think of a couple of gameplay additions that would need more data, but I think I'll probably leave those until they're needed. .. I've already spent a good couple of hours working on this, today, and that's enough for just Scores!!

-=-=-
''Load, Next List!''
Sun, 20 Jan 2013, 10:14
rockford
Store just one variable? Does. Not. Compute.

Are you sure you're doing it right Jay? :S
Sun, 20 Jan 2013, 10:33
Dabz

EVERYTHING has to be crammed into one chaotic string of insanity.




Dabz

-=-=-
Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 8Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit
Sun, 20 Jan 2013, 10:39
Jayenkai
Yeah, SaveState(String$)
So, rather than being able to save Scoreboard[1], Scoreboard[2], Scoreboard[3], you instead go...
out$=Scoreboard[1]+"|"+Scoreboard[2]+"|"+Scoreboard[3]+"|"
out$=out$+Settings[1]+"|"+Settings[2]+"|"+Settings[3]+"|"
SaveState(out$)

Loading it back is just as mental, but luckily Monkey has a Split("|") function, so it's not as crazy as it might've been...

-=-=-
''Load, Next List!''
Sun, 20 Jan 2013, 13:35
9572AD
Remember, guys, everything Monkey does is compatible with a list of things including HTML5. That's why some things are a bit abstruse.

-=-=-
All the raw, animal magnetism of a rutabaga.
Sun, 20 Jan 2013, 14:27
rockford
Who came up with that convention? Bonkers.
Sun, 20 Jan 2013, 15:20
Jayenkai


These buttons are...
1. Really shit looking, unartistic, almost Windows 8 bad, rectangles of shit..
2. Misaligned chaos, requiring lots of trial and error to find suitable positions
3. Certainly not finished!!

But...
They DO work, and their functionality has been coded in such a way that iCade support should also be a doddle to implement, too!
I think.
.. Assuming Monkey even picks up the active Bluetooth keyboard.
.. It'd better bloody do, or I'm fucked!

Anyhoo, that's handy, I think, maybe... As is the 10-touch multitouch stuff!
\o/yeay\o/

More to come.. Tomorrow, I expect I'll be drawing a D-Pad!!

-=-=-
''Load, Next List!''
Sun, 20 Jan 2013, 20:51
CodersRule
9572AD Remember, guys, everything Monkey does is compatible with a list of things including HTML5. That's why some things are a bit abstruse.


Yeah, but it's really just horrible to have to store everything in a string. Couldn't they have just shoved in some under-the-hood serialization to make it at least LOOK smooth? I think that's something to the effect of what PlayMyCode does to save your state.
Mon, 21 Jan 2013, 01:05
Jayenkai


May or may not be useful to people. Use as required.

Space has been left for future button additions, like maybe having multiple buttons with different icons on them, but I can't be arsed thinking about all the different possibilities for future games, right now... sod that!!

-=-=-
''Load, Next List!''
Page : 1 2 Next 3 4 5 6 7 8 9
Prev