abi>>forums (http://www.anythingbutipod.com/forum/index.php)
-   Download Zen X-Fi2 Games & Applications (http://www.anythingbutipod.com/forum/forumdisplay.php?f=223)
-   -   Gunz (Add; Accelerometer function!) (http://www.anythingbutipod.com/forum/showthread.php?t=53173)

blikbier 03-07-2010 09:34 AM

Gunz (Add; Accelerometer function!)
5 Attachment(s)
Gunz guns is a simulator, you click on the gun and he shoots with animations! And it has than 9 guns with them!

And using the accelerometer, you can shoot without touching the screen!

And these are all guns!

.44 Magnum
Desert Eagle

Edit 26/7;
Add accelerometer!

Mr Wunderbar 03-07-2010 10:39 AM

very cool, im no programmer, but i could probably strip a menu from something else and edit it.

blikbier 03-07-2010 10:55 AM

If it could I am very happy :D

RobertsAccount 03-07-2010 11:54 AM

If you like I could create a menu image on Photoshop, I previously made the images for Gruffler's Memory app if you want to see my powers. ;) Wicked app by the way, very... satisfying... :)

Habhome 03-07-2010 01:08 PM

Having been competing with target shooting for about 5 years now I just had to check this out =P

And I'm guessing this one is also based on Jespuurs ZenDaft? Or on someone else's who's been based on it perhaps? Because it contains the same error as almost every Sound app out there, causing an error to occur right when you press home to exit.

blikbier 03-07-2010 01:16 PM

@RobertAccount, would be nice :D Do you know a simple code for a menu?

@Habhome, largely yes, anyone know a solution?

Habhome 03-07-2010 01:21 PM


Originally Posted by blikbier (Post 448956)
@Habhome, largely yes, anyone know a solution?

As I suspected. And yes, I know the exact solution to the problem. It is very simple.


while 1 do
          if (control.read()==1) then
                        if (control.isTouch() == 1) and (touch.click() == 1) then
                                touch_x, touch_y = touch.pos()
                        elseif (control.isButton()==1) and (button.click() == 1) then
                                        stop = wav.load("stop.wav")


As you can see in the marked part you are trying to open and play a non-existing sound. This is something Jespuur had in his app, but he forgot to add the sound itself I think, causing it to error for him. And everybody who uses his code seems to overlook the Main-loop. Perhaps they're afraid to edit it and cause problems.
Just erase those three lines and it'll work as it should.

RobertsAccount 03-07-2010 01:24 PM

1 Attachment(s)
Hmm... Unfortunately I'm not very good with code, maybe you should either have a look at bzdbbb or Gruffler's code and see how they've done it, or ask them for some help. But here is the menu image, tell me if you want anything adjusted :D

blikbier 03-07-2010 01:49 PM

@Habhome, :O you are amazing :D

@ RobertsAcount, Beautiful!! But there might be some additional (empty) boxes with? I make more guns:D

RobertsAccount 03-07-2010 02:00 PM

If you could tell me twhich guns you're planning to add, I'll add the appropriate buttons to the menu :)

Xeroo 03-08-2010 04:02 AM

@RobertsAccount: Nice photoshop editing :) Keep up the good work!

@Blikbier: Several issues:

- M16: there doesnt seem to be an icon for the menu.
- .44: error occurs when trigger is pulled.
- Shotgun: player crashes when trigger is pulled.

RobertsAccount 03-08-2010 09:06 AM


Originally Posted by Xeroo (Post 449135)
@RobertsAccount: Nice photoshop editing :) Keep up the good work!

Thank you :D

Brett_val 03-08-2010 01:18 PM

Still looking for a menu code? You can look in my app, Notepad. The code is a bit of a mess, but I'm willing to explain what I did.

I'm not a programmer so I guess a menu-code can be much more efficient and faster, but the menu in my app is working pretty well anyway.
In my app there is a button that calls for function menu(), which has it's own loop. Pressing on buttons will change a variable from 0 to 1 and changes all the other ones to 0.

But for your app it may be more useful to have the buttons call for functions, (which are the different main.lua files you made) and make the menu loop your main loop.

blikbier 03-08-2010 01:31 PM

Nice offer: D But I can not find code for the menu (Good than). Do you have a loose code of the menu?

ThievingSix 03-08-2010 01:40 PM

Maiet's gonna kill you =P. Either way, I'd change the name and the title picture...

blikbier 03-09-2010 11:21 AM


RobertsAccount 03-09-2010 01:47 PM

1 Attachment(s)
I made a few tweaks to the menu to make it look a bit more professional :) Nice update by the way, I'm loving it!

blikbier 03-09-2010 01:55 PM

:O Beautiful! I process it is right in there soon!

RobertsAccount 03-09-2010 02:31 PM


Originally Posted by blikbier (Post 449515)
:O Beautiful!

Glad you like it! :D

nikc4 03-09-2010 07:18 PM

Don't mean to be a pain here, but is it possible to add better functions, such as movement of the trigger, ammo that runs out, reloading, and for the rifles, auto firing while the trigger is held, semi when it is tapped, etc.?

What you've got so far is awesome, but it leaves me wanting.

Also, I'm not a programmer, so if I don't have a clue about what can/cannot be done, feel free to be brutally honest.


Edit: Also, the sound for the shotgun is kind of weak, and the shotgun you chose isn't an actual gun. It's an airsoft shotgun. It's an m47. I'd suggest a Mossberg 500 or Remington 870.

Also, for trigger movement, you could change the background when the trigger is tapped to the same gun with the trigger depressed and a muzzle flash, then change it back.

Edit x2: I'm picking this up. I don't know much about programming, but I've changed all the guns and sounds and stuff already, so I think I might be able to do this. I'm going to try to make some of my suggestions happen and upload the progress on here. I've got A desert Eagle, AK 47, Spas 12 and Barrett 50 cal right now. They've got good sounds too. A good resource for sounds is fpsbanana. Go to the skins section for counter strike and there'll be sounds for tons of different gun included in the zip files. I want to add accellerometer firing as well, but I don't know about that yet, I'm still trying to figure it out.

Now, time to make the guns move. Wish me luck.

All times are GMT -5. The time now is 09:21 AM.