Hello Guest

Recent Posts

Pages: [1] 2 3 ... 10
1
General / Hi question about Otter and For Kyle
« Last post by yolan51 on June 19, 2017, 04:16:59 PM »
Are you still working on it Kyle ? is their anyway for me to participate for free into developping it, I'd like to try to implement atleast a gamestate pattern to switch beetween GUI.

Or should I fork my own version somewhere ?

I'm interested in developping such framework since i did SFML in C back in 2012. The code get too easily messy when you need to build big thing with much organizing classes around your gameplay event and pixel correction.

I can do c#/Java easily.
2
General / Re: MonoDevelop - Fedora 25 - mono 4.8.0
« Last post by Kyle on June 16, 2017, 02:08:27 PM »
Running it on Linux and Mac is more up to SFML than me, unfortuantely, which support has not been that great.  I hope to make Linux and Mac versions more accessible with version 2.0 sometime in the future.  Sorry :(
3
Help / Sound and Sound Attenuation
« Last post by Power_Michael on May 23, 2017, 08:44:14 PM »
I am trying to implement sound that fades with distance in my game, so I have created a player who moves about a scene, and a boombox object that stays in one fixed location. I then defined the following in the boombox : entity class:
Code: [Select]
        Sound sound1 = new Sound("Sounds/salt.ogg", false);


        //Constructor
        public Boombox(float x, float y) : base(x, y) {
            var image = Image.CreateRectangle(32, Color.Orange);
            image.CenterOrigin();
            AddGraphic(image);

           // asf
            sound1.CenterSound(X, Y);
            sound1.RelativeToListener = false;
            sound1.Volume = 1;
            sound1.MinimumDistance = 0.5f;
            sound1.Attenuation = 2;
            sound1.Play();

and then in my player I have this line of code inside of my Update() method:

Code: [Select]
Sound.CenterListener(X, Y);
When I run the game, the song plays, but it doesn't fade when the player is farther away.
---Do note that it (sound1) is a full length song, and it is an .ogg.

So how would I go about making this work? Or does this feature not work properly? Please help :D

https://www.pifsc.noaa.gov/hawaiian_monk_seal/img/myth8_med.jpg // a seal to be ironic

-Michael
4
General / Re: MonoDevelop - Fedora 25 - mono 4.8.0
« Last post by PerryLan on May 15, 2017, 01:58:25 AM »
I don't see why the original code wouldn't work.
5
Help / Otter Slack Team
« Last post by Kyle on April 27, 2017, 05:26:22 PM »
The Otter community is much more active on Slack!

Join up here: http://otter2d.com/slack.php
6
General / Re: Saving and Loading
« Last post by Kyle on April 27, 2017, 05:23:56 PM »
Hey sorry I have been not checking the forums since we're all pretty much over on Slack these days.

There is a DataSaver class with some very simple functionality for saving and loading data.
7
Help / Re: Multiple graphics in one Entity - location question
« Last post by bacek on February 21, 2017, 09:40:24 AM »
spritemap.SetPosition(0f, image.Height);
Thank you, bro. That's exactly that I need.
8
Help / Re: Multiple graphics in one Entity - location question
« Last post by badman on February 21, 2017, 07:58:37 AM »
spritemap.SetPosition(0f, image.Height);
9
Help / Multiple graphics in one Entity - location question
« Last post by bacek on February 20, 2017, 07:12:52 AM »
Hello.
At first, thank you for simple and fast library.
I've got a question about multiple graphics. I have a spaceship sprite and a flame animation. They are always together, so I decide to add both graphics into one entity.
How can I change the location of flame? AddGraphics have no x,y arguments. I could use 2 entities, but in that case I'll need to change coordinates of flame manually when ship moves.
Here's constructor of my object
Code: [Select]

public Player() : base(Game.Instance.HalfWidth, Game.Instance.HalfHeight)
        {
            var img = new Image("Resources/player.png");
            img.CenterOrigin();
            AddGraphics(img);

            Spritemap<Animation> spritemap;
            spritemap = new Spritemap<Animation>("Resources/flame.png", 32, 64);
            spritemap.Add(0, "0,1,2,3,4,5,6,7", 10);
            spritemap.CenterOrigin();
            spritemap.Play(Animation.fire, true);
            AddGraphics(spritemap);
        }

What I see and what I need:

Thank you.
10
General / MonoDevelop - Fedora 25 - mono 4.8.0
« Last post by mythcat on February 18, 2017, 10:46:52 AM »
I need help with Fedora 25 linux , mono version 4.8.0 with this source code:
Code: [Select]
using Otter;

namespace otter_001
{
class Player : Entity
{
public Player(float x, float y) : base(x, y)
{
this.AddGraphic(Image.CreateCircle(120, Color.Red));
}
}


class Program
{
static void Main(string[] args)
{
Game game = new Game();
game.Color = Color.White;

Scene scene = new Scene();

Entity entity1 = new Player(0,0);
scene.Add(entity1);

game.Start(scene);
}
}
}
using MonoDevelop with Otter package
the result is this:
Code: [Select]
Debug]$ mono otter_001.exe

Unhandled Exception:
System.DllNotFoundException: csfml-graphics-2
  at (wrapper managed-to-native) SFML.Graphics.VertexArray:sfVertexArray_create ()
  at SFML.Graphics.VertexArray..ctor (SFML.Graphics.PrimitiveType type) [0x00000] in <4627602695ae459198965b45eda5cf65>:0
  at Otter.Graphic..ctor () [0x00000] in <671bea10edbe4cdca82eebf0945869ac>:0
  at Otter.Image..ctor () [0x00000] in <671bea10edbe4cdca82eebf0945869ac>:0
  at Otter.Surface..ctor (System.Int32 width, System.Int32 height, Otter.Color color) [0x0001d] in <671bea10edbe4cdca82eebf0945869ac>:0
  at Otter.Surface..ctor (System.Int32 width, System.Int32 height) [0x00008] in <671bea10edbe4cdca82eebf0945869ac>:0
  at Otter.Game..ctor (System.String title, System.Int32 width, System.Int32 height, System.Int32 targetFramerate, System.Boolean fullscreen) [0x0030e] in <671bea10edbe4cdca82eebf0945869ac>:0
  at otter_001.Program.Main (System.String[] args) [0x00001] in <30890a970f3947e19de2283312e9da8c>:0
[ERROR] FATAL UNHANDLED EXCEPTION: System.DllNotFoundException: csfml-graphics-2
  at (wrapper managed-to-native) SFML.Graphics.VertexArray:sfVertexArray_create ()
  at SFML.Graphics.VertexArray..ctor (SFML.Graphics.PrimitiveType type) [0x00000] in <4627602695ae459198965b45eda5cf65>:0
  at Otter.Graphic..ctor () [0x00000] in <671bea10edbe4cdca82eebf0945869ac>:0
  at Otter.Image..ctor () [0x00000] in <671bea10edbe4cdca82eebf0945869ac>:0
  at Otter.Surface..ctor (System.Int32 width, System.Int32 height, Otter.Color color) [0x0001d] in <671bea10edbe4cdca82eebf0945869ac>:0
  at Otter.Surface..ctor (System.Int32 width, System.Int32 height) [0x00008] in <671bea10edbe4cdca82eebf0945869ac>:0
  at Otter.Game..ctor (System.String title, System.Int32 width, System.Int32 height, System.Int32 targetFramerate, System.Boolean fullscreen) [0x0030e] in <671bea10edbe4cdca82eebf0945869ac>:0
  at otter_001.Program.Main (System.String[] args) [0x00001] in <30890a970f3947e19de2283312e9da8c>:0 
Pages: [1] 2 3 ... 10