Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1371687 Posts in 64647 Topics- by 56774 Members - Latest Member: Carter11

January 17, 2020, 08:09:46 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityDevLogsAlienoid Core
Pages: 1 ... 3 4 [5]
Print
Author Topic: Alienoid Core  (Read 15393 times)
retrostark
Level 0
***



View Profile WWW
« Reply #80 on: March 30, 2014, 08:04:34 AM »

If anyone has ever tried some type of random gun generation before (or if you just have some ideas), advice would be appreciated.

I have never done anything with random gun or weapon generation, but I do have a few things I will point out that come into mind for me when I think about how I would do it.

First I don't know if you are planning for it to randomly generate a sprite for each gun, but for that what I would recommend doing would be to draw up quite a few different parts of guns (maybe three per gun?) and then what I would do it each time it generates a new gun it will pic three of those sprites and put them together to make a new gun. You are going to need a lot of these if you want it to have lots of combinations for them to almost always be unique.



Above you can see I quick drew up 6 gun sprites and made 12 guns from them. So you can quickly come up with a low of different gun combinations, and the more sprite parts you make the more guns and so on.

Next what I would do is have it randomly pick one of a bunch of different bullet sprites, you can also put color overlays on them and glow effects to make the same bullet different just by color and effect.

After that you can pick a sound effect. Can have a wide range of sounds that it picks.

Once those are done the script could pick the amount of screen shake based on what bullet sprite it picks, the gun combination, and the sound effects. This will help add effect and make the weapon seem more powerful.

Finally finish up with its stats, pick how much damage it deals, accuracy, how far the bullet goes, speed, ammo, and the name of the weapon. For the name you can do something simple like put in a bunch of word. Then have it first pick how many words the name of the gun is (1,2,3,4) Then is picks something like 3 words and that's the name of the gun.

Hope this is clean and helps you, let me know if you need me to explain something better.  WizardHand Metal Left
« Last Edit: April 02, 2014, 10:48:36 AM by retrostark » Logged

Toast LeftWizardHand Metal Left
Pixelulsar
Level 3
***



View Profile WWW
« Reply #81 on: April 12, 2014, 07:27:47 AM »

Debug mode! Its mainly for gun generation to make it easier.


retrostark, thanks for the huge write-up with all those tips, actually bookmarked this page so I don't forget where it is. I'm trying to keep gun generation kind of simple so the game doesn't take forever. I won't be able to do everything, but the write-up was really helpful and has a lot of great ideas I never would have though of, like random sounds and your ideas for bullets. 
Thanks a bunch! Wizard Hand Metal Left
Logged

retrostark
Level 0
***



View Profile WWW
« Reply #82 on: April 14, 2014, 11:49:15 AM »

No Problem Pixelulsar. It was fun writing it all down, plus I can come back to it at some point as well, and might help other people too Smiley

I sadly haven't completely read your entire devlog, but I did skim all the pages. I was wondering if you could explain how you went about the random level generation in the game?  Hand Pencil
Logged

Toast LeftWizardHand Metal Left
Pixelulsar
Level 3
***



View Profile WWW
« Reply #83 on: April 14, 2014, 05:53:11 PM »

Random Dungeon Generation in Alienoid Core
Here is just the basic process I use to generate the dungeons.


Here are some maps it generated, they are a lot more spread out than the ones used in the game but still a good example of what it does (A better example would be the map on the debug screen a few posts back).

First I decide on the dimensions of the map I want to make in tiles and then create a 2D array to hold the map info.  This map will be filled with true and false vales, with true being the floor and false being empty space in the end.

Second I randomly put down a bunch of rectangles within a certain size range. If a rectangle is placed so that it intersects another rectangle, it is scraped and a new rectangle is created.  This process continues until a predetermined number of rectangles are on the map.  All these rectangles are filled with the true value or floor.

Third I go through the rectangles again and draw a line of floor from the centre of every rectangle to the centre of the next one on the list.  This connects all the rectangles so they aren't a bunch of separate floating islands.

Lastly I place floors randomly in all the empty spaces and then use cellular automata to smooth the floor into a round shape without too many small clumps or protrusions floating out in the middle of nowhere. A good tutorial on making caves with cellular automata is here.  Really, Cellular automata is what makes the level look all smooth and natural, I think it's a great tool for level generation.

The level generation process in the game is not done, there are still many things for me to do, like using the flood fill algorithm to make sure all parts of the map are accessible to the player, before it's complete.

Sorry for the huge text dump with no pictures or diagrams, hope you can understand it because I wrote it up really quick. I'll try and add in some pictures outlining the process and expand on it with specifics later.
« Last Edit: April 14, 2014, 06:00:13 PM by Pixelulsar » Logged

increment
Level 0
**


View Profile WWW
« Reply #84 on: April 14, 2014, 07:16:35 PM »

Wow thank you so much for the link.  I was combing the tigs tonight for a way to better understand random level generation and you pointed me in the right direction.  Also great stuff you have got here haven't looked through all but I like the idea of random gun gen, sorry I don't have anything to add though.
Logged

retrostark
Level 0
***



View Profile WWW
« Reply #85 on: April 14, 2014, 07:21:08 PM »

Cheers Pixelulsar  Toast LeftSmileyHand Thumbs Up Right I haven't heard of cellular automata before, but now once I am done with my current dungeon/cave generator I will give this a try.

Here is an example of something that I am working on. It is only a few hours work at the moment.



Logged

Toast LeftWizardHand Metal Left
retrostark
Level 0
***



View Profile WWW
« Reply #86 on: June 15, 2014, 04:59:33 PM »

Hey man, it's been awhile wondering what is happening with the game?  Well, hello there!
Logged

Toast LeftWizardHand Metal Left
Pages: 1 ... 3 4 [5]
Print
Jump to:  

Theme orange-lt created by panic