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 - StevenC

Pages: [1] 2 3
1
Graphics / Re: Can't render in a thread
« on: November 08, 2015, 06:01:21 am »
Am I missing something? Thanks.

The thing you are missing may not be obvious right now, but the drawing code should all be in the same thread from beginning to end. And since the main thread is a valid thread, you should really just not bother with creating that thread. There are really no advantage to rendering using multiple threads. There are other processing tasks you can do with threads, like updating parts of your game simulation that aren't being rendered.

2
SFML projects / Re: SFML Haskell Bindings
« on: February 27, 2013, 08:41:12 pm »
Yeah, I would also like to see a separate section for misc language bindings. It would be easier to determine what bindings are available. One wouldn't have to look through pages and and pages of posts in this section.

3
SFML projects / Version 0.3.2 Released
« on: October 20, 2012, 06:02:59 am »
Updates to JSGameClient have been released. The important details are:

  • Added Project Goals Listing
  • Added more documentation
  • Added an additional example
  • JSGameClient now provides supports an event driven model and includes setInterval/setTimeout functions that work the same as in a web browser.

var text = new sf.Text(new sf.String("Hello World"));
var window = new sf.RenderWindow(new sf.VideoMode(1024, 768), "Game Client");
var event = new sf.Event();
var cnt = 0;

var loopid = time.setInterval(function() {
        cnt += 1;
        text.setString(new sf.String("Hello World: " + cnt));
        if ( window.isOpen() ) {
                window.clear();
                window.draw(text);
                window.display();
                while ( window.pollEvent(event) ) {
                        if ( event.type == sf.Event.Closed ) {
                                window.close();
                        } else if ( event.type == sf.Event.KeyPressed ) {
                                if ( event.key.code == sf.Keyboard.I ) {
                                }
                        }
                }
        } else {
                log("Clearing interval");
                time.clearInterval(loopid);
        }
}, 50);
 

The above is an event driven alternative to something like:

var text = new sf.Text(new sf.String("Hello World"));
var window = new sf.RenderWindow(new sf.VideoMode(1024, 768), "Game Client");
var event = new sf.Event();
var cnt = 0;

while (window.isOpen())
{
    window.clear();
    window.draw(text);
    window.display();
    while ( window.pollEvent(event) )
    {
        if ( event.type == sf.Event.Closed ) {
            window.close();
        }
    }
}
 

I personally prefer the second example, but the two approaches can be combined as:

var text = new sf.Text(new sf.String("Hello World"));
var window = new sf.RenderWindow(new sf.VideoMode(1024, 768), "Game Client");
var event = new sf.Event();
var cnt = 0;

var loopid = time.setInterval('cnt += 50; text.setString(new sf.String("Hello World: " + cnt));', 50);

while (window.isOpen())
{
    time.yield(); // Without this, the interval code will not be called.
    window.clear();
    window.draw(text);
    window.display();
    while ( window.pollEvent(event) )
    {
        if ( event.type == sf.Event.Closed ) {
            window.close();
        }
    }
}

time.clearInterval(loopid);
 

Like in the browser the setInterval/setTimeout can use a function or a string containing JavaScript code.

4
SFML projects / Re: [WIP] MMORPG project - recruiting
« on: July 26, 2012, 11:16:26 pm »
Interesting. I wish I had the free time to jump into such a large project. Do you plan to keep it open source as it develops or will you eventually make it into a commercial project once it is mature?

Also are you planning your project as a framework for building a generic 2D mmo or will it be an actual playable mmo?


5
SFML projects / Re: TGUI: a c++ GUI for SFML (with Form Builder)
« on: July 19, 2012, 03:55:03 am »
Thanks Texus, that is really nice of you. The Group class defines addCallback as public which is why it was giving me issues. There was a couple ways I could work around it, but the easiest seemed to be making it public in the descendant as well. I assumed it was simply an oversight and you intended it to be public.

-Steven


6
SFML projects / Re: TGUI: a c++ GUI for SFML (with Form Builder)
« on: July 18, 2012, 10:49:24 am »
Hello Texus,

As I stated above:

Quote
I didn't like that the developer has to use a descendant of the RenderWindow class in order to use TGUI

No point trying to understand it. It is like trying to say why one person considers Picaso a great artist and another person looks at it and says "meh." :)

The suggestion is just an idea, offered for my own benefit. A recommendation to implement these changes would save me time if you would accept them and I could spend less time keeping the custom TGUI in sync, so it falls under the category of there being "no charge for asking you." But I did so with the an expectation of rejection.. Most programmers I know don't like being asked to change their stuff and I myself am no exception..  ;D

-Steven




7
SFML projects / Re: TGUI: a c++ GUI for SFML (with Form Builder)
« on: July 18, 2012, 04:55:38 am »
Hello Texus,

Great work on TGUI. I found it very useful for my JSGameClient project.

I made one significant change for my own use which I thought I would report back on:

I didn't like that the developer has to use a descendant of the RenderWindow class in order to use TGUI so I created a Form class (a modified Window) that removes the subclass and instead requires a sf::RenderWindow * in the constructor. I thought I would recommend this change be included in the main TGUI as an alternative to using the Window class for those like me who think subclassing an SFML Window is unnecessarily restrictive.

One "issue" I encountered was the Panel class hides some public members mouseOnObject, addCallback, and another one. Easy for me to change so no big deal.

A recommendation I have aside from the two things mentioned above would be to remove the loading from a file function in Window and make the loader a separate method or even better break it up and make it a class.

Anyway, I found TGUI very easy to hack on and I really appreciate how you structured the project. I made a V8 JavaScript binding for the modified version so that the TGUI can be accessed from JavaScript.

Thank you,
-Steven

8
SFML projects / Re: Looking for a newby partner(s)
« on: July 14, 2012, 04:36:33 am »
i'm not taking a part in this project ;D
just someone mentioned they have 4-5 people, so i linked an interesting idea to start from (seriously space invaders for 4-5 people ?  :o )

It makes more sense to do a small project that has little chance of not getting completed. Besides, even with space invaders one could do a lot. For example:

1. Varying enemies with different AIs that increase difficulty as the level progresses.
2. Weapon upgrades, power ups, and all the special effects to go with it.
3. Boss battles
4. RPG concepts such as levelling up, attributes, etc.
5. Tower Defense concepts such as building turrets

Anyway, the idea is not to make space invaders more complex and drag it out, but if we have several people we might use the extra resources to make the game more interesting and there are a lot of ways to make a simple game more interesting.

-Steven

9
SFML projects / Re: Looking for a newby partner(s)
« on: July 13, 2012, 05:56:06 pm »
What my plan was is basically like you have a big group of people in a room but only one computer, one person works on the code for at least an hour and then the next person goes at it with a given task from the previous coder. Everybody can watch as people code and communication is a must, naturally.
(I liked this analogy so much, I had to write it in bold letters lol)

It is a good idea. I myself have found some game development tasks really hard to figure out. For example, I've been trying to figure out how to create a simple 2d lighting engine that integrates with a physics engine. I would definitely love to sit down at watch someone who knows how to do it go through the process step-by-step.

The space invaders idea sounds really good. It is a simple enough game to where there isn't any doubt that it could be completed, but I can see where there is plenty of room for creativity and learning.

-Steven

10
SFML projects / Re: Looking for a newby partner(s)
« on: July 13, 2012, 08:08:13 am »
The whole point of this is not to introduce people to version controlling  or some sort of standardized methods of working in a team or even being extra-ordinarily efficient, it's a rather experimental method and I got the idea from the Super Meat Boy team. The only experience I got in working like this is with my friend and it went pretty well, this time it might go down the drain lol I do not know, but I think it is worth a try.

Yeah some developers might like not having to learn a version control system to work with their team. Me I'm sort of the opposite. I have got to have at minimum a certain set of tools. A good version control system that doesn't annoy me is one of them.

What I like about version control system is that they generally:

1. Provide a process for documenting high level changes made to the program
2. Allow one to quickly view changes made by other developers.
3. Automatically merge changes together with little risk of clobbering someone else's modifications.
4. Selectively control what changes get committed on a per file basis and the ability to quickly review all changes prior to commit.

There are a lot of advanced features too but surprisingly the ones I use the most are the most basic. Commit changes, revert changes, view log, and update (pull).

The learning curve of a VCS is typically much lower than that of your average programming language especially when using intuitive GUI tools like TortoiseSVN for Windows. So in my opinion the difficulty of using a VCS is being exaggerated. It sounds to me like the reason you don't think its worth it is because you don't want to use a VCS.. That's an okay by me, but really you are missing out :)

11
SFML projects / Re: Looking for a newby partner(s)
« on: July 12, 2012, 04:14:54 am »
I think a version control system like git or whatever is a must for exchanging files. They really make life easier. Whatever you want to use for collaboration other than major meetings shouldn't depend on all team members being online at the same time. (Email, forums, etc.) Mumble could work if you want to have a meeting, but I would expect such things to be rare especially if the team is geographically diverse.

I think a small project is perfect to begin with. You mentioned something along the lines of space invaders. I can see a team of 4-5 breaking down such a project into manageable chunks. Ultimately, the most important aspect of working on a team is having effective leadership. While it may seem fun to try work democratically it is rarely productive.

12
SFML projects / Re: Looking for a newby partner(s)
« on: July 11, 2012, 08:46:45 pm »
I'm interested, PM sent.

13
I've included an example using the box2dweb library. To run the example download the latest source and rebuild (or use the pre-compiled Windows binaries).

To run the example execute:
jsgame --start Examples/box2dtest.js

From the bin directory.

14
SFML projects / Re: Tetris
« on: July 05, 2012, 08:46:44 pm »
I just thought I would toss this in that Tetris is a trademark here in the US. You might check the status in your country just to make sure before calling your game Tetris. The thing about using a trademarked name is that the company is bound to go after you for using it otherwise if they ignore it and let you use it then others could claim Tetris is a generic term. Laws on this vary from country to country though.

Other than that I think that a Tetris-clone is a great way to familiarize yourself with SFML.

-Steven




15
SFML projects / Re: SFML2 V8 JavaScript Binding
« on: July 02, 2012, 01:29:31 am »
Helllo Rogof,

I've updated the binding to version 0.6.2. Now when you add -DNO_SFML_NETWORK the network library will not be used.

-Steven

Pages: [1] 2 3