- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can find out more here; www.appgamekit.com
We will be supporting Ultrabook features and more Intel based technology soon in AGK.
Rick Vanner
Director
The Game Creators Ltd
www.thegamecreators.com
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
-Thai
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Greetings. I am trying to make a game App with some free examples provided in AGK I pasted together. When I run this on Windows XP 32 bit. I lost some space from top and bottom half of the screen and I can't get the music to play. The App starts up with no error messeges. The free example demo's also works with no error messeges. Any suggestions on what I need to do to run this App so I can hear the sound I inserted. Below is what I made so far. I also have put sound and image files in the media folder for that App. I tried mp3,oog,aac and wav with no result. Any suggestions greatly appreciated. Thanks from Ron!!
// set the display aspect
SetDisplayAspect ( 320 / 480)
// top half of pitch
LoadImage ( 1, "backgroundTop.png" )
CreateSprite ( 1, 1 )
SetSpriteSize ( 1, 100, -1)
// bottom half of pitch
LoadImage ( 2, "backgroundBottom.png" )
CreateSprite ( 2, 2 )
SetSpriteSize ( 2, 100, -1 )
SetSpriteY ( 2, GetSpriteHeight ( 1 ) )
// player
LoadImage ( 3, "blue-standing.png" )
CreateSprite ( 3, 3 )
SetSpriteSize ( 3, 2.5, -1 )
SetSpritePosition ( 3, 50, 50 )
// player animation
AddSpriteAnimationFrame ( 3, LoadImage ( "blue-running-1.png" ) )
AddSpriteAnimationFrame ( 3, LoadImage ( "blue-running-2.png" ) )
AddSpriteAnimationFrame ( 3, LoadImage ( "blue-running-3.png" ) )
AddSpriteAnimationFrame ( 3, LoadImage ( "blue-running-4.png" ) )
AddSpriteAnimationFrame ( 3, LoadImage ( "blue-running-5.png" ) )
AddSpriteAnimationFrame ( 3, LoadImage ( "blue-running-6.png" ) )
// a virtual joystick
AddVirtualJoystick ( 1, 8, 90, 10 )
// main loop
do
// display instructions
Print ( "Use the virtual joystick to" )
Print ( "control the player" )
// get input from joystick
joystickX# = GetVirtualJoystickX ( 1 )
joystickY# = GetVirtualJoystickY ( 1 )
// find player position
x# = GetSpriteX ( 3 )
y# = GetSpriteY ( 3 )
// work out movement direction
x1# = x# - joystickX#
y1# = y# - joystickY#
// face the correct angle
angle# = ATanFull ( x1# - x#, y1# - y# )
SetSpriteAngle ( 3, angle# )
// update player position
SetSpritePosition ( 3, GetSpriteX ( 3 ) + ( joystickX# / 5.0 ), GetSpriteY ( 3 ) + ( joystickY# / 5.0 ) )
// scroll the screen
SetViewOffset ( 0.0, y# - 50 )
// when there is no input stop animation
if ( joystickX# = 0.0 and joystickY# = 0.0 )
StopSprite ( 3 )
SetSpriteFrame ( 3, 3 )
else
// play animation
if ( GetSpritePlaying ( 3 ) = 0 )
PlaySprite ( 3, 10, 1, 2, 7 )
endif
endif
// ensure sprite cannot move past left of screen
if ( GetSpriteX ( 3 ) < 6)
SetSpriteX ( 3, 6 )
endif
// ensure sprite cannot move past right of screen
if ( GetSpriteX ( 3 ) > 90 )
SetSpriteX ( 3, 90 )
endif
// ensure sprite cannot move past top of screen
if ( GetSpriteY ( 3 ) < 10 )
SetSpriteY ( 3, 10 )
endif
// ensure sprite cannot move past bottom of screen
if ( GetSpriteY ( 3 ) > 290)
SetSpriteY ( 3, 290 )
endif
// update contents of screen
Sync ( )
loop
----------------------------------------------------------------------------------------------------------------------Everything below this Line Dont Work
backdrop = CreateSprite ( LoadImage ( "backgroundBottom.png" ) )
SetSpriteSize ( backdrop, 100, 100 )
LoadMusic ( 1, "Distortation.ogg" )
PlayMusic ( 1, 1 )
do
Sync ( )
loop
------------------------------------------------------------------------------------------------------------------------Then this too didn't work
Function LoadAndStartMusic ()
LoadMusic ( 1,"Distortation.ogg" )
PlayMusic ( 1,1)
EndFunction
---------------------------------------------------------------------------------------I dont see Adverts box either
// Monetization : Adverts
// Introduced in build 107
// display a background
backdrop = CreateSprite ( LoadImage ( "backgroundBottom.png" ) )
SetSpriteSize ( backdrop, 100, 100 )
rem InnerActive allows advert positioning (Win/Mac/Android/etc)
SetInnerActiveDetails("insertinneractivecodehere")
rem Create the advert
CreateAdvert(0,1,2,1)
rem Set standard size, centered at bottom advert for this screen (100x100)
SetAdvertPosition(0,89,100)
// main loop
do
// update the screen
Print("Advertising commands active...")
Sync ( )
loop
rem Free usages
DeleteAdvert()
rem launch own website at any time
OpenBrowser("http://www.thegamecreators.com")
// add a logo to the screen and fix its position
LoadImage ( 3, "RaceRun.png" )
CreateSprite ( 3, 3 )
FixSpriteToScreen ( 3, 1 )

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page