I feel like this shouldn't be extremely hard but I can't seem do figure it out. I am just starting to learn Gideros and wanted to make a game with your player at the bottom and you shoot at the enemies on top. The part that is giving me problems is creating the bullets at the player's location having it travel up and be deleted when it leaves the screen. Any help would be appreciated.
Comments
today I have no time, but tommorow I can show you some code.
Michael
And please load the gtween.lua and the easing.lua from the GTWEEN sample into this project:
Likes: atilim, Paulo777
After reading this thread, an idea popped up:
- A developer writes a sample code and uploads this to a server (e.g dropbox, etc)
- He then points to this link with a URI, like gdr://dropbox.com/folder/my_sample.gproj in this forum.
- Mriics clicks on this link in his phone (iPhone or Android)
- Mobile device recognizes this URI, and immediately runs Gideros Player
- Gideros Player runs the code.
This way, Mike doesn't have to put the code in this forum, but rather uploads it on a server, and then writes the link here.
When Mriics sees the post, but does not have access to his laptop, he can run Mike's sample on his mobile phone immediately.
Atilim says this can be implemented. We believe it's something "new", and maybe "innovative" since we haven't seen such a use case in any other frameworks out there.
FYI.
@Gorkem: That woudl only be usefull for one file and no resources, or?
fx = 0
fy = 0
function ShipMove(event)
local x, y = application:getAccelerometer()
local shipx, shipy = ship:getPosition()
fx = x + fx
fy = y + fy
shipx = (400 + fy * 400) * -.07
shipy = 480 - ship:getHeight()
if shipx < 0 then
shipx = 0
end
if shipx > 700 then
shipx = 700
end
ship:setPosition(shipx, shipy)
end
sorry I dont know how to imbed the code in the comment
There are two possible mehods:
1) Player first loads the gproj file and all assets on the server mentioned in gproj, like:
@mriics
Use:
But here is how I would do it:
shipx = shipx + x
I changed it to
shipx = shipx - y
And this worked
Could this be because it is in landscape.
Before I changed it, it would move based on the wrong axis.
Possible it correspond with "Application:getLogicalWidth()"
p.s. Sorry for bad english.