android
  #1  
Old 03-07-2010, 08:34 AM
blikbier's Avatar
blikbier blikbier is offline
Junior Member
 
Join Date: Feb 2010
Location: Netherlands
Posts: 98
Talking Gunz (Add; Accelerometer function!)

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
M16
Famas
Barrett
Spas12
GausGun
M203
Fal

Edit 26/7;
Add accelerometer!
Attached Images
File Type: png background1.png (68.1 KB, 190 views)
File Type: png magnum3.png (66.4 KB, 182 views)
File Type: png spas12na.png (34.9 KB, 174 views)
File Type: jpg accel.jpg (31.8 KB, 180 views)
Attached Files
File Type: zip Gunz.zip (4.12 MB, 1042 views)

Last edited by blikbier; 07-27-2010 at 11:32 AM.
Reply With Quote

Advertisement [Remove Advertisement]

  #2  
Old 03-07-2010, 09:39 AM
Mr Wunderbar's Avatar
Mr Wunderbar Mr Wunderbar is offline
Junior Member
 
Join Date: Jan 2010
Posts: 93
Default

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

  #3  
Old 03-07-2010, 09:55 AM
blikbier's Avatar
blikbier blikbier is offline
Junior Member
 
Join Date: Feb 2010
Location: Netherlands
Posts: 98
Default

If it could I am very happy
Reply With Quote

  #4  
Old 03-07-2010, 10:54 AM
RobertsAccount's Avatar
RobertsAccount RobertsAccount is offline
X-Fi2 App Master
 
Join Date: Jan 2010
Location: UK
Posts: 310
Default

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...
Reply With Quote

  #5  
Old 03-07-2010, 12:08 PM
Habhome's Avatar
Habhome Habhome is offline
Moderator
 
Join Date: Jan 2010
Location: Sweden
Posts: 1,079
Default

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.
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine
Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it!
Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it.
Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^
Reply With Quote

  #6  
Old 03-07-2010, 12:16 PM
blikbier's Avatar
blikbier blikbier is offline
Junior Member
 
Join Date: Feb 2010
Location: Netherlands
Posts: 98
Default

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

@Habhome, largely yes, anyone know a solution?
Reply With Quote

  #7  
Old 03-07-2010, 12:21 PM
Habhome's Avatar
Habhome Habhome is offline
Moderator
 
Join Date: Jan 2010
Location: Sweden
Posts: 1,079
Default

Quote:
Originally Posted by blikbier View Post
@Habhome, largely yes, anyone know a solution?
As I suspected. And yes, I know the exact solution to the problem. It is very simple.

In MAIN.LUA:
Code:
while 1 do 
	   if (control.read()==1) then
			if (control.isTouch() == 1) and (touch.click() == 1) then
				touch_x, touch_y = touch.pos()
				mapPlay()
			elseif (control.isButton()==1) and (button.click() == 1) then
					stop = wav.load("stop.wav")
					stop:play()
					stop:close()
					break
			end
		else
		  os.sleep(10)
		end
	end
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.
__________________
"If you are good enough at English to apologize, then there is no need to." - A good friend of mine
Discovered something about the X-Fi2 you think others may not know? Post it here so others can learn about it!
Have a question about X-Fi2 apps? Consult the FAQ before creating a thread about it.
Like my work? Tell your friends. Don't like it? Tell me so I can improve. ^.^
Reply With Quote

  #8  
Old 03-07-2010, 12:24 PM
RobertsAccount's Avatar
RobertsAccount RobertsAccount is offline
X-Fi2 App Master
 
Join Date: Jan 2010
Location: UK
Posts: 310
Default

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
Attached Images
File Type: png background.png (110.2 KB, 73 views)
Reply With Quote

  #9  
Old 03-07-2010, 12:49 PM
blikbier's Avatar
blikbier blikbier is offline
Junior Member
 
Join Date: Feb 2010
Location: Netherlands
Posts: 98
Default

@Habhome, :O you are amazing

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

  #10  
Old 03-07-2010, 01:00 PM
RobertsAccount's Avatar
RobertsAccount RobertsAccount is offline
X-Fi2 App Master
 
Join Date: Jan 2010
Location: UK
Posts: 310
Default

If you could tell me twhich guns you're planning to add, I'll add the appropriate buttons to the menu
Reply With Quote

  #11  
Old 03-08-2010, 03:02 AM
Xeroo Xeroo is offline
Junior Member
 
Join Date: Feb 2010
Posts: 10
Default

@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.
Reply With Quote

  #12  
Old 03-08-2010, 08:06 AM
RobertsAccount's Avatar
RobertsAccount RobertsAccount is offline
X-Fi2 App Master
 
Join Date: Jan 2010
Location: UK
Posts: 310
Default

Quote:
Originally Posted by Xeroo View Post
@RobertsAccount: Nice photoshop editing Keep up the good work!
Thank you
Reply With Quote

  #13  
Old 03-08-2010, 12:18 PM
Brett_val's Avatar
Brett_val Brett_val is offline
Senior Member
 
Join Date: Jan 2010
Location: The Netherlands
Posts: 636
Default

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.
Reply With Quote

  #14  
Old 03-08-2010, 12:31 PM
blikbier's Avatar
blikbier blikbier is offline
Junior Member
 
Join Date: Feb 2010
Location: Netherlands
Posts: 98
Default

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

  #15  
Old 03-08-2010, 12:40 PM
ThievingSix ThievingSix is offline
Member
 
Join Date: Aug 2008
Posts: 218
Default

Maiet's gonna kill you =P. Either way, I'd change the name and the title picture...
__________________
Only ONE more functions in the Wiki need addressing!
Zen X-Fi2 LUA Wiki
Want to protect your applications? Click Here!
Tower Defense Thread
Zen Lock - Protect Your Zen!
Reply With Quote

  #16  
Old 03-09-2010, 10:21 AM
blikbier's Avatar
blikbier blikbier is offline
Junior Member
 
Join Date: Feb 2010
Location: Netherlands
Posts: 98
Default

-

Last edited by blikbier; 03-09-2010 at 10:59 AM.
Reply With Quote

  #17  
Old 03-09-2010, 12:47 PM
RobertsAccount's Avatar
RobertsAccount RobertsAccount is offline
X-Fi2 App Master
 
Join Date: Jan 2010
Location: UK
Posts: 310
Default

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!
Attached Images
File Type: png background.png (97.8 KB, 45 views)
Reply With Quote

  #18  
Old 03-09-2010, 12:55 PM
blikbier's Avatar
blikbier blikbier is offline
Junior Member
 
Join Date: Feb 2010
Location: Netherlands
Posts: 98
Default

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

  #19  
Old 03-09-2010, 01:31 PM
RobertsAccount's Avatar
RobertsAccount RobertsAccount is offline
X-Fi2 App Master
 
Join Date: Jan 2010
Location: UK
Posts: 310
Default

Quote:
Originally Posted by blikbier View Post
:O Beautiful!
Glad you like it!
Reply With Quote

  #20  
Old 03-09-2010, 06:18 PM
nikc4 nikc4 is offline
Junior Member
 
Join Date: Feb 2010
Location: In a cardboard box
Posts: 46
Default

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.

Disclaimer:
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.

Nick

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.

Last edited by nikc4; 03-11-2010 at 07:22 AM. Reason: Added some thoughts
Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 11:50 PM.