Project 1 : Dev Thread
Forum » Game Design / Showcase » Project 1 : Dev Thread
started by: Extra_ammoExtra_ammo
on: 1213787727|%e %b %Y, %H:%M %Z|agohover
number of posts: 42
rss icon RSS: new posts
GUN METAL : Dev Thread
Extra_ammoExtra_ammo 1213787727|%e %b %Y, %H:%M %Z|agohover

Here it is. Gun Metal

Here is how the Bullet system works.

There is a weapon type that contains all the information required to make a bullet.

You will need this text file under the same directory. Save it as "Weapons.txt" .

Here is a template for making a new weapon.

new ; starts a new weapon
name= ; Display name
id= ; Weapon Id. Set to any integer.
bulsize= ; Bullet size
bulshape= ; Bullet Shape. 0 = line , 1 = quad , 2 = circle
bes= ; Barrel exit speed. Good speeds are 1 to 20
besacc= ; How much the bes varies
damage= ; Damage. Not yet used.
bullets= ; How many Bullets are fired per shot.
rof= ; Rate of fire. Amount of frames between each shot
reload= ; Flag, reload after clip is empty?
rldTime= ; Frames it takes to reload. 
clipSize= ; Shots per clip.
spread= ; How much the bullet angle varies when shot.
swarm= ; How much the bullet angle varies while flying.
weight= ; Weight of bullet. Suggested 0.01
phit= ; Hits other players?
ghit= ; Ground hitting mode. 0 = no-clip , 1 = Explode on contact , 2 = stick.
life= ; Amount of frames until the bullet explodes
lifeacc= ; How much the life varies
fragID= ; The id of the weapon you want to use as a frag
force= ; Fixed bullet speed. Use with swarm. leave off for normal bullets.
trans= ; Flag, Transfer momentum to frag?
endwep ; End the weapon script

And without comments because they will mess up the program.

new
name=
id=
bulsize=
bulshape=
bes=
besacc=
damage=
bullets=
rof=
reload=
rldTime=
clipSize=
spread=
swarm=
weight=
phit=
ghit=
life=
lifeacc=
fragID=
force=
trans=
endwep

And here is the program.

The cool thing here is that EVERY projectile is a weapon type. When a bullet explodes it explodes into new bullets. The amount of paramaters allows you to create anything from grenades to flames to nukes.

last edited on 1217336771|%e %b %Y, %H:%M %Z|agohover by Extra_ammo + show more
unfold GUN METAL : Dev Thread by Extra_ammoExtra_ammo, 1213787727|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
Extra_ammoExtra_ammo 1214149635|%e %b %Y, %H:%M %Z|agohover

How do I remove a single element from a list type?

unfold Re: Project 1 : Dev Thread by Extra_ammoExtra_ammo, 1214149635|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
hartnellhartnell 1214154141|%e %b %Y, %H:%M %Z|agohover

Er, haven't tried it in PB yet. Can you post this at the official PB forum : www.playbasic.com

Also, is this bullet code for a bullet hell shooter?

sec… (need to find something)

unfold Re: Project 1 : Dev Thread by hartnellhartnell, 1214154141|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
hartnellhartnell 1214154248|%e %b %Y, %H:%M %Z|agohover

Here's everything I've had time to write about bullet patterns. As you can see, most of the good stuff is listed in the TO DO section. :(

http://gamemaker.wikicomplete.info/bullet

— hartnell

unfold Re: Project 1 : Dev Thread by hartnellhartnell, 1214154248|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
Extra_ammoExtra_ammo 1214178497|%e %b %Y, %H:%M %Z|agohover

I have made a BulletViewer program that allows you to view the bullets loaded from weapons.txt.

unfold Re: Project 1 : Dev Thread by Extra_ammoExtra_ammo, 1214178497|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
hartnellhartnell 1214230019|%e %b %Y, %H:%M %Z|agohover

Can you post the code?

— hartnell

unfold Re: Project 1 : Dev Thread by hartnellhartnell, 1214230019|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
Extra_ammoExtra_ammo 1214269907|%e %b %Y, %H:%M %Z|agohover

You will need this text file under the same directory. Save it as "Weapons.txt" .

And here is the program. Note that it is not quite finished yet.

last edited on 1214309737|%e %b %Y, %H:%M %Z|agohover by hartnell + show more
unfold Re: Project 1 : Dev Thread by Extra_ammoExtra_ammo, 1214269907|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
u9u9 1214293091|%e %b %Y, %H:%M %Z|agohover

This is great! Hint, you could randomize the life time of the frag bullets a little, so they all won't explode at the exact same time. That way you won't be generating sparks for all of them at the same time, so it shouldn't slow down the computer so much :)

unfold Re: Project 1 : Dev Thread by u9u9, 1214293091|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
hartnellhartnell 1214309837|%e %b %Y, %H:%M %Z|agohover

This is cool. It reminds me of Link's DungeonGame that loaded the entire game data (except sprites) from text files and the FB Bullet Hell Library. :)

— hartnell

unfold Re: Project 1 : Dev Thread by hartnellhartnell, 1214309837|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
hartnellhartnell 1214310629|%e %b %Y, %H:%M %Z|agohover

BTW, good-looking bullets are easy to sprite. Can you give me a description of the shape, size? If you do I'll crank 'em out 5 mins after I read the post.

— hartnell

unfold Re: Project 1 : Dev Thread by hartnellhartnell, 1214310629|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
Extra_ammoExtra_ammo 1214353544|%e %b %Y, %H:%M %Z|agohover

One question. Should I make loading of custom sprites or just keep the shaded balls.

unfold Re: Project 1 : Dev Thread by Extra_ammoExtra_ammo, 1214353544|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
hartnellhartnell 1214396533|%e %b %Y, %H:%M %Z|agohover

I didn't see any graphics displayed when I ran it. Will try again later.

— hartnell

unfold Re: Project 1 : Dev Thread by hartnellhartnell, 1214396533|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
Extra_ammoExtra_ammo 1214436616|%e %b %Y, %H:%M %Z|agohover

You might not have noticed, but the BulletViewer is the entire bullet engine for the game. Press space to fire.

unfold Re: Project 1 : Dev Thread by Extra_ammoExtra_ammo, 1214436616|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
hartnellhartnell 1214438209|%e %b %Y, %H:%M %Z|agohover

This is cool-badge worthy.

cool.png

What say you u9?

— hartnell

last edited on 1214674290|%e %b %Y, %H:%M %Z|agohover by hartnell + show more
unfold Re: Project 1 : Dev Thread by hartnellhartnell, 1214438209|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
u9u9 1214463384|%e %b %Y, %H:%M %Z|agohover

indeed!

unfold Re: Project 1 : Dev Thread by u9u9, 1214463384|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
hartnellhartnell 1214493699|%e %b %Y, %H:%M %Z|agohover

I need to start a badge page and an central member page listing page. I'll do that today.

Extra ammo, I've created a member page for you Extra_Ammo and noted the cool badge.

— hartnell

unfold Re: Project 1 : Dev Thread by hartnellhartnell, 1214493699|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
Extra_ammoExtra_ammo 1214517753|%e %b %Y, %H:%M %Z|agohover

I am honored.

Now, who wants to help design the 2d splitscreen sidescrolling world code?

And, the game is now named "Gun Metal". There is only one other game I know of named that.

last edited on 1214517817|%e %b %Y, %H:%M %Z|agohover by Extra_ammo + show more
unfold Re: Project 1 : Dev Thread by Extra_ammoExtra_ammo, 1214517753|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
hartnellhartnell 1214671982|%e %b %Y, %H:%M %Z|agohover

What game did you say you wanted to clone?

— Hartnell

unfold Re: Project 1 : Dev Thread by hartnellhartnell, 1214671982|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
Extra_ammoExtra_ammo 1214700067|%e %b %Y, %H:%M %Z|agohover

http://www.liero.be/

unfold Re: Project 1 : Dev Thread by Extra_ammoExtra_ammo, 1214700067|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
Extra_ammoExtra_ammo 1214703700|%e %b %Y, %H:%M %Z|agohover

Snip.

last edited on 1215221917|%e %b %Y, %H:%M %Z|agohover by Extra_ammo + show more
unfold Re: Project 1 : Dev Thread by Extra_ammoExtra_ammo, 1214703700|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
hartnellhartnell 1214719890|%e %b %Y, %H:%M %Z|agohover

I'm also giving you these badges for this :

speaks-basic.png - for knowing a BASIC Dialect.
not-a-noob.png - reason obvious. :)

— Hartnell

unfold Re: Project 1 : Dev Thread by hartnellhartnell, 1214719890|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
Extra_ammoExtra_ammo 1214957573|%e %b %Y, %H:%M %Z|agohover

LATEST VERSION IN MAIN POST.

Now uses gfx instead of sprites. Levels and maps will be made of lines too.

unfold Re: Project 1 : Dev Thread by Extra_ammoExtra_ammo, 1214957573|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
hartnellhartnell 1215094698|%e %b %Y, %H:%M %Z|agohover

The weapon 'smg' is awsome! I was playing Contra: Shattered Soldier the other day and thought… I need to do an example of how this game does it's machine gun pattern. :)

Sadly, nothing else seemed to work.

— Hartnell

unfold Re: Project 1 : Dev Thread by hartnellhartnell, 1215094698|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
Extra_ammoExtra_ammo 1215120051|%e %b %Y, %H:%M %Z|agohover

UPDATED… AGAIN!

Changes:
ghit mode 2 is now "Stick"
new weapon.txt script style
Gun can move. Use w,a,s,d to move and up and down to aim.

Go ahead and add some weapons to weapons.txt.

Template:

new
name=
id=
bulsize=
bulshape=
bes=
besacc=
damage=
bullets=
rof=
reload=
rldTime=
clipSize=
spread=
swarm=
weight=
phit=
ghit=
life=
lifeacc=
fragID=
force=
endwep
last edited on 1215120101|%e %b %Y, %H:%M %Z|agohover by Extra_ammo + show more
unfold Re: Project 1 : Dev Thread by Extra_ammoExtra_ammo, 1215120051|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
hartnellhartnell 1215135761|%e %b %Y, %H:%M %Z|agohover

Oh hell yes! Can you comment a bit about what each one of these does?

— Hartnell

unfold Re: Project 1 : Dev Thread by hartnellhartnell, 1215135761|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
Extra_ammoExtra_ammo 1215169832|%e %b %Y, %H:%M %Z|agohover
new ; starts a new weapon
name= ; Display name
id= ; Weapon Id. Set to any integer.
bulsize= ; Bullet size
bulshape= ; Bullet Shape. 0 = line , 1 = quad , 2 = circle
bes= ; Barrel exit speed. Good speeds are 1 to 20
besacc= ; How much the bes varies
damage= ; Damage. Not yet used.
bullets= ; How many Bullets are fired per shot.
rof= ; Rate of fire. Amount of frames between each shot
reload= ; Flag, reload after clip is empty?
rldTime= ; Frames it takes to reload. 
clipSize= ; Shots per clip.
spread= ; How much the bullet angle varies when shot.
swarm= ; How much the bullet angle varies while flying.
weight= ; Weight of bullet. Suggested 0.01
phit= ; Hits other players?
ghit= ; Ground hitting mode. 0 = no-clip , 1 = Explode on contact , 2 = stick.
life= ; Amount of frames until the bullet explodes
lifeacc= ; How much the life varies
fragID= ; The id of the weapon you want to use as a frag
force= ; Fixed bullet speed. Use with swarm. leave off for normal bullets.
endwep ; End the weapon script

Remember to have EndFile at the end or the file won't work.

unfold Re: Project 1 : Dev Thread by Extra_ammoExtra_ammo, 1215169832|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
hartnellhartnell 1215222502|%e %b %Y, %H:%M %Z|agohover

Moved to works in progress.

Ammo, if you wanted to create a project page for this on the wiki itself, what would you expect from the project page and what would you want to know about it?

— Hartnell

unfold Re: Project 1 : Dev Thread by hartnellhartnell, 1215222502|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
Extra_ammoExtra_ammo 1215275947|%e %b %Y, %H:%M %Z|agohover

Let me think about it for a couple of days.

unfold Re: Project 1 : Dev Thread by Extra_ammoExtra_ammo, 1215275947|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
hartnellhartnell 1215222565|%e %b %Y, %H:%M %Z|agohover

The reason I ask is because wikidot forums do not paginate and the threads get pretty long.

— Hartnell

unfold Re: Project 1 : Dev Thread by hartnellhartnell, 1215222565|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
hartnellhartnell 1215223602|%e %b %Y, %H:%M %Z|agohover

Ok, I have the new version. Some of the weapons do not work. I think it has something to do with reload time.

— Hartnell

unfold Re: Project 1 : Dev Thread by hartnellhartnell, 1215223602|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
Extra_ammoExtra_ammo 1215275827|%e %b %Y, %H:%M %Z|agohover

Make sure there are no spaces in the weapons file.

Example.

Incorrect - "rldtime = 100"
Correct - "rldtime=100"

unfold Re: Project 1 : Dev Thread by Extra_ammoExtra_ammo, 1215275827|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
Anonymous (24.125.66.248) 1215564501|%e %b %Y, %H:%M %Z|agohover

What resolution do you guys have?

unfold Re: Project 1 : Dev Thread by Anonymous (24.125.66.248), 1215564501|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
u9u9 1215629285|%e %b %Y, %H:%M %Z|agohover

I use 1024x768, 1680x1050 and 1280x800 (laptop)

unfold Re: Project 1 : Dev Thread by u9u9, 1215629285|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
Extra_ammoExtra_ammo 1215964423|%e %b %Y, %H:%M %Z|agohover

Code Update

Changes:

Fixed Ghit mode 2 (stick mode) not producing frags properly.

unfold Re: Project 1 : Dev Thread by Extra_ammoExtra_ammo, 1215964423|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
u9u9 1215970225|%e %b %Y, %H:%M %Z|agohover

i love the particle effects. I want to rain hell on some baddies with that smg. But i'm not sure i'm using the right files. Is it from the first post? And i only have two weapons if i use the code and weapons file from the first code. Is that correct? What happened to all the other nice weapons :D

unfold Re: Project 1 : Dev Thread by u9u9, 1215970225|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
Extra_ammoExtra_ammo 1215972723|%e %b %Y, %H:%M %Z|agohover

The main post is updated with the new files. The weapons file was made from scratch for the new script system thats why there is only 2. You can make your own weapons though.

new ; starts a new weapon
name= ; Display name
id= ; Weapon Id. Set to any integer.
bulsize= ; Bullet size
bulshape= ; Bullet Shape. 0 = line , 1 = quad , 2 = circle
bes= ; Barrel exit speed. Good speeds are 1 to 20
besacc= ; How much the bes varies
damage= ; Damage. Not yet used.
bullets= ; How many Bullets are fired per shot.
rof= ; Rate of fire. Amount of frames between each shot
reload= ; Flag, reload after clip is empty?
rldTime= ; Frames it takes to reload. 
clipSize= ; Shots per clip.
spread= ; How much the bullet angle varies when shot.
swarm= ; How much the bullet angle varies while flying.
weight= ; Weight of bullet. Suggested 0.01
phit= ; Hits other players?
ghit= ; Ground hitting mode. 0 = no-clip , 1 = Explode on contact , 2 = stick.
life= ; Amount of frames until the bullet explodes
lifeacc= ; How much the life varies
fragID= ; The id of the weapon you want to use as a frag
force= ; Fixed bullet speed. Use with swarm. leave off for normal bullets.
endwep ; End the weapon script

Remember no spaces. You can have carriage returns though.

unfold Re: Project 1 : Dev Thread by Extra_ammoExtra_ammo, 1215972723|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
Extra_ammoExtra_ammo 1215973487|%e %b %Y, %H:%M %Z|agohover

Also, the whole point of the viewer is to help you debug your weapons before using them in the main program (Which I still need to make).

unfold Re: Project 1 : Dev Thread by Extra_ammoExtra_ammo, 1215973487|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
u9u9 1216021999|%e %b %Y, %H:%M %Z|agohover

ok, thanks, i just wanted to make sure everything was correct.

unfold Re: Project 1 : Dev Thread by u9u9, 1216021999|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
Extra_ammoExtra_ammo 1217335704|%e %b %Y, %H:%M %Z|agohover

Working on next update.

Next update will include:

New attribute "Trans". Flag - Defines if bullets detonated in the air will transfer their momentum to the frags.

Increased realtime processing of created projectiles.

unfold Re: Project 1 : Dev Thread by Extra_ammoExtra_ammo, 1217335704|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
Extra_ammoExtra_ammo 1217336795|%e %b %Y, %H:%M %Z|agohover

UPDATE COMPLETE!

Frame rate increased by 20 on my machine. But for some reason the Setfps command doesn't seam to be capping correctly.

last edited on 1217336880|%e %b %Y, %H:%M %Z|agohover by Extra_ammo + show more
unfold Re: Project 1 : Dev Thread by Extra_ammoExtra_ammo, 1217336795|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
u9u9 1217406762|%e %b %Y, %H:%M %Z|agohover

SetFPS seems to work for me. I changed it to 50, and sure enough the fps dropped to 48-49. What is your doing?

unfold Re: Project 1 : Dev Thread by u9u9, 1217406762|%e %b %Y, %H:%M %Z|agohover
Re: Project 1 : Dev Thread
Extra_ammoExtra_ammo 1217521347|%e %b %Y, %H:%M %Z|agohover

For a while it would go above to around 100 - 200 and look really choppy. Seems to be working fine now though.

unfold Re: Project 1 : Dev Thread by Extra_ammoExtra_ammo, 1217521347|%e %b %Y, %H:%M %Z|agohover
new post