Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Mjonir

Pages: 1 2 3 [4]
46
System / Overhead of sf::Thread::Launch
« on: April 24, 2011, 02:20:27 pm »
Quote from: "Xander314"
I know they don't run at the same speed, but once you have rendered the frame you can't render objects the next frame until you've finished computing physics their new positions.


Not necessarily, I'd say it depends on your game.

In my own project (shmup engine), all sprites are objects relatively independent from each other. It doesn't matter if I render a sprite a pixel left or right from the position it should have in the current frame.

Thus, I can have my simulation thread (computes the new coordinates of every object) run at the speed I want, the only thing that'll change is the precision of the simulation. The displaying thread also runs at its own speed and is completely independent, just displaying the sprites at their new coordinates at its own speed.




On that subject, my own question: if I have a small task to do once in a while (like deleting stuff I don't need, or moving something on the screen), is it really less efficient to launch a thread every X ms that does the job and then disappears than to have a permanent thread that sleeps for X ms after its job is done? Or is it roughly the same?

47
Graphics / Help on Asteroids Game!
« on: March 23, 2011, 11:09:17 am »
Quote from: "Ultranor"
Thanks for your help! I managed to get the spaceship up and running but now im stuck on making it shoot bullets. I have been coding and reading for hours and I still can't any decent tutotial for creating and shooting bullets. Any pro tips or any tutorials on doing that?


There is no "proper" way to do it, every project is different. The simplest way to do it would be to create a Bullet class which you instantiate with the position and direction of your spaceship. Have it stored somewhere (like a vector) and have a manager update the position of the sprite associated to every Bullet object every from.

However things can get much more complicated, depending on what you need. If this looks like what you want to do, then implement that and try, perhaps you'll need to change your data structure, or inherit your Bullet class from a more abstract one, but you can always see that later :)

48
General discussions / [SFML 2] I need your help for the ATI fix
« on: March 02, 2011, 09:29:41 am »
What about a simple "sf::Init"? Or "sf::Start"? It's more like a function name than an object name, but I think it's the easiest to understand in a first tutorial :o

49
SFML projects / Danmagine
« on: February 17, 2011, 01:33:00 pm »
Ups, fix'd... thanks ^^'

50
SFML projects / Danmagine
« on: February 16, 2011, 03:21:19 pm »
See the project Wiki for download & tutorials

Here is the release of Danmagine v0.2. So what can you do with it?

I'd say almost everything you might expect from it. It is stable, powerful and everything can be scripted. There are lots of tools and a few libraries. On the project Wiki there is a full documentation, with tutorials, and a forum where I'll be happy to answer in case you have a problem. It is a complete and working version, you should not have any problem getting started.


Then why is it not v1.0?

Because it needs some polishing. Although technically speaking you should be able to do almost anything you can think of, for some complex tasks it might not be very convenient to do it with the tools you have now. v1.0 will mostly need to have larger libraries. To do that, I need a lot of feedback. Up to now I'm pretty much the only one who used it. As a result, I don't know if what I've implemented and the way I've implemented it is what you will want. Thus, please, don't hesitate to send some feedback on my email or on the forums. Whether its simple remarks, suggestions, feature requests or just general thoughts about the engine, I'd really like to hear them to improve the engine :)


Have fun scripting (^-^)/

51
General discussions / Lua and C++
« on: January 29, 2011, 03:21:12 pm »
I use luabind for my own project which relies on Lua a huge lot. The only thing I need to do though is to share a single huge LuaInterface C++ class, and make some calls to Lua functions.

luabind was a bit tricky to compile and the tutorials are not very helpful, but once you're done it's really easy. I just have a single file where I decide what I share so it's not that much in itself, just add a single line every time I add a method. Calls to lua functions were also very easy.

I was really especially surprised how easy it was to transform a Lua custom vector class (using some metatables to implement OOP in Lua) into a sf::Vector2f.

If you want to see how it's done, you can check my sources on my project wiki, pretty much everything happens in "L_state.cpp", so you can see if it suits your taste :)

52
Graphics / sf::String and int
« on: January 08, 2011, 08:34:10 am »
Here's what I do:

Code: [Select]

#include <sstream>
#include <string>

string itos(const int &integer)
{
    ostringstream oss;
    oss << integer;
    return oss.str();
}


It works just the same way for other types like long and float so if you want you could overload the function for other types.

I used it a lot and never got any problems with it so it should be stable.

53
SFML projects / Danmagine
« on: December 29, 2010, 01:11:57 am »
I had to give some sign of life for this project so: Beta release time!

You can find everything on the Danmagine website: http://mjonir.gantzotaku.com/danmagine/

Read the news on the website, there is more information there :)

Don't hesitate to post/email if you've got some feedback to give. Otherwise see you soon once the tutorial is done for a full release (^-^)

54
SFML website / [Forum Request] Off topic boards?
« on: November 20, 2010, 01:35:25 pm »
Quote from: "Laurent"

Nop. I'm already paying 50 euros/year for additional SQL storage, I don't want to waste it ;)


I don't know how much you're paying for the current hosting, but if you need a cheap, powerful and reliable hosting with very good tech support from my own experience, have a look at Infomaniak.

Their offer includes 60Gb of public data (i.e. website + databases). With 60Gb of storage, I don't think SQL storage would be an issue anymore :P

55
SFML projects / Danmagine
« on: November 03, 2010, 08:25:34 pm »
Hi everybody,

This isn't a new release yet since it's not stable, but I couldn't wait to show you what I've done. Basically I've reached the point where everything you see is 100% scripted and easily scriptable.

Right now there are major bugs, a lot of space for improvement both on the engine and the support for scripting (including lots of syntactic sugar) and missing features, but it works and I think it's a pretty big step.

Download here!

Since it isn't stable yet,, I didn't have much time to make a real demo or tutorial or any kind of documentation so if you want to have fun with the engine you'll have to figure it out yourself, or ask, but I think it's already pretty easy to manipulate once you've got the hang of it.

I strongly suggest you have a look in the "objects" folder, where most of the script lies. You can also have a look at "*mask.lua" files in the "lua" folder if you want to know what you can do with the engine (it'll soon be able to do much more, that's the easy part :)).

So, in a few words, what's different from v0.1?
  • Mainly a whole new, and much more powerful, scripting language using Lua as a basis. Very easy to use, even for a non-programmer, and powerful at the same time. Have a look inside the "objects" folder to see what I mean.
  • Collisions (use "display_hitbox = 1" in config.ini if you want to have a closer look :))
  • Sounds and music (although there is no play_music() function yet, believe me when I say that it works :P)
  • Much better CPU consumption ans stability
  • Player scripting including shots and bombs
  • Menu scripting
  • Better performances and smaller size
  • A lot more scripting possibilities.



Have fun. I hope I'll be able to release a stable version soon, with even more possibilities on the scripting side :)

56
SFML projects / Danmagine
« on: May 13, 2010, 01:17:11 pm »
Quote from: "Walker"
Runs fine for me, it crashes on exit though, but I'm rockin it ATi style, lol. None of my own SFML programs crash though.


It seems it's a problem related to SFML2. I'm not the only one experiencing these crashes, but I've read somewhere that it may be related to the OS I'm compiling it on, I'll try to fix this as soon as I can.

If you're using SFML2, can I ask on which OS you compile your programs?

Quote
I look forward to this being finished so I can make some danmagic!


 :D

I can't code until summer because of my exams, so I'm gathering comments. It should advance much more quickly in July :)

57
SFML projects / Danmagine
« on: May 12, 2010, 11:47:53 pm »
Loading the menu should be immediate :?

Do you have any error message in the console? Is the window blank?

58
SFML projects / Danmagine
« on: May 12, 2010, 11:13:50 pm »
Danmagine

Version: v0.2
Download & information: Voir ici



______________

Description:
Danmagine is a new game engine especially made for easily creating Danmakus (i.e. shoot'em-ups with a hell lot of bullets). The main goal of this project is to allow anyone to make the shoot'em-up they want, whether it is a simple shoot'em up level or a complete game which requires advanced patterns and efficient objects management. Danmagine should not require any programming skills, what's needed will be learnt through the tutorials.

Danmagine relies on a core program extended by a scripting language. This scripting language is designed in such a way that it allows you to perform usual yet complex tasks in a single instruction while providing you lots of tools to go further. It is also designed with modularity in mind: most of the game logic is exposed to scripting, allowing you to tweak the engine's behaviour at will. Instead of modifying it, you can also extend it by using the libraries: design your own library and add it to your project in a clean way.

In Danmagine, everything is scriptable and you're provided what you need to do it. Menus, levels, sounds, musics, player, enemies, decor, everything can be done your way using functions, attributes, events, tasks and all the other tools and structure you have at your disposal.

The engine is constantly and rapidly improving. If you feel something's missing, just ask. It'll probably appear in the next version.

Pages: 1 2 3 [4]
anything