Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

The 20 Line Challenge / [DBP] Random Spaceship Generator

Author
Message
IBOL
Retired Moderator
19
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 14th Nov 2010 04:12 Edited at: 28th Nov 2010 05:17
a few months ago i was checking out this website
http://www.davebollinger.com/works/pixelspaceships/
and decided to try to adapt his ideas into my own dbp code.

it worked!
this program generates an endless (~4 million) array of pixel spaceships,
which could be used as sprites for retro games or whatever.

i made it so you could change the color and size of a particular spaceship,
and even fully commented and spaced, that's 300 lines.

here's the uncompressed code:


attached is a compiled version. no media required.

some improvements you could make:

-it wouldn't be hard to add a "save image" function, to get these sprites.

-using the mouse to turn a square off or on manually (and even to assign it to one of the 7 'color classes')

-maybe someone could actually include something like this in a game where players can design their own ships for each game.



Attachments

Login to view attachments
Rapidrory
13
Years of Service
User Offline
Joined: 21st Aug 2009
Location:
Posted: 15th Nov 2010 20:32
Nice one, it really looks good, but you seem to have left out the compressed code..

There is no such thing as "Too Fast!"
Dr Tank
14
Years of Service
User Offline
Joined: 1st Apr 2009
Location: Southampton, UK
Posted: 15th Nov 2010 23:24 Edited at: 15th Nov 2010 23:25
That generates some really cool looking spaceships! Maybe it depends on the version of DBP but I had to change line 220 to:



To make the mouse picked colours visible, because the box function has alpha.
Libervurto
16
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 24th Nov 2010 16:45
This would be amazing in your Space Conflict game, if you expanded it. You could move around a vast galaxy colonizing planets and encountering totally unique alien races and spaceships everywhere you go!


Snobbery is a privilege of the ignorant.
IBOL
Retired Moderator
19
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 24th Nov 2010 18:27 Edited at: 25th Nov 2010 07:28
now THAT is a good idea... and i didn't ever think of it.
... i might have to think about redesigning from the beginning,
adding technology, making the game possibly endless...

now if i only had a decent *planet generator* ... for endless planet images...

i might even be able to expand this concept, make individual technological devices like this...

you make me think, man!

[edit]
would you care to discuss game design on the subject?

[/edit

IBOL
Retired Moderator
19
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 25th Nov 2010 20:33 Edited at: 25th Nov 2010 20:43
OK, so here is a simple endless planet creator,
that could be used in such a game.
of course they are not super-awesome 3D revolving planets with weather that you can land on and explore, but they are procedurally generated and about endlessly variable.



OB87, you want to help in a redesign? i have some thoughts.

Libervurto
16
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 26th Nov 2010 03:45
I made a thread in game design to talk about the new game.
I think Space Conquest is a fitting name seeing as the game is expanding.


Snobbery is a privilege of the ignorant.
IBOL
Retired Moderator
19
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 28th Nov 2010 02:37 Edited at: 28th Nov 2010 02:43
we are talking up a storm over there.

meanwhile, here is a pic of some random procedural alien races.


Attachments

Login to view attachments
IBOL
Retired Moderator
19
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 28th Nov 2010 02:42 Edited at: 28th Nov 2010 02:44
and here is some quick and dirty procedural planets too, both small and close-up



Attachments

Login to view attachments
IBOL
Retired Moderator
19
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 28th Nov 2010 05:16
and here's the bit that started it all.

Attachments

Login to view attachments
Libervurto
16
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 28th Nov 2010 17:09
They look great IBOL, could I suggest for the planets reducing the colour and having a brightness parameter, that way we should lose the extremely red/green/blue planets and if we set a minimum brightness we'll lose the really dark planets. Or do you like them being that colourful?


Snobbery is a privilege of the ignorant.
IBOL
Retired Moderator
19
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 29th Nov 2010 15:39
honestly, i like the variety, the dark, the light, etc.
i like them because you don't normally see such variety in a space game.
when we get further along in the design process, we'll decide on such things.

kamac
12
Years of Service
User Offline
Joined: 30th Nov 2010
Location: Poland
Posted: 3rd Dec 2010 15:07
I like the ships . And also the way you made them customizable. Well, still it could be playable to give more fun .

Cheers!

~Kamac
Daygamer
13
Years of Service
User Offline
Joined: 16th Mar 2010
Location: United States
Posted: 10th Dec 2010 00:23
good job. This is cool

yrotate when you can spin?
God Bless!

Login to post a reply

Server time is: 2023-05-29 12:24:05
Your offset time is: 2023-05-29 12:24:05