Everlasting Summer (Defold edition)

I love this game and it very basic from programing perspective. So I decided to port it on Defold for learning and provide HTML5 version of it to people.

Unity version is pretty big -1.2GiB for 300MiB assets is strange, and packed version for android 800MiB is strange. Maybe I do not understand it fully, but when I use them as static, it grow enormous and load 2GiB of memory on start. Moved to resources and resource file is 700MiB and bigger. And I do not like to stretch images - they pretty and all athmosphere of game will be broken.

So, I started with Defold and currently I’m pretty happy with it.

And in ten lines of code able to change emotion and outfit of actress.

local OUTFIT_DRESS = 1
local OUTFIT_SPORT = 2
local OUTFIT_SWIM = 3
local OUTFIT_PIONEER = 4

go.property("outfit_no", 4 )


local OUTFIT_NAMES = {"outfit_dress", "outfit_sport", "outfit_swim", "outfit_pioneer"}

local current_outfit = OUTFIT_PIONEER


function init(self)
    msg.post("#outfit", "play_animation", {id=hash(OUTFIT_NAMES[current_outfit])})
end

If Defold will be so fine in future, it will be my primary game engine. Currently I’m in search of good one and Defold looking promising.

9 Likes

Looks like your first steps with Defold are bringing good experience.

How are you learning the engine? Bruteforceing through try and error? Using our manuals? Using gamesfromscratch videos?

I’m learn manuals and gfs text versions. And start is pretty smooth. Now looking for tutorials for code examples.
I’m professional programer and documentation of api is my starting point.
And doc is readable with examples of usage.

3 Likes

Trying to make basic text on top of images. Fonts is strange fixed by size. But when I understand that fonts - bitmaps, all goes easier.

Half of an hour and basic template for dialog panel is ready.

I have some strange problems with scaling. But on github I see some code to solve it.

5 Likes

Cool! Let us know if you need any help with any of it!

2 Likes

I missing aspect ratio fixing option. Maybe it should be at runtime I wonder.

GUI handles that automatically. For in-game you need to modify the render script to get what you need (altered viewport, letterboxing or whatnot)

Thank you. I will look at viewport magnifying after size changes.

There are several posts on the forum discussing this. Here’s one with a link to a custom render script that solves it for you: Locking the Aspect Ratio (SOLVED)

1 Like

Thank you, I will use it.

Imported fixed aspect ratio now it looks good. Squashing gone. But now I need to understand anchors for dialog elements.

Will look for decision about it.

2 Likes

Added sound to play ambient. Playing with go.property and sound gain.

1 Like

Published first static scene with ambient sound to gamejolt:
game on gamejolt

Very appreciated to Defold that it provide progress bar. My Unity games must have (4 Pro) for progress bar to show.

I wonder how long it will take to load entire game. It has 300MiB of content.

Some suggestions how to handle async loading of assets will be very helpful.

3 Likes

You need to look into collection proxies. Have some kind of main/controller collection with proxies to the different scene/level/episode collections you have in your game. Depending on the users actions you load and unload collections. An example of how to load/unload collections can be seen here: https://github.com/britzl/publicexamples/tree/master/examples/menu_and_game

1 Like

Thank you for pointing me. Will look for it. This can minimize game memory footprint drastically.

1 Like

Added dialog changes (two sentences) and showing of actor on second. Game comes to life. Now player can press SPACE and move text.

game updated to version 0.2

With LUA functions as first citisen I will add actor moving on stage as functions in script.

One question bothers me. Why separate gui script from basic game object script if I can send message between them?

Because the gui and the game are often fairly decouple from each other. Sure, the gui in the game probably reflects the state of the game somehow (score, health, gold etc) but that kind of transfer of information is pretty well suited for message passing.

Thank you for explanation. Now it clearer.

Introduced methods for story telling and actor moving into scene with basic emotions.

game version 0.3

Lua is alike JavaScript - easy to start but powerful enough for complex tasks. Function callbacks provide easy way to manage actors on dialog entries.

1 Like

The link is broken.