Inanimate
|
|
« Reply #220 on: January 08, 2012, 10:14:32 PM » |
|
Just doing my duty for my nation, sir!
|
|
|
Logged
|
|
|
|
eigenbom
|
|
« Reply #221 on: January 09, 2012, 02:58:48 AM » |
|
few 8x8 experiments before bed
|
|
|
Logged
|
|
|
|
Angelbait
Level 1
SCARY!
|
|
« Reply #222 on: January 09, 2012, 09:06:19 AM » |
|
few 8x8 experiments before bed Fun!
|
|
|
Logged
|
|
|
|
eigenbom
|
|
« Reply #223 on: January 09, 2012, 10:05:38 PM » |
|
Update: Did some refactoring of the component system, just to make the syntax a bit cleaner. Also started on inventory management, which I'll then hook up the UI. And for a I did a loc count (with codeanalyzer).. Metric Value ------------------------------- -------- Total Files 129 Total Lines 28313 Avg Line Length 28 Code Lines 18919 Comment Lines 5419 Whitespace Lines 4618 Code/(Comment+Whitespace) Ratio 1.88 Code/Comment Ratio 3.49 Code/Whitespace Ratio 4.10 Code/Total Lines Ratio 0.67 Code Lines Per File 146 Comment Lines Per File 42 Whitespace Lines Per File 35
|
|
|
Logged
|
|
|
|
helgravis
|
|
« Reply #224 on: January 10, 2012, 12:19:39 PM » |
|
For a very small moonman, the sprite has so much detail! It reminds me of Mincraft so much, except in 2D. Is there gonna be crafting involved?
|
|
|
Logged
|
|
|
|
eigenbom
|
|
« Reply #225 on: January 10, 2012, 01:08:34 PM » |
|
Hey @helgravis, thx for reading my devlog. My plan is that there will be crafting, both of fixed items like swords, and dynamic ones like machines, space ships, pumps, automated platforms, etc. The machine building probably won't be fully implemented for quite some time, as at the moment I'm just trying to get a minimally complete game done.
|
|
|
Logged
|
|
|
|
helgravis
|
|
« Reply #226 on: January 10, 2012, 07:47:01 PM » |
|
Good idea. I'm like feature creeping so much on my project that I'm thinking of going with chapter releases just to get something out.
|
|
|
Logged
|
|
|
|
eigenbom
|
|
« Reply #227 on: January 10, 2012, 09:50:32 PM » |
|
Had a bad day today, not feeling too crash hot. Nonetheless, started work on the WorldObjectSystem and InventorySystem, the former which manages all the objects which are physically in the world (typically affected by physics), and the latter manages those that are in inventories. So in order to pickup an item, the logic goes: WorldObjectSystem::update forall entities, e, which have the can_pickup attribute: forall nearby entities, i, with the pickupable attribute: sendMessage(ENTERED_PICKUP_DISTANCE_OF_ITEM)
MoonmanController::onMessage if m==ENTERED_PICKUP_DISTANCE_OF_ITEM: if we can pick this up, then sendMessage(ATTEMPT_PICKUP)
InventorySystem::onMessage if m==ATTEMPT_PICKUP: find free inventory slot add item to inventory remove item from WorldObjectSystem and PhysicsSystem
All so I can now have items in the world which can be picked up! Voila: The really cool thing is that now I just have to add the pickupable attribute to an entity in order to make in pickupable (as well as the gui_icon and a couple other bits). And the same goes for the can_pickup attribute -- if I add that to an NPC (along with the inventory property) it will then have the ability to pick things up. It's a little more complex than this, but that's the general flavour...
|
|
|
Logged
|
|
|
|
BlueSweatshirt
|
|
« Reply #228 on: January 10, 2012, 10:04:31 PM » |
|
That's a nice little system. The optimizer in me says "NO DON'T LOOP THROUGH ENTITIES AGAIN!" but I don't really see a way around that. If I may ask, how does the messaging (sendMessage()) work in your game?
|
|
|
Logged
|
|
|
|
Happy Shabby Games
|
|
« Reply #229 on: January 10, 2012, 10:09:03 PM » |
|
for pushing through the bad days and taking care of business.
|
|
|
Logged
|
|
|
|
eigenbom
|
|
« Reply #230 on: January 10, 2012, 10:12:00 PM » |
|
That's a nice little system. The optimizer in me says "NO DON'T LOOP THROUGH ENTITIES AGAIN!" but I don't really see a way around that. If I may ask, how does the messaging (sendMessage()) work in your game? Yeh, no you are absolutely right, WorldObjectSystem will eventually bucket things together spatially so as to reduce the complexity. As for the messaging, each system implements onMessage(Message* m, ID id), and Entity has a send(Message*) function which sends the message to all the systems it is connected to. for pushing through the bad days and taking care of business. Cheers dude!
|
|
|
Logged
|
|
|
|
eigenbom
|
|
« Reply #231 on: January 10, 2012, 10:50:40 PM » |
|
Here's a youtubes of me jumping and throwing potions around
|
|
|
Logged
|
|
|
|
Ashkin
Guest
|
|
« Reply #232 on: January 10, 2012, 10:58:01 PM » |
|
Good to see it's relatively lag free even with that many entities on screen at once. Could do with some friction though.
|
|
|
Logged
|
|
|
|
eigenbom
|
|
« Reply #233 on: January 11, 2012, 12:26:27 AM » |
|
Yeh friction would be nice! It's on the to do list... :D
|
|
|
Logged
|
|
|
|
Angelbait
Level 1
SCARY!
|
|
« Reply #234 on: January 11, 2012, 10:06:35 AM » |
|
Update: Did some refactoring of the component system, just to make the syntax a bit cleaner. Also started on inventory management, which I'll then hook up the UI. And for a I did a loc count (with codeanalyzer).. Metric Value ------------------------------- -------- Total Files 129 etc...
Is it valuable info to know all this? / How can you put this knowledge to use? Here's a youtubes of me jumping and throwing potions around - Loving your game here man.
|
|
|
Logged
|
|
|
|
eigenbom
|
|
« Reply #235 on: January 11, 2012, 01:35:46 PM » |
|
@Angelbait Haha, cheese for everyone, nice one .. I might have to put cheese into my game now... As for the code stats, I thought it'd be cool to post it now, and then in 3 months time have a look back.
|
|
|
Logged
|
|
|
|
eigenbom
|
|
« Reply #236 on: January 11, 2012, 05:13:55 PM » |
|
Update: Mocking up more gui ideas. (Yellow are notes). This time seeing if I can fit things into 800x600, which it turns out is easy with 24x24 icons and a 8px font. Question: At this res do you think the buttons or text is too small?
|
|
|
Logged
|
|
|
|
SolarLune
|
|
« Reply #237 on: January 11, 2012, 05:58:32 PM » |
|
Update: Mocking up more gui ideas. (Yellow are notes). This time seeing if I can fit things into 800x600, which it turns out is easy with 24x24 icons and a 8px font. Question: At this res do you think the buttons or text is too small? GUI's readable to me. Nice, clear font, too. Make sure you can minimize the inventory system stuff, and I would make the console at the top-left just display a few lines. Otherwise, it's awesome-looking.
|
|
|
Logged
|
|
|
|
eigenbom
|
|
« Reply #238 on: January 11, 2012, 06:04:38 PM » |
|
@Solarlune, great, thx for the tips. Yeh that screenshot shows all the inventory stuff active, but minimised it'll look something like this (i <3 minimal gui!)
|
|
|
Logged
|
|
|
|
SolarLune
|
|
« Reply #239 on: January 11, 2012, 06:09:08 PM » |
|
Nice. That looks perfect. Only other thing I could propose is to fade out the console until something is written on it or you mouse over it, and the same with the inventory section (I'm a fan of minimalistic GUI, as well). Other than that, it's fine the way it is!
|
|
|
Logged
|
|
|
|
|