Page 2 of 2 FirstFirst 12
Results 11 to 18 of 18

Thread: new project, need some help!

                  
   
  1. #11
    GP2X Coder/Moderator
    Join Date
    Jan 2006
    Posts
    1,678
    Rep Power
    87

    Default

    Dont use Lua for the project. It wont be fast enough to do what you intend to to my knowledge.

  2. #12
    DCEmu Pro jman420's Avatar
    Join Date
    Oct 2005
    Location
    Colorado, USA
    Posts
    756
    Rep Power
    76

    Default

    Quote Originally Posted by dtothabreezy
    it took my life away from me after i beat the game thing though it sorta got boring made a lvl 20 newb the happiest noob ever i jus gave all of my stuff to him neva going back to that game
    Well, I feal bad for you, you kind of have to get set on doing somthing on RS, and I always had 4 or 5 friends on at a time, so I always had someone to talk to, and somthing to do... I got to a level 96 combat 1398 total level account, and it gets much more fun as you get up in levels..

    And there is NO WAY to beat the game, you may have done one of the quests, but you can not beat the game untill you out-rank zezzima on the highscores lol.

  3. #13
    DCEmu Newbie
    Join Date
    May 2005
    Posts
    25
    Rep Power
    0

    Default

    Quote Originally Posted by yaustar
    Dont use Lua for the project. It wont be fast enough to do what you intend to to my knowledge.
    unfortunately i don't hold a bachelor of science or a master of science degree so i'll not be throwing myself in at the deep end with c++ just yet.

    actually i'm trying to learn something in lua right now, and someone might be able to help. i'm doing a simple pong variant and i want to rotate an image on screen by player control.

    i've got the controls bit sussed but i've no idea how to rotate the image. basically i want to rotate a full screen png clockwise (with the axis in the centre of the image) using the right shoulder button and anticlockwise with the left shoulder button, but i can't find anything of use. anyone have any ideas or decent resources.. this is in lua by the way.

  4. #14
    GP2X Coder/Moderator
    Join Date
    Jan 2006
    Posts
    1,678
    Rep Power
    87

    Default

    There is no direct support from Lua player to rotate the image.

    You can do this by either uisng matrix math (rotation matrixes) and directly manlipulate the pixels on the surface/buffer/image.

    Or

    Have predefined rotations of the image,

  5. #15
    DCEmu Pro jman420's Avatar
    Join Date
    Oct 2005
    Location
    Colorado, USA
    Posts
    756
    Rep Power
    76

    Default

    well, and if you think about it, Pong never had rotation anything, all you realy need is collision information, and some math to tell the ball how to bounce off. and of course Movement controlls, and maybe a scoring system

    but the scoring system would be easiest of all, just make a variable named 'player1score' set it to = 0
    and with the collision information, tell the game that if the ball hits one of the screen boundry's (left or right) that it should add for the side that would add a point. and then screenrint the variable.

    Same thing with player2.

    I dont know how to rotate, but from Yaustar's animation code, I figured out a way to display a picture from a tiled PNG without animating it, so it would be possible for you to make an image with the angles you want, and just display the images at the time you want them rotated (this would make it so you could have 4-8-12-16 identical angles depending on how many times you wanted to be able to angle it but if this was going to be one of the paddles, or anything that would require collision information, this probobly wouldnt work, because I'm not sure it would know where the solid color started, and if it would bounce off from there, or the outer box edge.

    I'm not sure if I helped at all, but I hope I did

  6. #16
    DCEmu Newbie
    Join Date
    May 2005
    Posts
    25
    Rep Power
    0

    Default

    right you are... since i'm no mathematician, i guess i'll go with controlling an animation. is there any way of detecting collision between a certain colour in the image and another object.

  7. #17
    GP2X Coder/Moderator
    Join Date
    Jan 2006
    Posts
    1,678
    Rep Power
    87

    Default

    You can get pixel information from an image/surface (check the LuaPlayer wiki) so in this case, it be a collision with a box and a point.

  8. #18
    DCEmu Newbie
    Join Date
    May 2005
    Posts
    25
    Rep Power
    0

    Default

    excellend help. cheers

    the reason for rotation is that it's not just regular old pong... basically the paddle is just a curved section of a circle and there is only one paddle. the ball starts in the middle of the screen and you have to rotate the paddle round it to keep it in play.

Page 2 of 2 FirstFirst 12

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •