creatures caves
welcome, guest 

downloads   gallery   dev   community   creatchi   forum   mycaves
bookmarks | search | post new topic
 
Development Forum
old
Kreatures   1 | 2 | 3 | 4 | 5 | ... | 14 | 15
Geat_Masta

Geat_Masta
United States  


  2/5/2017

Bifrost wrote:
How many layers can you have to handle parallax effects?



You can put things behind the backround, that isn't the same as a parallax layer. I've been wanting to put in code for parallax effects, but it's unclear where the code actually goes in the engine, and if it should use normal sprites or sprites that are cut into tiles to reduce RAM consumption when only part of the image is on screen, etc.

So currently there isn't a way to move the backdrops relative to the camera in a parallax-y way, you could do it in script by getting the position of the camera and moving the backdrop accordingly, but the camera updates 60 times per second, and scripts 32 times, so it might look a bit jittery.

To answer how many layers of stuff you can put behind the background though: 2,147,483,647. Draw order goes from -2,147,483,647 to +2,147,483,647, background is at 0, foreground/cutouts are at 50000, lighting is disabled at 50001, hand at 65535, object begin held by hand 65534. Norns have a random draw order from 5000-8000 based on their moniker.

Bifrost wrote:
Would it be possible to make one rather small sky backdrop, and then have world backdrop with mountains (and the purple temple and things like that) closer to the actual world size?

if you mean small as in not 2x the size, no all sprites have been doubled, you could scale up the image in engine but it would look blurry.

Bifrost wrote:
About resizing, is super-Xbr very different from the tools Photoshop uses to scale up images?



Well it's a shader used by emulators, I assume there's a plugin for photoshop that does it. Regardless, the current engine just blows up the background to 2x size, I mentioned that incase you wanted to put in fine details, if you don't want to you may as well just wait until I get around to adding xBr to the map editor, it's already in the sprite builder.


Donate to the development of Kreatures

(The unofficial Creatures 4)

 
Geat_Masta

Geat_Masta
United States  


  2/5/2017

Also super-Xbr can't deal with dithering, if it's dithered you just have to redraw it.

Donate to the development of Kreatures

(The unofficial Creatures 4)

 
Geat_Masta

Geat_Masta
United States  


  2/5/2017

I double post because if people get updates via email they won't be notified if I edit.

I just realized I can't actually add parralax components, here's why: lets say you have a world that loops like regenesis, and a sky across the entire horizontal distance, assuming the world is 8400 pixels wide, when the camera is in the loopback it's position is both 8000 and -400, because we don't know which value to use to calculate parallax the only option is to leave it to scripting.


Donate to the development of Kreatures

(The unofficial Creatures 4)

 
Bifrost

Bifrost
Norway  


  2/5/2017

So, all I should do now is to double the world's size, and then divide it up into two or three layers, with the main background being transparent where the sky/other backdrop can come in behind it, right? Will the double size be how it will look in-game?
 
Geat_Masta

Geat_Masta
United States  


  2/5/2017

Bifrost wrote:
So, all I should do now is to double the world's size, and then divide it up into two or three layers, with the main background being transparent where the sky/other backdrop can come in behind it, right?



correct. As well as make the room maps showed in the video, I recommend having each color it's own image and importing them in sequence to remove some of the artifacting. The colors currently aren't defined as meaning anything, but this is the pallete you have to work with:

Bifrost wrote:
Will the double size be how it will look in-game?



In the alpha I'll release (hopefully) later today yes, in the final no. Things are doubled because monitor resolution is higher, so on a High DPI display a normal image blown up will hurt your eyes, so it's best for me to make all the sprites big and scale them down to half size for normal monitors, which is what I did. This also makes the rotating norn sprites look smoother, and makes some of the compression artifacts look like dithering.


Donate to the development of Kreatures

(The unofficial Creatures 4)

 
C-Rex
Norn King

C-Rex
United Kingdom  

 visit C-Rex's website: The Norn Nebula
  2/5/2017

Out of interest, and I apologise if I've missed something, but what version of DirectX does Kreatures run on, if it does indeed run on DirectX?

Come and join the Creatures Community on Discord!
 
Geat_Masta

Geat_Masta
United States  


  2/5/2017

I got it compiled on windows and it crashes immediately, first alpha probably won't be for a few days.

C-Rex wrote:
Out of interest, and I apologise if I've missed something, but what version of DirectX does Kreatures run on, if it does indeed run on DirectX?



I built and tested it on Linux to be compatible with both OSX and Windows. DirectX cannot run on Linux or OSX. It uses OpenGL, if the available openGL is less than version 4 it uses baked images and no lighting/Shaders are available; I thus far haven't used any openGL commands past version 2.0 (from ~2005), but everything to do with rendering will eventually have to be replaced with open GL 4.0, I haven't done it yet because I find it confusing.


Donate to the development of Kreatures

(The unofficial Creatures 4)

 
Bifrost

Bifrost
Norway  


  2/5/2017

How long have you been working on this? This is seriously impressive.
 
Geat_Masta

Geat_Masta
United States  


  2/5/2017

I started the biochemistry code last august, then when I finished that i started on the engine in November I guess?

Are there any windows devs here? I can't figure out why my alpha is crashing immediately.

What I know

- it the debugger: it crashes in some nameless DLL while trying to lock a mutex before main() is called
- exit code 255
- no command line output
- no error dialogs.


Donate to the development of Kreatures

(The unofficial Creatures 4)

 
Geat_Masta

Geat_Masta
United States  


  2/5/2017

So, in trying to get it to compile:
I started removing things until I could find the culprit, until I got to a "hello world!" program and it was still happening. At this point I figured one of the configuration files was corrupted and deleted them.

Starting a new project I was able to compile with all support libraries dependencies and get the window up. But then when I added the engine itself in it had the error again. Once again I removed everything until I was back to hello world. And the error still happened.

This means, as far as I can tell, that compiling it is simply impossible: trying to do so is corrupting a file needed for compilation. I'll never understand how windows got to be so popular when it's absolute garbage.

I have no idea how to proceed from here.


Donate to the development of Kreatures

(The unofficial Creatures 4)

 
Ghosthande
Prodigal Sock

Ghosthande
United States  
Manager


 visit Ghosthande's website: Breeders Beware
  2/6/2017

Tried asking on any other forums? Someone with experience in this kind of development might recognize what's going on, but I think you're unlikely to run into many such folks here.

If all else fails, there are ways to emulate games on Windows that were created for Linux.



 
Geat_Masta

Geat_Masta
United States  


  2/6/2017

Yeah I did try on other forums. So if I make an ubuntu deb (dependencies would be wx3.0, libbass, and glew), can you provide instructions for getting it running?

Donate to the development of Kreatures

(The unofficial Creatures 4)

 
Geat_Masta

Geat_Masta
United States  


  2/6/2017

I finally got it to run on windows by going back to wx and building GLEW on linux. But it's behaving very oddly, and I'm not sure how long it will take me to fix it. Basically: parts of the background load correctly, and parts don't for no discernible reason, none of the sprites are loading, but I can tell the engine knows how big they are, so it is reading the files, then when it tries to load the norn sprites it crashes.

Donate to the development of Kreatures

(The unofficial Creatures 4)

 
Bifrost

Bifrost
Norway  


  2/6/2017

That's weird, but at least you're making great progress.

I've blown up ReGenesis Albia to the double size, and tweaked a few things that looked odd. Right now, I'm adding on the 16 colour room map. Open air should be left transparent, right? And then a different colour for different types of floors, like soils and concrete and stuff, right? Should water areas be coloured, and how do I treat the floors in the water?

 
Geat_Masta

Geat_Masta
United States  


  2/6/2017  1

I got it working, the problem was that windows is stupid, annoying, and terrible; meaning the command to go to byte X of a file, does not go to byte X of that file. I fixed that as well as similar bugs in the sprite builder and map editor, so if you downloaded them you need to download them again.

first alpha

Notes:
- I paused the norn because I need help getting the pose genes to make sense. To set him to a certain pose, say pose 1, open the console with shift+ctrl+c and type:
"GameObjectInternal::ron().sprite().frame = 1;"
If you make a typing error the next console command will crash. I know why this happens, but it isn't in my code, so I've contacted the developer of that library about it.

- collision doesn't work for no discernible reason. But i'm sick of looking at the windows screen, because I found the windows laptop at a thrift store for cheep, and it's screen is like 10 inches across. It's hard to do anything on it.

-- when you close the problem it will say it has a runtime error, this is a problem in the GUI toolkit I used, not in my code, so the program did in fact exit correctly, but windows won't shut up.


Bifrost wrote:
Open air should be left transparent, right?



Right.

Bifrost wrote:
And then a different colour for different types of floors, like soils and concrete and stuff, right?



Colours define permeability, CA emission/absorption, and what sound effects/particle effects play on collision. Currently no color is defined as meaning anything. So just do whatever makes sense to you personally. It's trivial to change the colors later with the bucket fill tool, one of the reasons I did it that way instead of having to set the attributes of each room manually.

Bifrost wrote:
Should water areas be coloured, and how do I treat the floors in the water?



The same as any other floor, just leave water transparent like open air, once I add fluid objects you'll add a fluid object to that location to represent the water. This way water level can go up and down, etc.


Donate to the development of Kreatures

(The unofficial Creatures 4)

 
Bifrost

Bifrost
Norway  


  2/7/2017

I've got two image files right now, both saved as .png. The room map image is just one image yet, but I'll divide it into more when I get a grasp on the next step. I understand that I somehow need to get them to .blk format. How do I do this? Photoshop doesn't have that option.

Background png.
Room map.

 
Bifrost

Bifrost
Norway  


  2/7/2017

Another thing. Do I still need overlapping areas on the sides?
 
Geat_Masta

Geat_Masta
United States  


  2/7/2017  1

Bifrost wrote:
I've got two image files right now, both saved as .png. The room map image is just one image yet, but I'll divide it into more when I get a grasp on the next step. I understand that I somehow need to get them to .blk format. How do I do this? Photoshop doesn't have that option.



Sorry, I guess the map editor UI is very unclear. Okay, in the map editor go to replace->background->baked map and select the .png

Bifrost wrote:
Do I still need overlapping areas on the sides?



Nope!


Donate to the development of Kreatures

(The unofficial Creatures 4)

 
Geat_Masta

Geat_Masta
United States  


  2/7/2017

It looks like there's a glitch in the map editor, hang on. It looks like it's processing your transparency as if it's a color. But it didn't do that to me....

Donate to the development of Kreatures

(The unofficial Creatures 4)

 
Bifrost

Bifrost
Norway  


  2/7/2017

Overwriting the images now. I'll try them out in the map editor later, after dinner and a swim, and perhaps some studying. Probably tomorrow morning (CET).
 
Geat_Masta

Geat_Masta
United States  


  2/7/2017

Fixed the bug

I'm wondering if it would be better to blow it up in engine now that I see how big that file is, at the same time look at how crummy the chemical mixing machine looks, it will need to eventually be fixed by hand.

BTW, you can open the background files and replace the images at any time, but you can't swap backgrounds in engine, because the collision data is part of the background file.


Donate to the development of Kreatures

(The unofficial Creatures 4)

 
Bifrost

Bifrost
Norway  


  2/7/2017

The collision data is what the 16 colour room map makes, right?
 
Geat_Masta

Geat_Masta
United States  


  2/7/2017

Bifrost wrote:
The collision data is what the 16 colour room map makes, right?



Yes, BTW I can increase the color depth to whatever I want, I picked 16 because I wanted it to be very clear where the boundaries of one to the other kind are. When I say it's better to layer them, that really only means that weird things happen where one kind of room meets another kind, and it's better for it to do them separately and let it intersect.


Donate to the development of Kreatures

(The unofficial Creatures 4)

 
Bifrost

Bifrost
Norway  


  2/7/2017

Holy Shee it works!

There are still a few quirks that needs tuning - a couple of weird gaps, tiny holes and weird nooks, but that should be fixable from the room map. I'm noticing a few areas made too thin and things like that. But it works!

What can I do now to inject this world into the Kreatures engine?

 
Bifrost

Bifrost
Norway  


  2/7/2017

About cutouts and foregrounds, are these supposed to be made in one image now? Like, I can "extract" them from the original background image, into separate .pngs, one for the parts I want affected by lighting, and one for the parts I don't want affected by the lighting, and just "replace" them onto the map?
 
Geat_Masta

Geat_Masta
United States  


  2/7/2017

Bifrost wrote:
Holy Shee it works!

There are still a few quirks that needs tuning - a couple of weird gaps, tiny holes and weird nooks, but that should be fixable from the room map. I'm noticing a few areas made too thin and things like that. But it works!



I think those are problems with the algorithm actually, I made it ignore rooms of a certain thinness to avoid some areas being made too thin, but it left the areas that are too thin and put in weird gaps. *shrug* On my todo list.

Bifrost wrote:
What can I do now to inject this world into the Kreatures engine?



Well it'll be weird, I'm trying to fix the scaling now, in the version you have everything will be too big, in my current build everything's the right size but half of it went off screen for some reason.

Okay, let me explain the bootstrap:
Each folder will represents a world when the world switcher is made, aside from common, scripts can load any script in their own folder or in common, but not in other world's folders. This means that if a script is in common then you have permission to use it in your metaroom.

Currently it's hard coded to start by loading every file in Burrows and executing main(), so you need to modify main()

So open Bootstrap/Burrows/main.jc and look for createBurrows(), getBackground is loading a background file into the engine and returning an anchor, the anchor it returns is a handle for the metaroom's coordinate system.

So save the regenesis.bak in the Backgrounds folder, and change "burrows" to "regenesis"

On the next line you can see buro.connect(buro, Direction::Left, 0). This is telling the engine to connect the left side of the coordinate system 'buro' to the right side of the coordinate system 'buro' with a vertical offset of 0. So you don't have to change anything to get the world wrap there.

Next notice in main() we have buroGravity = new PhysicalZone(burro, null); That's saying to create a physical zone that occupies the entirety of the coordinate system 'buro'. the null isn't important.

Above that you'll see that I've created a variable PhysicalZone buroGravity. That has to be declared outside of a function so the gravity doesn't get deleted when the function exits. This is true of all objects except for backgrounds and GameObjects.

Following line you see burroGravity.acceleration = { 0, 256} This is saying to apply a Y acceleration of 256 pixels per second to whatever's in the physical zone every tick.

I'm sure by this point you've noticed the code to add elevators. Yes adapting objects from one metaroom to another is really that easy in the Kreatures engine, so if you want you can start putting in placeholder objects to say where things should go when they get programmed.

Bifrost wrote:
About cutouts and foregrounds, are these supposed to be made in one image now? Like, I can "extract" them from the original background image, into separate .pngs, one for the parts I want affected by lighting, and one for the parts I don't want affected by the lighting, and just "replace" them onto the map?



Yes, I found adding overlays manually far too tedious.


Donate to the development of Kreatures

(The unofficial Creatures 4)

 
Geat_Masta

Geat_Masta
United States  


  2/7/2017

I updated the version of kreatures in the previous link, it backgrounds will now be rendered at the correct size.

I'd like to use regenesis rather than coming up with my own testing scenarios, is there a way I can automate getting a copy of the changes every morning? I was going to suggest making a github repo for it, but it doesn't allow files > 100 MB, which includes the regenesis background.


Donate to the development of Kreatures

(The unofficial Creatures 4)

 
Bifrost

Bifrost
Norway  


  2/7/2017

If the two .pngs I linked above are okay, I can make sure to keep them updated there when I make any changes. I'll also add the foreground and cutout images once I've got them ready.
 
Geat_Masta

Geat_Masta
United States  


  2/7/2017

Do you own the winterblades.org server? If the Kreatures Regenesis was in it's own folder and the server has rsync installed I can use that.

https://www.howtoforge.com/mirroring_with_rsync

So before I said about placeholder objects, this is what I mean:

you would make a file Common/placeholder.jc:

import all;

class PlaceHolder extends GameObject
{
method initialize(Builder self)
{
self.addMovement(Standard);
self.addRender(Standard);

self.registerScript(Script::Click, onClick);
}

method onClick(Point2F pos)
{
stdlib::print("current position = " ) ;
stdlib::println(this.movement().position().toString());
}

method PlaceHolder(const string filename, int frame, const Anchor anchor, const Point2F position) extends GameObject()
{
mouseable(1);
clickable(1);

sprite().file = filename;
sprite().frame = frame;
sprite().drawOrder = 1000;

movement().setPosition(anchor, position, null);
}
}


Then in Common/cheese.jc:


import Common.placeholder;

class Cheese extends PlaceHolder
{
method Cheese(const Anchor anchor, const Point2F position) extends PlaceHolder("cheese", 1, anchor, position) {}
}


Now you can add new cheese objects with:


new Cheese(regenesis, {x, y});


So you can write the main() function that populates your world with objects and position things while another person actually writes the code to make it functional, because the code defining what happens when a cheese is interacted with isn't affected by the code that actually adds it to the world.


EDIT: you need to open kreatures.exe in the windows command prompt to see script errors and the results of the println statements in the scripts.


Donate to the development of Kreatures

(The unofficial Creatures 4)

 
Geat_Masta

Geat_Masta
United States  


  2/7/2017

People keep telling me to set up a donation/kickstarter/whatever, so if you want to contribute you can give to my papal account: pdjeeves(at)zoho.com

Donate to the development of Kreatures

(The unofficial Creatures 4)

 
Bifrost

Bifrost
Norway  


  2/8/2017

Okay. So far, so good. I've been able to get the world into the engine. Latest version of the engine installed. The world is still double size, and everything in the game is frozen in mid-air. The moment I right click the norn, it moves slightly, and the game turns unresponsive.

When it comes to rsync, the guide didn't say anything about how to do it from Windows. Also, I'm renting a server from one.com, and I'm not sure about the restrictions to it, but I can try to see if I get it working.

 
KyAnn

KyAnn
United States  


  2/8/2017  1

Geat_Masta wrote:
People keep telling me to set up a donation/kickstarter/whatever, so if you want to contribute you can give to my papal account: pdjeeves(at)zoho.com



Another benefit to setting up a crowd funding project, is that you also get more exposure. I personally like Patreon, since it seems a little more relaxed than Kickstarter. If you'd rather keep it under wraps for now, that's fine too! ;)

 
Geat_Masta

Geat_Masta
United States  


  2/8/2017

Bifrost wrote:
The world is still double size



Really? The lift is 1.75 inches tall on both platforms for me....

Bifrost wrote:
and everything in the game is frozen in mid-air.


None of them have gravity turned on, the norn has it turned off so people can cycle him through his walk animations, I need someone to fix his poses in the ron.egg file, so i turned it off to make it easier.

It occurs to me that [URL]https://notepad-plus-plus.org/download/v7.3.1.html" target="_blank">notepad++[/URL] will work better for editing files because it can deal with the different systems having different newline characters.

Bifrost wrote:
The moment I right click the norn, it moves slightly, and the game turns unresponsive.



Okay, that bug happens for me too, it may take me a while to find what's causing it, hang on.


Donate to the development of Kreatures

(The unofficial Creatures 4)

 
Geat_Masta

Geat_Masta
United States  


  2/8/2017

Try it now. any good?

Donate to the development of Kreatures

(The unofficial Creatures 4)

 
Bifrost

Bifrost
Norway  


  2/8/2017

The game no longer freezes. The sizes are messed up, though, as you can se here: http://winterblades.org/Kreatuers.png
Only the call buttons seem to be normal (half) size.

 

prev | 1 | 2 | 3 | 4 | 5 | ... | 14 | 15 | next

downloads
cobs
adoptions
creaturelink
metarooms
breeds
 
gallery
art
wallpaper
screenshots
graphics
promos
sprites
dev
hack shack
script reservations
dev resources
active projects
dev forum
 
community
links
advice
chat
polls
resources
creatchi
 
forum
bookmarks
general
news
help
development
strangeo
survivor
mycaves
log in
register
lost pw
1 online
Bifrost
creatures caves is your #1 resource for the creatures artificial life game series: creatures, creatures 2, creatures 3, docking station, and the upcoming creatures family.

contact    help    privacy policy    terms & conditions    rules    donate    wiki