Perling

Monkey Archive Forums/Monkey Projects/Perling

Raz(Posted 2012) [#1]
Evening,

I had planned on working on a Zelda 3 style RPG game, but I easily side tracked myself. Anyway, one of the main things that side tracked me was the notion of procedurally generating the basis of each level and then going in and fixing things up to make it more of a game.

I had been generating the levels in a PHP script I had made and then importing them in to a BlitzMAX based editor, changing things and finally exporting them as a CSV ready to be loaded in Monkey. I got bored of this very quickly because I have an unnatural aversion to making and editing levels.

Which leads me on to Perling (which is a working title but might end up being the actual title). I converted a Perlin class I was using in PHP in to Monkey and have been messing around with it. Much like worms, the player will provide a word or phrase to generate the level. This will also include randomly generating the "quests" within the level and I am hoping this could lead to some really fun levels that I hope people will share. On systems that allow it, I hope to include some sort of high score system too.

I'm yet to decide what exactly will be included in the game feature wise (e.g. enemies, skills and weapons) but I'm quite looking forward to it because I really enjoy making things, but am rubbish at actually implementing them. Because Perling will be procedurally generated, I won't have to worry about it! (yay)

For those interested - The dev blog : http://chrismingay.co.uk/blog/category/perlin/

Ta


muddy_shoes(Posted 2012) [#2]
If you didn't try to redraw the unchanged map sixty times a second it wouldn't kill my browser.


slenkar(Posted 2012) [#3]
yeah muddy shoes was bit abrupt there but he may be right,

simply stop drawing unless the image has changed

im actually making a game that uses an overland map like this but I dont know how to procedurally generate them, is it difficult?


Raz(Posted 2012) [#4]
I had set it to update once per 60 seconds actually, but even then, I have now made it only redraw when necessary.

Slenkar, I use Perlin noise to generate a 2d array of values between 0.0 and 1.0, I then set the terrain to be grass, sand, deep water etc based on what the value is (so 0.0 - 0.2 for deep water, 0.5 - 1.0 for grass)


NoOdle(Posted 2012) [#5]
looking good!


slenkar(Posted 2012) [#6]
Interesting thanks


Raz(Posted 2012) [#7]
Example of a 38400 x 25600 map which generates surprisingly quickly (but obviously renders like a complete dog when you're trying to render all of it) -



Really struggling to get the graphics to feel like whatever it is my brain is expecting to feel right (I wish I knew what it was!). So using very square place holder graphics for now.

I'm beginning to program objects now and hope to have them as part of the generating procedure by the end of the weekend.

The actual quests you get assigned in each level will be random as well. So it could be a combination of go to 4 check points, kill 8 of enemy x and chop down 20 trees.


muddy_shoes(Posted 2012) [#8]
I notice that your world doesn't wrap. Are you going to have "invisible wall" borders?


Raz(Posted 2012) [#9]
Not invisible as such, but I will definitely be adding some kind of border round the edge ;) maybe a mountain range, people love mountain ranges.


Raz(Posted 2012) [#10]
Hello again!

While there isn't immediately much to show for it, Perling (a working title I now want to change!) has been progressing really well.



On face value it doesn't seem like much, but I'm very happy with how things work in the background. It is by far the most organised project I've worked on. Normally it gets to a stage where I am really bodging code together to get things working but this time I still feel in control!

While the displayed demo above is XNA, I am coding it with basically all targets in mind. Really chuffed that MonkeyMAX is going well, as I will be using this for the PC/Linux/Mac distribution :)


Rex Rhino(Posted 2012) [#11]
Hey Chris,

Why is BlitzMax better for the PC/Linux/Mac distribution of a game?

Also, I have some perlin noise code in BlitzMax that wraps (I was using it for generating tile-able 2D textures) that I would be happy to share... You could have a world that wraps east-west (or east-west-north-south, for the infamous doughnut shaped world), instead of having mountains/barriers on the borders.

Anyway, your game looks awesome. I am eager to play it!


Raz(Posted 2012) [#12]
Hi again Rex :) Thank you

Blitzmax is better because 1) It works on PC, Linux and Windows 2) Doesn't require any specific frameworks and 3) I can pack things in to the exe for more secure distribution (my concern is having licensed content too easily accessible).

Before I outright dimiss your kind offer of sharing your wrapping code Rex :)... I've always wondered about wrapping worlds... in the way I always do my coding I imagine working out logic around the borders can really get fiddly (e.g. I check an items X position to another one, the X position is technically much much less, but it's over the border, so is only lets say 100 or so pixels away to the right, if that makes sense?)


Raz(Posted 2012) [#13]
And another one, XP! Who doesn't like XP?




muddy_shoes(Posted 2012) [#14]
Looking like it could be a fun NES-style RPG/Arena Shooter hybrid. There's definitely an audience that could really go for something like that.


Paul - Taiphoz(Posted 2012) [#15]
When I look at that the first thing that jumps to mind is catacom snatch the game by mojang.

Not saying your nicking the idea, your clearly not, but what I am saying is that I think your game could really benefit from their art style, looks to me like your engine and their art would make a perfect match, well not their art but that style of art..


Raz(Posted 2012) [#16]
Thanks Muddy, Taiphoz :)

Taiphoz, I know exactly what you mean. The graphics right now are very much place holder (the world tiles are not even mine so I will definitely not be using those) and I know there's a look I want, but 1) I can't draw it and 2) I can't even describe it. How would you describe the art style of Catacomb Snatch? Because you're right, that style would suit!

Being completely honest, I would say the game copies lots of ideas from lots of games. More often than not, it isn't a specific case of "I want this from this game", more "this feature I've seen before would be fun!".

Other things will be nods to games and features I've enjoyed before. For example my plan is to be able to unlock Borderlands style damage points flying out of enemies as they get hit. Very much just because!

I've got a design document going and right now it's just a huge list of maybes. I would like to have lots of variety but at the same time I would like to make sure everything is fun as well.


Paul - Taiphoz(Posted 2012) [#17]


What I was talking about is the colourful , semi fake 3D that they use, and many other games like it use, where its tile based but simply by offsetting a raised tile you can walk behind walls and get all sorts of cool 3D type effects.

your right thought it's hard to describe so much easier to just show an example screen shot. and then look and have that "AH!, that" moment.


Paul - Taiphoz(Posted 2012) [#18]
Actually, looking at your game again and that screen shot helped, make your tiles much larger, your doing the same kinda thing but your tiles are just smaller so your world feels a bit squashed, make it larger and the player will feel like he's inside the world tather than running over the top of it.

thats what I couldnt put my finger on before.


Raz(Posted 2012) [#19]
I should've watched more of the live stream, especially for the drawing parts :)

The above picture shows a very good example of something I lack the most (not to say I don't lack at drawing anyway)... but I mean the choice of colours, I think I am missing something in my head that allows me to get colours "right" like the above!


Raz(Posted 2012) [#20]
Actually, looking at your game again and that screen shot helped, make your tiles much larger, your doing the same kinda thing but your tiles are just smaller so your world feels a bit squashed, make it larger and the player will feel like he's inside the world tather than running over the top of it.


Yeah you're right :) Not noticed that until now! Very well spotted.


Skn3(Posted 2012) [#21]
This is cool! I like the idea that everything is generated. My suggestion would be to tweak the scale. At the moment it is very sparse!

Those swirly xp crystals are cool! So Is it purelyan action style game? Or are you gonna randomise quests and npc's and stuff?


Shinkiro1(Posted 2012) [#22]
This is starting to look really cool.
I guess zooming in/making tiles bigger as said before would help the immersion of the game.

For the colors, you could try to turn the saturation for the background down a bit, that way the objects/characters will pop out more.
Shadows for objects would help too, if performance allows that.


Paul - Taiphoz(Posted 2012) [#23]
when it comes to colour I find it best to site down and make a swatch set, and match groups of colours together, once you have a selection of well matched colours in a swatch you simply force yourself to use them when you make your art.

And your art will all fit together as a result, I think a problem some people have is that their game art jumps brightness and tons to aggressively and its very noticeable.


Raz(Posted 2012) [#24]
Thanks Skn3, Shinkiro :)

Skn: You're right about it being sparse. If I am honest I got to a certain point (that is, making it so a world appears) and stopped tweaking it. Come to think of it, just about everything I've started is about 5-10% complete as well. On one had it seems a bit out of control, but on the other it feels like I know I am able to do whatever it is I think of too, so I am just going with it when/if I feel something :D

It plays like an action/arcade game but each level will have random quests as well (an example will be, having to drown 5 coins). I haven't considered NPC's really, but the way I've got eveything running, there is absolutely no reason why they can't be added.

To generalise I would say it's not only the graphics that are place holder but the objects as well. I imagine I will have mines and turrets but I have no idea how they will perform.

The player itself moves too quickly as well, so I will have to get this pace right before I start considering everything else properly.

Shinkiro: Shadows are there, but currently only get shown when the object isn't on the floor (though there is no reason why I can't just set them to be on all the time for systems that will allow it). Regarding colours, you're right and I do want all the "foreground" stuff to be bright and bold and the background to be more well... background...

I've been reading various tutorials on pixel art and it's actually pretty gutting sometimes! For example, this one - http://gas13.ru/v3/tutorials/sywtbapa_de-mystifying_greats_1.php - specifically the close up of the tree! I can't imagine being in a position where I could choose those colours and know they would work (if that makes sense?)... I just tried drawing some grass kind of like those shown in the above page and my god... it just feels wrong!


Raz(Posted 2012) [#25]
Taiphoz: so kind of like setting a limited colour palette and going from there?


Skn3(Posted 2012) [#26]
Hey raz I know exactly how you feel! I am still trying to learn color for lighting! One thing I have tried recently is to imagine coloured anlglepoise lamps instea of dark and light. So if it's a sunny day then the hilighta would be yellow. If its sinister and dark scene then you might go choose a darker color or shade.

Once you know your scene, try googling images of the subject eg "sunny" or "horror" and see the popular colors... You can then use these colors to apply shade to your character.

Draw the angle poise lamps and where they point and then instead of applying white for light... Try applying blue or green or red! It just comes from experimentation.


Paul - Taiphoz(Posted 2012) [#27]
Yeah what I do, and what is actually shown in the above mojang image, if you look at one of the wall blocks, you will see its actually only made up of a few colours.

A dark sand, then 3 shades of the dark sand each a bit lighter than the next until its bright.

the bright sandy colour is used to show light, look at the edges of the block, and the dark sandy colour is used to denote the shadows, the thing you might notice is that there are no black lines, the shape is defined by the contrast of the colours, very bright , next to dark etc.

I actually blogged about this a day or so ago, you should take a look it might help.

http://dev.cruel-gaming.com/2012/05/05/color-contrastand-art/

You can see my colour swatchs in the image in the post, a green one for the main character body, shadow, normal and light, and same for the teeth, and fins, and belly.

Hope it helps.


Skn3(Posted 2012) [#28]
The hard part is to know the color ramps though.

here is my latest attempt at highlighting "differently" (got the dark and light anglepoise bits in the corners)

It would have been interesting to see what happened if replaced the black dark shade for a murky blue...

Anyway forum topic thieving alert lol!!!


Skn3(Posted 2012) [#29]
.double


muddy_shoes(Posted 2012) [#30]
kind of like setting a limited colour palette and going from there?


I can offer a "blind leading the blind" tip (almost literally as I have colour blindness). When putting together placeholder art I'll often start by finding an image that has an overall colour tone that matches the sort of look I want. I'll then get busy with the eye-dropper tool and pick out colours from the image that I then use as a reference palette for creating the actual art.

Or I just create horrid clashing primary colour assets and hand them to an artist (or a good graphic/web design person) to do a quick fix up specifically to create a palette. That works too. :)

I've been thinking of making a palette/swatch extraction tool for this purpose. I don't know if it will ever reach the top of my todo list though.


Raz(Posted 2012) [#31]
Have been messing around with the whole 4 colour swatch thing. it's still really hard work (as in takes ages to feel right), but it's beginning to feel like a theme I am happy with :)




Paul - Taiphoz(Posted 2012) [#32]
Yeah thats really starting to look nice.

And you have made your character feel more like being in the game rather than on it, which is a lot better.

I would change the tree's so that one tree trunk fits on one tile, rather than 3 or 5 tree's , change it to be one fat old tree with a nice trunk.


Raz(Posted 2012) [#33]
Not too much more to show at this stage, but I made my first real attempt to get it running on mobile devices last weekend and I am very happy to say that (memory limits permitting), it was pretty painless :D

Running on my old HTC Desire (surprisingly well, except for when I draw lots of particles that use colour settings)



Below are a couple of videos, one showing some of the gui components and another showing the weather system and teleporters





On the most part it is still very much just a bundle things in a world, but when I dedicate some time to balancing and tweaking all of the items and the world generation, I think it could very quickly become a game.

Still quite happy that I've not met that "I'm starting to bodge things together to get them to work" stage and as far as I can tell, there's no reason why this should happen.


slenkar(Posted 2012) [#34]
it does look cool,


Sammy(Posted 2012) [#35]
It looks very nice. The only thing I would say is that you shadows are a little long, they seem to be be too large for the size of the objects that are casting them IMHO.


Skn3(Posted 2012) [#36]
Looking very tasty raz :D


Raz(Posted 2012) [#37]
Veggie, yeah I still need to get them right. I think it's going to be one of those things were I leave it as is until the very last second :)

Have spent the last couple of weeks reworking the terrain code. Doing this makes the generation process much easier to tweak and I am really happy to see that it has helped in exactly the way I had hoped.

This weekend I spent a lot of time doing small tweaks and am beginning to implement the randomly generated quest system. I need to work on the sample timings, but at the very least you can see what I am trying to go with :)



(this one is at 720p, so it might be worth viewing the youtube copy instead of the embedded one)

Until now I have been very much just running about, arms flapping, half implementing what I want, when I want (which to be honest, has been really fun). But I am hoping the quest manager will help nudge me in the right direction with regards to how the items interact with each other.


Skn3(Posted 2012) [#38]
Liking the pace of the game, seems very FUN now. The voice intro is a nice touch!


Raz(Posted 2012) [#39]
Thanks Skn :D


Raz(Posted 2012) [#40]
Hello again, almost done with the spamming, I promise!



This will hopefully be the last dev video before I post a more official trailer. Quest progress is now reported live via a small pop up towards the bottom right of the screen (as well via the proper list as well).

So between now and said trailer I will be tweaking the graphics (including the shadows!), the generation process as well as the behaviour of a select few enemies and the player.

I am considering being able to release this through Steam Greenlight - http://steamcommunity.com/greenlight - which is quite exciting :)