The Dark World
Presented by chrisyan2000
The Massively Multiplayer Online Hallucinegenic Mushroom Game Award
Presented by ntoll
Every time let me install lots of dependencies，I will not tell you the award meaning in retaliation, hahahaha
Presented by xmzhang1
Instant Messaging Support!
Presented by OrionDark7
Ratings (show detail)
Chillin with the blacksmith
|470.9 KB||mauve||2018/04/22 00:43|
|450.9 KB||mauve||2018/04/22 00:43|
The Dark World server code
|4.2 MB||mauve||2018/04/22 00:23|
Talking to NPCs
|584.2 KB||mauve||2018/04/20 23:42|
|413.7 KB||mauve||2018/04/20 23:41|
|445.3 KB||mauve||2018/04/20 00:22|
|173.8 KB||mauve||2018/04/19 00:36|
|253.6 KB||mauve||2018/04/19 00:35|
|56.3 KB||mauve||2018/04/17 23:45|
There's stuff everywhere
|346.6 KB||mauve||2018/04/17 00:03|
Model loading and rendering
|115.1 KB||mauve||2018/04/15 23:19|
Got something onto the screen
|36.3 KB||mauve||2018/04/15 15:53|
This morning one of the big tasks was to get the dark world looking right. It now has 3D walls, though due to some problems with the asset packs I was using there are some glitches in the way the tiles match up. I tried turning on shadows for the point lights, which looks great:
...but the performance wasn't good enough so I turned it off again.
$ wc -l darkworld/*.py ... 2436 total $ wc -l assets/js/dark-world.js 1064 assets/js/dark-world.jsThe game logic really started to dominate once the client was capable of loading and rendering models. More and more it was the interactions that were being coded and all of that is in Python. In fact there are quite a few things to do. One of the things you can do is shop with the blacksmith:
When I made the AI a bit better, the Dark World became pretty challenging, so I don't recommend going in individually.
I learned quite a lot this Pyweek:
- Using an existing asset pack is a huge time saver for 3D stuff. I could never have got so far if I had to model everything myself. I made 10 models myself, 2 of which were animated. The rest came from asset packs, and other free model sites.
- An existing 3D engine with a feature-complete model loader is a must. Coding these things is not a Pyweek activity, and in the weeks when I've tried it the gameplay really suffered.
- Having a REPL into your engine is amazing. Every game engine should do this.
Such a screen could be shown in response to other game events or NPC conversations.
Here is a screenshot showing larger objects and NPCs:
There are now challenges to solve (but they're extremely easy). I have the whole of tomorrow to turn this into a game, and the engine is mostly there. I have some ideas for content, but not enough. Need to get a good night's rest for the final day!
In fact a lot of the game now works. Working combat, player death, and loot drops (though there is only one loot item). The light world now doesn't let players walk into the water, and generates foliage over the whole map.
Also a whole team of people can go on a raid at once:
There are a lot of little bugs and race conditions. I've fixed a few of these but there are lots more.
The biggest problem is that game isn't fun at this point. It needs content; players need to be rewarded for doing things.
Still, this is a fairly good point to be at for the end of day 5.
- Player attack effect
- Enemy hit effect
- Enemy attack effect
- Player hit effect
- Enemy takes damage
- Enemy dies
- Player takes damage
- Player dies
- Player respawns
- Enemy AI
So I'm about half way through this list - players can kill enemies. Oh, and players can now speak to each other. Not much to see but here's a screenshot just to show some progress:
- Create a model in Blender (doesn't take long)
- Animate it using Blender keyframes (takes ages, Blender is terrible for this)
- Export it to GLTF
- Work out how three.js represents animations and write code to start them
- Debug why it isn't working
- Find the animation is kind of half broken due to feature mismatches between Blender, GLTF, and three.js
- Rework broken part of animation, go to step 2
So after a whole night's work I have added just sword swipes and a flapping bat.
I started today by squashing some of the bugs involved in sight ranges. One of the problems was that events weren't coming through when objects move in and out of your visible area. This is all working well. I also squished some of the reconnection problems I was experiencing, which means there are fewer confusing scenes when the server restarts :)
Having solved this, I worked on adding more objects to the world. Some of these you can stand on (and the object can respond to being stood on).
I used this to implement moving between worlds. This is best shown in video: https://youtu.be/7F1G-SFTrz8
After I actually got going today I started to put together a game engine. I now have a vague idea for the game I want to create - an MMO where there's a light communal creative world and a dark instanced dungeon world.
Partly this is attempting to scratch an itch I've had to try writing an MMO, but I wanted to explore new things, and the new things I've picked are asyncio and three.js. asyncio feels much like tornado or gevent which I've used extensively, but it's good to actually try it out and see what the libraries look like.
three.js is slightly more fiddly to use than I expected, but overall seems good. I got model loading and shadows working very quickly:
This already supports multiple users. In-game footage is here:
$ wc -l assets/js/dark-world.js run_server.py 426 assets/js/dark-world.js 428 run_server.py 854 total
Playing with Godot
Ugh, so Two Worlds was my lowest preference theme, and waking up this morning I immediately decided I didn't like the ideas I had for it.
While trying to come up with an idea, I spent some time installing Godot and Godot-Python, and I got an example working, but it's clear that the learning curve for Godot is steep. Using Python with it, which is almost undocumented, just makes that steeper. None of my ideas are simple enough that I would be able to achieve them in Godot in a week. I think the only way to come at that would be to develop some games in GDScript, Godot's built-in scripting language, first, to understand the API and capabilities.
I'm now looking at what I might be able to do with three.js. I think this is going to be a technology-driven Pyweek for me, where I work out what I can do with the technologies available rather than start from the theme and pick technologies to make my idea work.