GSoC project: Sprite engine overhaul - Weekly A&O report

Weekly A&O report

Hi everyone!
This is the very first of my weekly "Achievements and Objects", which will give you some ideas on what I've done so far and what i've planned for the next week.

Achievements

The first big piece of work that I already finished - actually I have done this during GSoC application period - is the rectangle packer.

The general problem is to fit a set of given small rectangles inside a larger rectangle which shall be as small as possible. The reason for wanting this is that graphics hardware prefers working with a single or few large textures over hundreds of small ones.
Unfortunateley there are no known algorithms that solve this problem perfect within feasable time.
Thats why some algorithm that doesnt necesarrily produce perfect results but at least "quite good" results is required.

In particular I've ported the MAXRECTS packer using the bssf heuristic as described here:
More Rectangle Bin Packing
This page contains quite a lot of in depth information about the general problem and as well visualizes different approaches.

The packers are licensed as public domain and thus the port is safe to be used for hedgewars.

You can take a look at my port here uBinPacker.pas.
As well try the test app test.pas

Last week I pretty much started messing around with the games code base.
Currently in the engine a sprite is represented like this: (ommiting irrelevant members)


TTexture = record
w, h: LongInt;
rx, ry: GLfloat;
vb, tb: array [0..3] of TVertex2f;
end;

w and h represent the physical dimension of the sprite in pixels.

The beginning of the adventure

The goal of the project is to port the game to web browsers so that people can enjoy it without installing and it runs on all platforms with a modern browser. Furthermore, web is the future and there will be more and more games that are web compatible. I'm proud that I can be one of the pioneers to try some new things and know how to get it to work.

Since the technology is not mature enough, there are a lot of problems that I can or cannot foresee. The project is not to "hardcode" the game using javascript but rather find a clever way to convert the game engine automatically, which facilitates update and generally is aimed to develop a workflow or framework to automate the conversion process. Pascal and javascript are two different languages; native and web are two different platforms; these differences in terms of language specification and API compatibilities makes the conversion challenging and is basically the problem my project is going to solve.

My proposal divides the project into three phases:
(1) Port run-time library functions that pascal uses into C, which can be converted into javascript using empscripten.
(2) Port SDL functions into C or javascript if needed.
(3) Port the OpenGL code into Web GL.

Phase 1 and phase 2 are pretty much project independent, i.e. I don't need to depend on others' work much. However, I still need to dig into existing tools like empscripten and pas2c to see how smart they are. Phase 3 depends on the optimized rendering system since WolfgangSt is going to rewrite it to make it ES 2.0 compatible, and without the migration, I cannot do the conversion either. Finally I will integrate all things together. If everything works neatly, then it is time to write a web front-end and invite people to play it!

I feel very lucky since I have an awesome mentor nemo who always gives me great help and inspires me a lot. Here I'd like to give my sincere thanks to him and all mentors in advance. And good luck to all participants!

GSoC Project: A New Adventure

Greetings to all!

My name is Szabolcs Orbán, also known as belphegorr on IRC, I come from Romania (Transylvania more specifically) and I am one of the students who got a chance to work on the game.

I will be working on a new campaign for Hedgewars. At the moment, the only options for a player eager to play against the computer offline are quick game and some (training) missions. What I will try to achieve are introducing support for interrelated missions (campaigns) and creating an introductory campaign that would also teach newcomers how to play.

A result of my work would be that performance/decisions made on a mission will be able to affect the behavior of future levels, thus allowing the creation of somewhat more complex stories, with multiple endings, surprises and nigh infinite drama!

I'd like to thanks the developers for giving me the chance to improve the game and mikade for mentoring my work! I'd also like to apologize in advance to all the mentors I will be bugging as I chew my way through the source code!

GSoC project: Sprite engine overhaul.

Hey everyone,

I'm yet another of the few selected students, who is gonna work on Hedgewars during this summer. As Medo42 I'm located in Germany.

My work will be under the hood of Hedgewars.
I am gonna bring the sprite engine from a rather ancient version to recent OpenGL. I'll as well do several internal changes that will decrease the memory and communication stress between the system and graphics hardware.

For those having some interest of the strategies involved to achieve this, I'll refer to OpenGL ES Programming Guide for iOS

Even tho the topic of the link above is iOS specific you can expect that my work will improve performance on almost any system.

As you might have figured, the main purpose is groundwork for bringing/optimizing Hedgewars to mobile systems that support OpenGL ES2. Hopefully this might as well contribute as a foundation for the javascript (WebGL) port, which itself is covered by another student this year.

You might expect quite some cooperation between these two projects due to the overlap.

GSoC project: Video Output Tool

Hi everyone!

I am another student selected for working on Hedgewars as part of the Google Summer of Code. My name is Stepan and I am known as Stepan777 at IRC. If you look at the map of Russia you can find city called Bryansk located somewhere near to Ukraine and Belarus, this is where I am from.

I will be working on the project called Video Output Tool and, as you may already know, I will be mentored by Hedgewars author unc0rr. Currently, if you want to record video from Hedgewars you have to use some screen grabbing application. This is not very convenient. For this reason I will implement an easy way to convert game demo (or even save) to video file which then can be easily shared with anyone.
Another planned feature is YouTube uploader which will allow you to upload recorded videos to YouTube directly from game in just several clicks.

Thanks to Hedgewars developers for choosing me. I had a chance to work for another organization during GSoC but I also choose Hedgewars :).

Enjoy Hedgewars and good luck to all other students with their projects!

Syndicate content

User login

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