• 12
• 12
• 9
• 10
• 13
• ### Similar Content

• By BillyGD

Play Flick Football 3D @ https://gamejolt.com/games/flickfootball3d/326078
Flick Football 3D is a turn based football game inspired by the table top classic 'Subbuteo'.
The game is currently in very early Alpha development. There is still a lot to be done before the first proper release but I have decided to release this playable version to get as much feedback as possible.
The only game mode currently available in this release is the 'Practice Mode' which gives you control of both teams. Either play against yourself to get used to how the game works or play against friends and family on the same computer!
Planned Future Features Include:
-Take control of your own custom team in the single player campaign.
-Play in online leagues and tournaments against other players in the multiplayer mode.
-Fully customisable stadiums to make you stand out from the rest of the players.
-Improve your players stats and skills by playing matches and setting up training sessions.
Flick Football 3D is available for Windows, Mac and Browser.
Thank you for viewing my game, all feedback is greatly appreciated. I can be contacted at; BillyGDev@outlook.com
'Flick Football 3D' is also the development name for the game and I haven't yet decided what the full release will be called, so if you have any ideas please drop me a message!
• By drcrack

It is a combination of fundamental RPG elements and challenging, session-based MOBA elements. Having features such as creating your unique build, customizing your outfit and preparing synergic team compositions with friends, players can brave dangerous adventures or merciless arena fights against deadly creatures and skilled players alike.

This time with no grinding and no pay to win features.

We're still looking for:
1) 3D Character Artist
2) 3D Environment Artist
3) Animator
4) Sound Designer
5) VFX Artist

Discord https://discord.gg/zXpY29V or drcrack#4575

• Hi everyone! I'm currently working on a series of books about 2D Shader Development.

The idea is to synthesize a bunch of techniques that are specifically useful for 2D, even if they work on 3D as well.

I released the first book last week. It's 4.99 on Amazon or free on the series website, https://www.2dshaders.com

This is an independent initiative, I don't work for any publisher whatsoever. The contents of the books are the result of a 4-year span where I started teaching this in Argentina and USA, always making the workshop better. Now I'm expanding it to make more sense in book form.

I'd love to hear your opinions on the idea and if you get the book let me know what you think.

By the way, the examples are in Unity, but the concepts from the book should be easily transferable to any graphics api/engine.

Hope you like it!

• While looking out for that pesky Terrator, our little alien is doing a bit of relaxed mining down on the new gas planet "Lelantos" this weekend....

• I have a native iOS game (objective c, XCode build) which I am considering to port to other platforms.
Core gameplay is based on solely on geographical maps, and custom drawing over maps. It also has Core Data. This part is complete in development.
What is not done yet is: monetization, gamification (leaderboards, challenges) and multiplayer functionality.
As I think more about it, I am tempted to think if this is the right time to move to a cross platform tool such as Unity. But before dedicating time to port my 5 years side-project effort in Objective C, I really want to know if its worth it.
- Does Unity support such plugins / assets that will fulfill all my above requirements?
- Unity Personal seems to have only 20 concurrent users - is it too costly scaling if I decide for extending to web and android platforms?
- What is the general workflow involved in publishing to iOS, Android, PC, and web platforms while using Unity? I mean to ask about various points of signing stuff, paying fees and getting certified.
- How long will it really take to port my entire Objective C project into Unity? I am somewhat familiar with C# but I am finding it hard fidgeting with Unity IDE as lot of things are focused around FPS and 3D while my game is still 2d - not much action involved. I seem bit overwhelmed by the list of features I see there. All in all, I do not want to lose my momentum while still making sure its portable to everywhere.
- Any assets I could use (for free to try basis in debug) that are relevant for my game?
- Last but not the least, are there any costs that I need to be paying upfront to Unity, for using it (apart from their monthly subscription model)? I don't understand their costing for multiplayer in conjunction with their subscription fees - if someone could kindly elaborate.

# Unity Boost.Gil, SDL, and what does 'interleaved view' mean?

This topic is 3225 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Edit: Should this be in the Alternative Libraries forum or something? I put it here because I'm not sure it fits anywhere else, but almost as much because this is where I spend most of my time on GDNet. A few of you may remember a thread a while back where I was asking for help on rotating SDL_Surface's. My game structure has changed enough that I can't re-use the old code. I was gearing up to re-implement it when I stumbled on Boost.Gil, and realized that it was perfect for what I want. In particular, it seems that it's rotated views will do all the work for me. All I have to do is hook it up. That, of course, is proving to be the hard part. The trouble with these generic libraries is that nothing actually does anything until you hook up a bunch of stuff with a lot of different types and very long template parameter lists (I'm not bitter, really). Anyway, after reading the above-linked page a couple times, I've come up with a rough template of what my transformation function will look like, or at least the testbed function:
void Transform(SDL_Surface* src, SDL_Surface* dst){
//lock surfaces
//make boost.gil view of surfaces, possibly with transformations already applied
//apply transformations, if they haven't been applied already
//copy the transformed src view to the dest view
//unlock surfaces
}
Obviously, I'm still using SDL. The main thing that's bugging me is that in the tutorial, an interleaved_view is used when getting a view of raw pixel data. What does that mean, and do I actually want a planar view, whatever that means? I googled "interleaved pixel data", and didn't find anything useful. Here are my questions: What view types do I need to use in my particular case (32-bit SDL_Surface's)? What do "interleaved" and "planar" mean as far as pixel data go, and is there anything else I need to know to understand what the crud I'm doing?

##### Share on other sites
I'm not sure what you are looking for exactly but if you just want to rotate SDL surfaces SDL_gfx would most likely be a better fit (see Rotozoomer).

##### Share on other sites
whoops, forgot about SDL_gfx. But would it take advanatage of the fact that they only need to be rotated in 90 degree increments?

##### Share on other sites
Quote:
 Obviously, I'm still using SDL. The main thing that's bugging me is that in the tutorial, an interleaved_view is used when getting a view of raw pixel data. What does that mean, and do I actually want a planar view, whatever that means? I googled "interleaved pixel data", and didn't find anything useful.

An interleaved view is a view where the components of the image (R, G, B, A) are interleaved.
That means R1 G1 B1 A1 R2 G2 B2 A2, while planar means R1 R2 G1 G2 B1 B2 A1 A2.

Interfacing GIL with SDL only requires you to know how pixels are stored in a SDL_Surface.

##### Share on other sites
Okay, so an SDL_Surface is interleaved. I'll try that out.

##### Share on other sites
Ok, this works:
void Transform(SDL_Surface* src, SDL_Surface* dest){    //lock the surfaces    SDL_LockSurface(src);    SDL_LockSurface(dest);    //create views of the raw data,possibly with transformations already    boost::gil::rgb32c_view_t src_view  = boost::gil::interleaved_view(src->w, src->h, (const boost::gil::rgb32_pixel_t*)src->pixels, src->pitch);    boost::gil::rgb32_view_t dest_view = boost::gil::interleaved_view(dest->w, dest->h, (boost::gil::rgb32_pixel_t*)dest->pixels, dest->pitch);    //copy the views    boost::gil::copy_pixels(src_view, dest_view);    //unlock the surfaces    SDL_UnlockSurface(src);    SDL_UnlockSurface(dest);}

But when I replace src_view with, say, rotated90cw_view(src_view), I get funny corruptions in the output. It might be something to do with the pitch, as they. Both src and dest are 64*64. I'd post screenshots, but I don't have a good place to host pictures at the moment. Does anything about my code jump out as being wrong?

##### Share on other sites
Quote:
 Original post by theOcelotwhoops, forgot about SDL_gfx. But would it take advanatage of the fact that they only need to be rotated in 90 degree increments?

To tell you the truth I don't know. You would have to look at the source code however I would think that it would special case things like rotating by 90 degree and flipping surfaces and not use a standard arbitrary rotation for those operations.

##### Share on other sites
finally went and downloaded SDL_Gfx. From the time I downloaded it to the time I was successfully using it was less than 20 minutes, and it felt like less than 10. That's including building the thing. It turns out it has a function just for 90 degree turns.

There's just one thing I'm not sure about. The rotozoomer functions return a surface, presumably allocated just for me. Am I supposed to free this surface myself? And making a memory allocation for each rotation can't be the most efficient way to do things.

I'd still like to solve the problem with Boost.Gil. It seems to be corrupting memory, as calls to SDL_Free fail after the boost::gil::copy_pixels call. I think I'll take it to Alternative Libraries if I can't figure it out. Maybe SDL surfaces are planar after all?

##### Share on other sites
Quote:
 Original post by theOcelotThe rotozoomer functions return a surface, presumably allocated just for me. Am I supposed to free this surface myself? And making a memory allocation for each rotation can't be the most efficient way to do things.

Generally people use these rotation libraries to pregenerate rotated copies and just draw the ones they need. So yes, it gives you new surfaces and you then own them, deleting them later. Memory is cheap whereas real-time rotations are expensive. Obviously 90-degree rotations are cheaper but not doing them at all after initialisation is cheaper still.

##### Share on other sites
Curiouser and curiouser. When I create views, it seems to be quadrupling the width parameters I pass in. When I create and copy the views like this:
w = 4; h = 16;boost::gil::rgba32c_view_t src_view = boost::gil::interleaved_view(w, h, (const boost::gil::rgba32_pixel_t*)src->pixels,  src->pitch);boost::gil::rgba32_view_t dest_view = boost::gil::interleaved_view(w, h, (boost::gil::rgba32_pixel_t*)      dest->pixels, dest->pitch);boost::gil::copy_pixels(src_view, dest_view);

I get a perfect little 16 pixel square of the source image. When I use w=16 and h=64 (to include the whole 64*64 surface), it copies the whole image. w=h=64=crash. w=h=16= a 64*16 bar at the top of the output image.

When I do the copy like this:
boost::gil::copy_pixels(rotated180_view(src_view), dest_view);
to rotate the image, it seems to be broken into 4-pixel vertical columns, which are not properly re-arranged, like they're inverted individually instead of being rotated across the image. A 90-degree turn crashes.

Any ideas on what's causing this?