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.

Newcomers AppGameKit Corner / Percentage System %

Author
Message
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 9th Sep 2015 21:19 Edited at: 9th Sep 2015 21:20
Hope someone can have a quick look at this code just to see if I am getting my head around this %age system!



The code doesn't do anything other than initialise stuff and display the readings to the screen.
I have coded a joystick and buttons on there too and positioned them with the %age system.

I haven't used this method before and I said I would use this system in my next project but finding it hard to get my head around as it doesn't seem natural but I think I have the main parts ready and worked out with sizes etc.

or have I?

Cheers.

The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!
Crazy Programmer
AGK Developer
19
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 9th Sep 2015 21:53
Quote: "I haven't used this method before "

Neither have I, but it seems you are headed in the right direction.

Quote: "it doesn't seem natural "

The reason I don't use it
My brain just does not work this way.

Beta Test Age of Knights:https://play.google.com/apps/testing/com.CrazyProgrammerProductions.my_AgeOfKnights
Download JellyFish Dive:https://play.google.com/store/apps/details?id=com.CrazyProgrammerProductions.my_JellyFishSwim
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 9th Sep 2015 22:38
Quote: "My brain just does not work this way."


Yes I am really struggling with it, think I might be too old school but am persevering with it.


What I am not sure of at the moment is the distortion with sprites and blocks e.g.:



1st option you get a bit of distortion but can put say 10 x 10 blocks to fit on screen perfectly.
2nd keeps aspect ration correct for sprite but the Y will not be properly offset.

Hmmmm

Any ideas?

The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 10th Sep 2015 00:15
Right think I am getting it!!!

Just been messing with a simple level, code etc attached to just run but code also below.


I have created a simple level built into the code using the Mid command for text which seems pretty fast and so far on all devices broadcast it fills the screen correctly with not too much distortion.

Still not sure about the aspect being -1 as above yet though??

and yes those are gosub commands for now lol




The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!

Attachments

Login to view attachments
Crazy Programmer
AGK Developer
19
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Lost in AGK
Posted: 10th Sep 2015 00:57
I would of already broken some stuff just looking at that...

Hats off

I sat down earlier running some math on a piece of paper to try and figure out what you were needing.
After about 15 minutes I gave up

Its not that I cant do the math...Its mentally I cant visualize the whole process...Which means I need to study up some more on the subject.

Beta Test Age of Knights:https://play.google.com/apps/testing/com.CrazyProgrammerProductions.my_AgeOfKnights
Download JellyFish Dive:https://play.google.com/store/apps/details?id=com.CrazyProgrammerProductions.my_JellyFishSwim
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 10th Sep 2015 01:59
http://forum.thegamecreators.com/?m=forum_view&t=210965&b=41

I found this thread for a bit of help but a lot was trial and error and I still keep getting stuck now and again lol

The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!
BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 10th Sep 2015 11:47
I have now taken a different route to resolving the same problem, as my brain also does not work this way.

If I want full screen, I set the virtual width/height to the device width/height. Then I continue to work as I always did. Al of my positioning was done using getVirtualHeight/Width anyway, so everything still works 99% of the time.

If I need a specific work area then I simply fill the edges with content that never gets interacted with. For example, you may see sprites enter the screen earlier, but are unaffected by the action until they enter the work area.

Quidquid latine dictum sit, altum sonatur
TutCity is being rebuilt
SpecTre
Developer
21
Years of Service
User Offline
Joined: 24th Feb 2003
Location: UK
Posted: 10th Sep 2015 12:15
@batvink I think it's gradually making sense but that is a good idea too which I might try

The Amiga and Amos were great!
My website LEAP - Download Paint Pot here!

Login to post a reply

Server time is: 2024-04-16 12:44:45
Your offset time is: 2024-04-16 12:44:45