PDA

View Full Version : i wanted to see if i could create a game for android



m0nde
07-14-2013, 09:03 AM
the game's called "OH MY GOD, CAG!"

you're caught a surreal cag dreamscape :(

if you move it plays "A Horse With No Name" and the music stops when you stop
if you press the mouse button it whinnys


http://www.youtube.com/watch?v=sFMK2N1gtp4

m0nde
07-14-2013, 09:05 AM
it's running at 1920 x 1048 so i guess that's why it fucked up streaming
i'll post my source code and post links to the executable soon

rubycalaber
07-14-2013, 09:10 AM
I make these noises to myself whenever I see anyone post the name "cag" http://vocaroo.com/i/s0UeVgTVj5tm

rubycalaber
07-14-2013, 09:11 AM
I love being me, I'm only ever a few milliseconds away from hearing something funny whenever I want to by just opening my mouth and letting comedy come out

m0nde
07-14-2013, 09:12 AM
it's in some shit basic in this thing called AGK
it allows you to do cross platform stuff


SetDisplayAspect( 4.0/3.0 )

dim spriteArray[100]

` load media
loadImage(6,"cone.png")
loadImage(1,"horsehead.png")
loadImage(2,"me.png")
loadImage(3,"me3.png")
loadImage(4,"me2.png")
loadImage(5,"me1.png")

loadSound(1,"bubbles.wav")
loadSound(2,"whinny.wav")
loadSound(3,"whinny2.wav")
loadSound(4,"gallop.wav")
loadSound(5,"trot.wav")

loadMusic(1,"horse_with_no_name.mp3")
playMusic(1,1)

` create arrogant cunting paki
frame = 2
paki = createSprite(0)
AddSpriteAnimationFrame(paki, 2)
AddSpriteAnimationFrame(paki, 3)
AddSpriteAnimationFrame(paki, 4)
AddSpriteAnimationFrame(paki, 5)
setSpriteSize(paki,6,-1)
setSpriteOffset(paki,3,getSpriteHeight(paki)/2)
setSpritePositionByOffset(paki,50,50)
setSpriteDepth(paki,50)
fixSpriteToScreen(paki,1)

` create sprite array with parallax scrolling
for s=1 to 100
` create a sprite using either a cone or a horsehead
pic=random(0,1)
if pic=0
spr = createSprite(1)
else
spr = createSprite(6)
endif

` get a random depth, color and alpha
d = random(1,100)
r = random(0,255)
g = random(0,255)
b = random(0,255)
if pic=0
a = random(128,255)
else
a=random(192,255)
endif


` set the sprite size and depth
setSpriteDepth(spr,d)
setSpriteSize(spr,random(1.0,20.0)-(d/random(20.0,100.0)),-1)
setSpriteColor(spr,r,g,b,a)

` set it at a random position in our world
setSpritePosition(spr,random(0,100),random(0,100))

` add to the array
spriteArray[s] = spr
next

` oh my god
do
` view offset
vx# = getViewOffsetX()
vy# = getViewOffsetY()

` 100 sprites
for s=1 to 100
spr = spriteArray[s]
d# = getSpriteDepth(spr)

`set sprite offsets based on the view offset
Xoff# = -(d#-100.0)*0.01*vx#
Yoff# = -(d#-100.0)*0.01*vy#
setSpriteOffset(spr,Xoff#,Yoff#)

`check it
wx# = getSpriteX(spr)
wy# = getSpriteY(spr)
sx# = worldToScreenX(wx#)
sy# = worldToScreenY(wy#)

`if not a new position
if sx#<0 then setSpritePosition(spr,wx#+100,wy#)
if sx#>100 then setSpritePosition(spr,wx#-100,wy#)
if sy#<0 then setSpritePosition(spr,wx#,wy#+100)
if sy#>100 then setSpritePosition(spr,wx#,wy#-100)
next

` adjust the view and orientation of the paki
x# = getDirectionX()
y# = -getDirectionY()*0.2
a# = getSpriteAngle(paki)
setSpriteAngle(paki,a#+x#)
setViewOffset(getViewOffsetX()+y#*cos(90-a#),getViewOffsetY()-y#*sin(90-a#)*getDisplayAspect())

` animate the paki
if abs(y#)>0.1
if GetMusicExists(1)
resumemusic()
else
playmusic(1)
endif
frame = frame+1
print("c-c-c-c-c-c")
if frame>4 then frame=2
print("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
print("gg")
else
pausemusic()
frame = 1
print("oh my god!")
text=random(1,3)
if text=1 then print("i'm going to puke...")
print("")
if text=2 then print("ffffffffffffffffuuuu")
print("")
if text=3 then print("i can't even hear what she's saying!")
print("")
endif

setSpriteFrame(paki,frame)

if GetPointerPressed()=1
playsound(3)
endif

sync()
loop

m0nde
07-14-2013, 09:13 AM
record yourself screaming "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAG" and i'll add it to the game

timmy
07-14-2013, 09:16 AM
I make these noises to myself whenever I see anyone post the name "cag" http://vocaroo.com/i/s0UeVgTVj5tm

you have some serious autism son you might wanna to get it checked out

timmy
07-14-2013, 09:17 AM
monde couldnt write a game app to save his marriage

Camoron
07-14-2013, 09:18 AM
I only scream her true name and even then I'm down to only a few times a week after waking from a night terror.

rubycalaber
07-14-2013, 09:21 AM
record yourself screaming "CAAAAAAAAAAAAAAAAAAAAAAAAAAAAAG" and i'll add it to the game

http://vocaroo.com/i/s0ht4CyqblYp

timmy
07-14-2013, 09:23 AM
http://vocaroo.com/i/s0ht4CyqblYp

have you considered therapy?

rubycalaber
07-14-2013, 09:27 AM
have you considered therapy?

http://vocaroo.com/i/s0U9PG6IunA7

m0nde
07-14-2013, 09:46 AM
okay modified it


loadSound(1,"cag_scream.wav")
loadSound(2,"whinny2.wav")

and


if GetPointerPressed()=1
playsound(random(1,2))
endif

fanfare
07-14-2013, 02:00 PM
wow nice monde

rootbeer
07-14-2013, 02:02 PM
monde create a server for minecraft instead

juji
07-14-2013, 02:08 PM
Use ratio to target for android resolutions.

Gentleman Doli
07-14-2013, 02:08 PM
m0nde will you teach me how to be cool like you

Gentleman Doli
07-14-2013, 02:09 PM
im writing a program for android too m0nde, its called angry bird 2: you wouldnt like me when im angrey,

juji
07-14-2013, 02:12 PM
funny, horse head and cone tits

Gentleman Doli
07-14-2013, 02:14 PM
m0nde likes
Leeroy Jenkins

by Leeroy Jenkins
35,568,549 views

Camoron
07-14-2013, 03:53 PM
i fail to see how this qualifies as a game

m0nde
07-14-2013, 04:24 PM
okay, better physics, learning this shitty language
now i'm going to add some actual points and thing


SetDisplayAspect( 16.0/10.0 )

dim spriteArray[100]
alpha=128
SetRawMouseVisible(0)

` load media
bkgd = CreateSprite(loadImage("horsegirl.jpg"))
SetSpriteSize(bkgd,110,-1)
fixSpritetoScreen(bkgd,1)
setSpriteDepth(bkgd,255)

loadImage(2,"horsehead.png")
loadImage(3,"cone.png")

loadImage(4,"me.png")
loadImage(5,"me3.png")
loadImage(6,"me2.png")
loadImage(7,"me1.png")

loadImage(8,"lizard.png")
loadImage(9,"lizard2.png")
loadImage(10,"lizard3.png")
loadImage(11,"lizard4.png")
loadImage(12,"lizard5.png")
loadImage(13,"lizard6.png")
loadImage(14,"lizard7.png")
loadImage(15,"lizard8.png")
loadImage(16,"lizard9.png")

loadSound(1,"cag_scream.wav")
loadSound(2,"whinny2.wav")

loadMusic(1,"horse_with_no_name.mp3")
playMusic(1,1)

` create arrogant cunting paki
frame = 2
paki = createSprite(0)
for fr=4 to 7
AddSpriteAnimationFrame(paki, fr)
next
setSpriteSize(paki,10,-1)
setSpriteOffset(paki,3,getSpriteHeight(paki)/2)
setSpritePositionByOffset(paki,50,50)
setSpriteDepth(paki,50)
fixSpriteToScreen(paki,1)

`create lizard
lizard = createSprite(0)
for fr=8 to 16
AddSpriteAnimationFrame(lizard, fr)
next
setSpriteSize(lizard,10,-1)
setSpriteOffset(lizard,3,getSpriteHeight(lizard)/2)
setSpritePositionByOffset(lizard,GetPointerX()+random(5,10),GetPointerY()-random(5,10))
setSpriteDepth(lizard,random(0,50))
fixSpriteToScreen(lizard,1)
PlaySprite(lizard,10,1,8,16)

` create sprite array with parallax scrolling
for s=1 to 100
` create a sprite using either a cone or a horsehead
spr = createSprite(random(2,3))

` get a random depth, color and alpha
d = random(1,100)
r = random(0,255)
g = random(0,255)
b = random(0,255)
if pic=0
a = random(128,255)
else
a = random(192,255)
endif

` set the sprite size and depth
setSpriteDepth(spr,d)
setSpriteSize(spr,random(1.0,20.0)-(d/random(15.0,200.0)),-1)
setSpriteColor(spr,r,g,b,alpha)
setSpriteColor(bkgd,255,255,255,alpha)

if ( direction = 0 )
alpha = alpha - 1
if ( alpha < 0 )
direction = 1
endif
endif

if ( direction = 0 )
alpha = alpha + 1
if ( alpha > 255 )
direction = 0
endif
endif

SetSpriteAngle (spr,angle)
angle=angle+1
SetSpriteSize (spr, GetSpriteWidth(spr) -1, GetSpriteHeight (spr) -1)

` set it at a random position in our world
setSpritePosition(spr,random(0,100),random(0,100))

` add to the array
spriteArray[s] = spr
next

` oh my god
do

` view offset
vx# = getViewOffsetX()
lizardx# = getSpriteX(lizard)
vy# = getViewOffsetY()
lizardy# = getSpriteY(lizard)

` 100 sprites
for s=1 to 100
spr = spriteArray[s]
d# = getSpriteDepth(spr)

`set sprite offsets based on the view offset
Xoff# = -(d#-100.0)*0.01*vx#
Yoff# = -(d#-100.0)*0.01*vy#
setSpriteOffset(spr,Xoff#,Yoff#)

`check it
wx# = getSpriteX(spr)
wy# = getSpriteY(spr)
sx# = worldToScreenX(wx#)
sy# = worldToScreenY(wy#)

`if not a new position
if sx#<0 then setSpritePosition(spr,wx#+100,wy#)
if sx#>100 then setSpritePosition(spr,wx#-100,wy#)
if sy#<0 then setSpritePosition(spr,wx#,wy#+100)
if sy#>100 then setSpritePosition(spr,wx#,wy#-100)
next

` adjust the view and orientation of the paki
x# = getDirectionX()
y# = -getDirectionY()*0.2
a# = getSpriteAngle(paki)
setSpriteAngle(paki,a#+x#)
setViewOffset(getViewOffsetX()+y#*cos(90-a#),getViewOffsetY()-y#*sin(90-a#)*getDisplayAspect())
setSpritePositionByOffset(lizard,GetPointerX(),GetPointerY())

` animate the paki and lizard
if abs(y#)>0.1
if GetMusicExists(1)
resumemusic()
else
playmusic(1)
endif
frame = frame+0.75
if frame>4 then frame=2

else
pausemusic()
frame = 1
print("oh my god!")
text=random(1,3)
if text=1 then print("i'm going to puke...")
print("")
if text=2 then print("ffffffffffffffffuuuu")
print("")
if text=3 then print("i can't even hear what she's saying!")
print("")
endif

setSpriteFrame(paki,frame)

if GetRawMouseLeftPressed()=1
playsound(1)
c=c+1
a=a+1
g=g+1
createtext(c,"c-c-c-c-c-c")
createtext(a,"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa")
createtext(g,"gg")
settextposition(c,wx#,wy#)
settextposition(a,wx#,wy#+gettexttotalheight(c))
settextposition(g,wx#,wy#+gettexttotalheight(c)+gettexttotalheight(a))
endif
if GetRawMouseLeftReleased()=1 then playsound(2)
if GetRawMouseRightPressed()=1
spr = GetSpriteHit (wx#,wy#)
createparticles(getpointerx(),getpointery())
endif

sync()
loop

m0nde
07-14-2013, 06:17 PM
okay, created some goals now

created a 3D space with land mines and a target

you have to reach that point by following the intensity of the background and the music volume

you can use your lizard to fight off enemies

working on particle effects now

juji
07-15-2013, 05:49 AM
Thats BASIC old as fuck

m0nde
07-15-2013, 05:52 AM
exporting to html5

juji
07-15-2013, 06:03 AM
Does AGK export HTML5?

m0nde
07-15-2013, 06:20 AM
supports shit basic and c++
i only have the trial version which only has the basic thing in it

juji
07-15-2013, 06:28 AM
Heh, did you study all game builder softwares?

m0nde
07-15-2013, 06:33 AM
these two are much easier than game creation studio or some others i've found
i prefer code to a gui, idk why

juji
07-15-2013, 06:38 AM
I never liked Unity3D

timmy
07-15-2013, 08:55 AM
too bad you cant have a marriage in code but instead its in real life gui

Autistic Spectrum
07-15-2013, 09:14 AM
i dated an old cobol program once,it controlled the traffic lights in my city, we grew apart, but man it was pretty great while it lasted