Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

878352 Posts in 32917 Topics- by 24331 Members - Latest Member: Tatazilla

May 21, 2013, 05:30:42 PM
TIGSource ForumsDeveloperFeedbackDevLogsmoonman (v0.3 win+osx 01/02/13)
Pages: 1 [2] 3 4 ... 105
Print
Author Topic: moonman (v0.3 win+osx 01/02/13)  (Read 81780 times)
eigenbom
Level 10
*****



View Profile WWW
« Reply #15 on: October 10, 2011, 01:48:41 AM »

another animation test: ____________
Logged

eigenbom
Level 10
*****



View Profile WWW
« Reply #16 on: October 10, 2011, 05:17:17 PM »

Logged

cactus
Makeout King
Level 5
******



View Profile WWW
« Reply #17 on: October 10, 2011, 05:33:22 PM »

Love the style in this.
Logged
Ashkin
Level 10
*****



View Profile
« Reply #18 on: October 10, 2011, 05:36:56 PM »

I just want you to know that the player's unending and almost maniacal grin, even (especially?) when he's holding a weapon of mass destruction, unnerves me to no end.
Logged
eigenbom
Level 10
*****



View Profile WWW
« Reply #19 on: October 10, 2011, 05:44:34 PM »

@cactus cheers! and i loved psychosomnium btw

@ashkin haha, yeh i noticed/felt that too. i figure it will offer a nice mood to the game, initially you just think he is happy, but then the grin never falters even when he (you) are killing things, so you might end up really fearing this small clump of pixels..
Logged

xoorath
Level 2
**


I make things.


View Profile WWW Email
« Reply #20 on: October 10, 2011, 07:51:37 PM »



Work that strut! Daaaayyyyyyuuuummm gurl!
Logged

BadgerManufactureInc
Guest
« Reply #21 on: October 11, 2011, 05:00:27 AM »



This looks very good. I'm excited about playing a demo.

Are you using a tilemap engine?  If so, I'd be interested to hear how you are doing the collisions.
Logged
eigenbom
Level 10
*****



View Profile WWW
« Reply #22 on: October 11, 2011, 03:16:03 PM »

@xoorath aw yeh!

@barnaby Cheers! The world is split into a grid, each cell has a 32-bit coordinate, so at a walking rate of 8 blocks a second, it will take about 17 years to get from one side of the world to the other. Shocked As for the collisions, the method I'm using has not really been tested on large numbers of entities, but seems to work ok.

Each object in the world gets an integer width w and height h (e.g., 1x3 for moonman), and a collision width and height (.9x2.8 for moonman). the collision width and height are less than the actual width and height so moonman can fall in unit width holes, fit nicely into a cave of height 3, etc.


Sensors are placed on an entity at the junctions of their geometry, so moonman has 8 sensors, 4 on each side. Which sensors are used depends on the direction the entity is going. So when falling straight down only the two bottom sensors are user.

In an update step, the entity's position is updated, and each appropriate sensor is traced through the world using this algorithm. The tracing splits the sensor up into segments, each of which are tested against the cells in turn for collision. If the cells contain a full block or an empty block then the check is trivial. If the cell contains a slope then a little more code magic is required.

That's the general idea, but its a little more complicated. For instance, if the sensors are just points, then some funny stuff can happen, like getting caught on the side of a cliff as you fall. So instead, I include the two adjacent edges to the sensor when checking the collision.

A few random notes:
  • When landing on a slope the bottom-side sensors are ignored, and a bottom-center sensor is used instead.
  • Entities have an onGround flag, and the physics and collisions are done differently based on this.
  • The raycasting can be simplified if you cap the velocity of entities to one tile per frame - but i haven't done this.

Some more refs:
http://info.sonicretro.org/Sonic_Physics_Guide
http://www.gamedev.net/topic/509143-how-to-go-about-platformer-physics/

« Last Edit: October 11, 2011, 03:22:37 PM by eigenbom » Logged

Pemanent
Level 2
**



View Profile Email
« Reply #23 on: October 11, 2011, 03:33:41 PM »

Yeah agreed on the characters smile. Reminds me of No Country for Old Men
Logged

eigenbom
Level 10
*****



View Profile WWW
« Reply #24 on: October 11, 2011, 03:46:16 PM »

and just to burn that association into your minds ... Addicted



« Last Edit: October 11, 2011, 04:11:25 PM by eigenbom » Logged

Belimoth
Level 9
****



View Profile
« Reply #25 on: October 11, 2011, 05:50:29 PM »

and just to burn that association into your minds ... Addicted



Needs a themesong.
Logged

Pemanent
Level 2
**



View Profile Email
« Reply #26 on: October 11, 2011, 07:09:49 PM »

 Epileptic I'm not going to sleep tonight.


anyways. back to the game. I'm really intrigued so far!
Logged

eigenbom
Level 10
*****



View Profile WWW
« Reply #27 on: October 13, 2011, 06:59:14 PM »

Exploring syntax for custom object creation in moonman. Somewhat following the design of the mod system in dungeon siege (url). I'm interested if this script is readable for those who aren't familiar with Lua or scripting in general.

Also, a Q for any mods reading, are we able to get syntax highlighting enabled for the code tags for Lua?

Pastebin higlighted version
Code: (Lua)
-- A prototype of custom sword creation in moonman.
-- BP 14.10.2011

local custom_sword_sprite_id
local custom_sword_id

-- this function creates a template for the new sword
local function custom_sword()
return {
name = "custom sword",
inherits = core_entities.sword,
-- set the default attributes
attributes = {
damage = 10,
speed = 2,
sprite = custom_sword_sprite_id
},
-- this sword kills outright for enemies
-- not wearing armour
onHit = function(self,enemy)
if (not enemy.armor) then
send_message(core_messages.kill, {target=enemy})
return true -- handled
else
return false -- run normal sword onHit
end
end,
-- 5% of swords spawned are practically useless against armoured enemies
onSpawn = function(self)
if (random()<.05) then
self.damage = 1
end
end
}
end

-- the recipe indicates what amount of
-- each item goes where in the 5x5 crafting matrix
-- in this case: its just a vertical line in the center
local recipe = {
craft.coord(2,0) = {core_entities.steel,2},
craft.coord(2,1) = {core_entities.steel,2},
craft.coord(2,2) = {core_entities.steel,2},
craft.coord(2,3) = {core_entities.ebony,2},
craft.coord(2,4) = {core_entities.ebony,2}
}

-- finally, the onLoad function is called at setup
-- and registers the new sprite, sword type, and recipe
-- for building the sword
function onLoad()
custom_sword_sprite_id = register_sprite("custom_sword_sprite_id", "sprites/mysword.sprite")
custom_sword_id = register_entity("custom_sword", custom_sword())
register_recipe(custom_sword_id, recipe)
end
Logged

xoorath
Level 2
**


I make things.


View Profile WWW Email
« Reply #28 on: October 13, 2011, 09:35:05 PM »

Also, a Q for any mods reading, are we able to get syntax highlighting enabled for the code tags for Lua?

Is there syntax highlighting for any language?
Logged

eigenbom
Level 10
*****



View Profile WWW
« Reply #29 on: October 15, 2011, 11:43:09 PM »

@xoorath not sure, but there should be!

Update: Alrighty, I'm now getting back to the game after a few hectic days graduating and partying. Today I just played with the mockup a little, tweaking the colours a bit and adding some subtle texturing and lighting. I think the mockup is starting to approach something I would be happy with visually.

Logged

Pages: 1 [2] 3 4 ... 105
Print
Jump to:  

Theme orange-lt created by panic