Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - wrightmat

Pages: 1 ... 14 15 [16]
226
Hmmm... I'll triple check my system config - I just thought I'd check with you too!

227
I went to compile the newest code, and all the sudden I'm getting a cmake error about not being able to find OpenAL which I didn't get yesterday when I compiled older code. I double-checked and my system does have libopenal installed.

Code: [Select]
-- Looking for include file pthread.h
-- Looking for include file pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE 
-- Found SDL2: /usr/local/lib/libSDL2main.a;/usr/local/lib/libSDL2.so;-lpthread (Required is at least version "2")
-- Found SDL2_image: /usr/include/SDL2 (found suitable version "2.0.0", minimum required is "2")
-- Found SDL2_ttf: /usr/local/include/SDL2 (found suitable version "2.0.12", minimum required is "2.0.12")
CMake Error at /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108 (message):
  Could NOT find OpenAL (missing: OPENAL_LIBRARY)
Call Stack (most recent call first):
  /usr/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315 (_FPHSA_FAILURE_MESSAGE)
  /usr/share/cmake-2.8/Modules/FindOpenAL.cmake:97 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
  CMakeLists.txt:18 (find_package)


-- Configuring incomplete, errors occurred!

228
Bugs & Feature requests / Fatal: Non-empty stack after LuaContext::update()
« on: February 16, 2014, 07:45:22 pm »
Not sure if this is a bug in the engine or the fault of my script, but I get the error "Fatal: Non-empty stack after LuaContext::update()" when one of my enemies is on the screen after a few seconds. The enemy script is below:

Code: [Select]
local enemy = ...

-- Octorok: simple enemy who wanders and shoots rocks

local going_hero = false
local awaken = false
local timer

function enemy:on_created()
  self:set_life(1)
  self:set_damage(2)
  self:create_sprite("enemies/octorok_red")
  self:set_hurt_style("monster")
  self:set_pushed_back_when_hurt(true)
  self:set_push_hero_on_sword(false)
  self:set_size(16, 16)
  self:set_origin(8, 13)
end

function enemy:on_movement_changed(movement)
  local direction4 = movement:get_direction4()
  local sprite = self:get_sprite()
  sprite:set_direction(direction4)
end

function enemy:on_obstacle_reached(movement)
  if awaken and not going_hero then
    self:check_hero()
  end
end

function enemy:on_restarted()
  if not awaken then
    self:go_random()
  else
    self:go_hero()
  end
  self:check_hero()
end

function enemy:on_hurt()
  if timer ~= nil then
    timer:stop()
    timer = nil
  end
end

function enemy:check_hero()
  local hero = self:get_map():get_entity("hero")
  local _, _, layer = self:get_position()
  local _, _, hero_layer = hero:get_position()
  local near_hero = layer == hero_layer
    and self:get_distance(hero) < 100

  if awaken then
    if near_hero and not going_hero then
      self:go_hero()
    elseif not near_hero and going_hero then
      self:go_random()
    end
  elseif not awaken and near_hero then
    self:wake_up()
  end
  timer = sol.timer.start(self, 1000, function() self:check_hero() end)
end

function enemy:wake_up()
  self:stop_movement()
  local sprite = self:get_sprite()
  sprite:set_animation("shooting")
  local x, y, l = self:get_position()
  local sx, sy = 0
  if d == 0 then
    sx = x + 8
    sy = y
  end
  if d == 1 then
    sy = y - 8
    sx = x
  end
  if d == 2 then
    sx = x - 8
    sy = y
  end
  if d ==3 then
    sy = y +8
    sx = x
  end
  sol.timer.start(self, 1000, function()
    local rock = self:create_enemy{
      breed = "rock_small",
      x = sx,
      y = sy
    }
    rock:go(d)
    sol.timer.start(self, 2000, function()
      self:check_hero()
    end)
  end)
end

function enemy:go_random()
  local m = sol.movement.create("random")
  m:set_speed(32)
  m:start(self)
  d = m:get_direction4()
  going_hero = false
end

function enemy:go_hero()
  local m = sol.movement.create("target")
  m:set_speed(48)
  m:start(self)
  d = m:get_direction4()
  going_hero = true
end

229
Development / Re: Cryptic error
« on: February 05, 2014, 08:38:56 pm »
Updating SDL worked perfectly! You are a genius, thanks!

230
Development / Re: Cryptic error
« on: February 05, 2014, 05:41:41 pm »
Confirmed that it happens with zsdx as well. Is there something wrong on my system? Is there a way I can debug this?

231
Development / Re: Cryptic error
« on: February 05, 2014, 05:38:16 pm »
That worked wonderfully - thank you! I'm slowly getting my scripts converted over to the new syntax, and I'm finding it to be much more concise and logical. Great job and thanks again for everything you've done with this engine!


Another oddity I encountered, except this one is graphical.



When I enter a map larger than the current screen, and move the character out of the initial drawing region, it appears that all of those tiles are never drawn (see above). The entities and dynamic tiles appear to be, but not the static tiles. If I leave and re-enter this map, say in a different area, a new region is drawn but I can once again move out of the drawn region.




Here's an image from the editor of what the area should look like,


I'm running Solarus 1.2.0 with 2D acceleration on (even stranger, if I run with acceleration off, I get no display at all - only a black screen) on Ubuntu linux 13.10.

232
Bugs & Feature requests / Editor improvements
« on: February 04, 2014, 05:34:36 am »
Christopho- mad props on the recent improvements to the editor - there are some great things there that really speed up development. Using the improved editor got me thinking of additional improvement potential, so I thought I'd post some here rather than making a bunch of issues on github (I can do that if you prefer).
  • A small "x" on each tab (for maps or whatever) to close it would be a huge time savings when you have several tabs open.
  • It would be nice (if possible) to have a small "play" button next to any drop-down selector for music. Sometimes I forget which music I want and being able to listed to several in the editor would be a great help. Or at least allow us to listen to the music when selecting it from the left pane?
  • When changing the id of an item in the left selector pane, the current id could be the default in the dialog.
  • Holding "control" and using the mouse wheel could zoom the view.
  • Making some tweaks to make the editor more friendly to smaller resolutions would be helpful - I have a machine running at 1024x768 and there are times when I can't see everything in a dialog box. One example is the new "destructible" dialog - would it be possible to lay things out differently so the dialog isn't so big?

233
Development / Cryptic error
« on: February 04, 2014, 05:17:40 am »
I was hoping I'd be able to get some help decrypting this error, because I don't understand why I'm getting one. I'm getting the following when I run my game:
Error: Failed to load script 'maps/1': [string "maps/1.lua"]:14: malformed number near '.0.shop_mushroom_done_dialog_finished'

The script around that line is:
Code: [Select]
  if destination == "main_entrance_shop" and game:get_value("i2021") == 10 then
    game:start_dialog("crista.0.shop_mushroom.7", crista.0.shop_mushroom_done_dialog_finished)
  end

And the function being called:
Code: [Select]
local function crista.0.shop_mushroom_done_dialog_finished()
  game:set_value("i3001", game:get_value("i3001")+1)
  hero:start_treasure("trading", 2)
end

I'm guessing it's related to changes in 1.2.0, since I don't recall having an error when running an earlier version.

234
General discussion / Re: Welcome!
« on: August 11, 2013, 07:11:15 pm »
I think the description's a bit clearer now - sorry I didn't realize that was there!

235
General discussion / Re: Welcome!
« on: August 07, 2013, 01:58:28 am »
Yay! Thanks Christopho!

My suggestion: a board for the Solarus engine so we can come up with cool new lua scripts and what-not.

Pages: 1 ... 14 15 [16]