GSoC project: Hedgeroid Netplay - frontlib progress

Hello again.

Over the last weeks, I have been busy working on the new frontend library (frontlib for short), which is written in plain C for best portability. By now, the scope of the library has become clearer, so I want to give a short overview of what it will look like, what already works, and what still needs to be done. As you can see in the image above, one of the things that already work is the map preview rendering.

In my last blog entry, I wrote that there would be a function for each kind of message that could be sent to the engine or the server, and a callback function for each kind of message that could be received. Since then, I have become convinced that this low-level approach is not a good idea, since using a library with that API would not actually save much work.

The first important change is that the frontlib now contains data structures that can hold all important game configurations: The choice of map, team and hedgehog information, game and weapon schemes. It can also read and write .ini files with these settings, so it now handles more than just networking.

As a consequence, the frontend can now quickly build a game configuration by loading weapon schemes and other settings from .ini files, and then ask the frontlib to pass this entire configuration to the engine. The same data structures will also be used for netplay communication, so it will be easy to tie everything together and e.g. start the engine with game settings received from the server.

To start a new game, the frontend can now pass the entire configuration to the frontlib at once, and let the frontlib work out how and when it needs to be sent to the engine. Likewise, the callback functions have changed in keeping with this higher-level approach.

Hi everyone!

Time for this weeks A&O.

I've pretty much finished upgrading everything thats relevant to GL2+ and GLES 1.3+.
Meaning we should be more or less ready for ES2.
For the water rendering (It really just was a vertical gradient), I've added a seperate shader.

The only stuff thats still missing to be upgraded is the stereo draw mode.

For this week I've planned starting to finally integrate the rectpacker into the engine.
Both modes, GL2 and the original FFP GL1.x mode should benefit from this, as this reduces
the amount of times textures must be changed.

I'm as well trying to get an ES2 emulation layer on my desktop in order to find the last missing pieces, keeping the GL2 version incompatible.

GSoC Project: A New Adventure - Update #1

Hi everyone!

The first milestone in the campaign creation phase is over, so it's time for an update.

The first step in creating a campaign was allowing certain variables to be passed between missions so that the story could modify based on the action taken/decisions made on previous missions. It is now possible to save and request these variables from within a Lua script by calling SaveCampaignVar and GetCampaignVar. The first function takes two arguments, the variable's name and its value, and creates/modifies an entry in the selected team's ini file, in the section corresponding to the campaign. GetCampaignVar takes a single argument, the name of the variable and returns a string value, so it is up to the creator of the script to convert it to whatever type necessary. It is also required that the progress is modified if it is the case.

In order for a new campaign to be added to the game, a directory with the name of the campaign needs to be added in Data/Missions/Campaign. In this directory there has to be a campaign.ini file and scripts for each mission. campaign.ini has to contain the following lines:

MissionNum=number_of_missions
ResetRetry=1 or 0 // whether the progress should be reset in case the player decides to retry a previous level

In addition to these, there needs to be a section for each mission, containing its name and the name of the script (Name and Script).
For example:
[Mission 1]
Name=Ultimate Hedge Mission
Script=ultima.lua

The next step was creating a frame for the story of the campaign. The story in its current state can be found at the links below. Suggestions are welcome!
SPOILER ALERT!
http://dl.dropbox.com/u/69740901/HWStory.odt
http://dl.dropbox.com/u/69740901/HWStory.doc

Hi everyone!

As promised last week, we now have a GL2 version that uses GLSL 1.20 shaders (with a few compatibility propfile features) to render everything.
I've as well replaced all projection related code by using a plain uniform matrix.
This is an essential step towards the non FFP using GLSL 1.30+ transition, which we will need for ES2+ or GL3+ only systems.

So far everything, but the water rendering, runs smooth.
I did not decide, yet, if I shall honor per vertex coloring for all sprites or if we'd have
an additional, independant render pass for the water, as only the water requires this feature.

By next week I hope to have a fully functional GLSL 1.30+ pipeline.
The major changes involved here, are replacing all gl*Pointer stuff with attributes,
as well as removing some leftover FFP state as glColor to uniforms.

Once this is done I'll need to rewrite the stereo rendering, which, due to using quite some FFP, is most likeley broken at the moment.
At that point we should pretty much have forward and backward compatibility ranging from GL1.1 to GL4.x and I can finally start with the actual atlas optimization, which I already prepared two weeks ago.

GSoC project: Netplay for Hedgeroid - First update

Hi everyone.

It has been a while since I introduced my project, and I hear that some people are keen to find out what I have been up to so far. Unfortunately, I was very busy during the community bonding period before the official start of the GSoC this week, finishing my university work and moving out of the shared student apartment. This is now all wrapped up though, and I have started working on netplay for Android.

As the first step, I am working on a change that is completely invisible to the player, but will make it easier to implement netplay for iOS and other platforms.

In order to support netplay, the frontend of Hedgewars needs code to communicate with both the server and the game engine, and to pass messages between the two. This code needs to do the same on any platform, but right now the frontend is developed separately for PC, iOS and Android. So, to avoid duplicate work for every frontend, I am working on a portable library that can handle the low-level networking and parsing of messages for all frontends.

So far, I have discussed options for the implementation of this library, tried to find the best networking library that works on all platforms, and decided to use C/C++ combined with SDL_net unless I hit serious problems with it. The big upsides of SDL_net are that it is easy to use, very portable, and we already use it in the game engine, so it does not add a new depencency. On the downside it does not support IPv6, but I hope that this will be added once IPv6 becomes more widely used.

Next, I will look through the existing source code to understand and document the current protocols used between frontend and engine, and between frontend and server.

Syndicate content

User login

Copyright © 2004-2024 Hedgewars Project. All rights reserved. [ contact ]