looking for AIRPLANE examples

Hi,

im new here obviusly just like the rest of you :slight_smile:

i love playing ‘atari 1997 combat’, where you get to duel another opponent using tanks or bi planes

are thier any clones or examples of such a thing already i can learn from ? [import]uid: 167959 topic_id: 29293 reply_id: 329293[/import]

Do you have an image/video? I Googled this but without much success, admittedly I was always more of a Nintendo person myself :wink:

If you let me know I can let you know if I’ve seen any source code that might be helpful to you.

Welcome to the community!

Peach :slight_smile: [import]uid: 52491 topic_id: 29293 reply_id: 117865[/import]

thanks

heres a video of what im refering too

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

thiers already an ipod app

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

[import]uid: 167959 topic_id: 29293 reply_id: 117895[/import]

Hey again,

OK, to start with you’d want to learn about the basics of Corona, including physics - namely collision detection which is clearly important in this kind of game.

There’s a mini series called Corona For Newbies with 4 parts available on http://Techority.com/ that I would suggest would be a good starting point for you. (Part 4 covers collision detection.) [import]uid: 52491 topic_id: 29293 reply_id: 117996[/import]

ok i just finished all 4 tutorials

i understand it all fine

best part i liked was about ‘keeping it on screen’,

the wrapit function explains how i could go about implementing the ability to fly off screen on one side and reppear on the opposite side, kinda like pacman but will be perfect for my bi planes.

saying this i still dont feel any more confident towards making a start or accomplishing my goal,

i know how to draw an image on the screen and alter the x.y coordinates but its more complicated than that the planes in the video seem to be rotating , flying upside down etc.

anyway i know how to set background color to blue, not sure how to make it completly random or different shades of blue… and i know how to add buttons so maybe ill start thier but i dunno hope i stick at it

collision tutorial was good aswell, i can use it for bullets or colliding with other planes/balloon tower or flying to low and hitting the floor lots of possibilities

heres what i managed to do

http://postimage.org/image/t300hzbr9/

similar to the menu in the video, sky backdrop, bars on eitherside, then the buttons
but i realised i cant texture the rectangles only color them? so thats why my arrow is in the middle
of the screen but thats another problem, my images are too large

update

http://s8.postimage.org/lj0b4x7fp/display.png

added scorelabels but i think im going to stop feel like im doing it wrong
i always got to rotate the device everytime i relaunch the simulation
and obviusly my labels aint the proper rotation so none of this makes sence,
was i suppose to design it upright

http://s10.postimage.org/e91dcyyd5/display2.png [import]uid: 167959 topic_id: 29293 reply_id: 118017[/import]

Hey there,

Glad you liked the wrapit function, it’s pretty useful.

So, moving the planes - are you going to use a dpad or a joystick? There is a joystick by Alejandro (Dunkel Games) in the code exchange that also rotates the player automatically based on movement.

For random blues, are you using an image or a newRect?

Take it step by step - what is the first thing you need to do? The background and buttons. Are you having problems with any of that? If so, is it just the random blue?

Step by step, ask specific questions, get help and move on to the next thing :slight_smile:

Peach

PS - Wow, Second Life (screenshot) - that takes me back! [import]uid: 52491 topic_id: 29293 reply_id: 118143[/import]

i dont want to use alejandros code, defeats the purpose of making my own game if i dont understand how it works… i beleive i seen it being used in minisquadron and a few other games anyway forget about the planes trying to make something else now

i prefer your dpad example i found on your website, i tried modifying it but ran into a problem

i want to do more than move in a certain direction, i want to face that direction so i can create a topdown 2d game for a man or vehicle

* i removed the down button, i dont need it
* now when i press left or right 15 times i complete a 360 degree turn very cool

my problems

  1. i have to constantly press left or right, i wanted to be able to move by holding the button down not having to keep tapping it.

  2. i cant seem to move UP/NORTH, obviusly i want to move in the direction im facing even if im rotated so lets pretend im using a car sprite… i wanna make sure the bonnets always at the front so when i rotate at an angle and press UP, i wanna move forward in that direction u get me?

http://s13.postimage.org/dkymydp3b/car.jpg

function left:touch()
tank.rotation = tank.rotation + 12
end
left:addEventListener(“touch”,left)

function right:touch()
tank.rotation = tank.rotation - 12
end
right:addEventListener(“touch”,right)

  • yea im addicted to secondlife, stole my youth [import]uid: 167959 topic_id: 29293 reply_id: 118478[/import]

My opinion (and that of most developers, I daresay) is that using libraries like the one Alex put up for a joystick is simply a way to save time - you should make an effort to understand the code of course but prewritten code saves time for common functions.

For example, if you aren’t using any third party code you will need to figure out how you are managing scenes, because that rules out both Storyboard and Director - what are your plans for that?

  1. Use a timer to apply the rotation, cancel in ended event phase.

  2. This is where math comes in - I’d suggest looking at the rum library, although you can of course write this yourself too. [import]uid: 52491 topic_id: 29293 reply_id: 118635[/import]