Jump to content

  • Log In with Google      Sign In   
  • Create Account


polarboy

Member Since 26 Jul 2008
Offline Last Active Jul 01 2013 07:57 AM
-----

Topics I've Started

[Future-Proof]Should we try to follow the new technologies? Or going back to the basics?

18 May 2013 - 02:32 PM

Hi, VERY occasional poster here smile.png

Thanks to the articles and advices from Gamedev, I spent quite a number of summers practicing C++ concepts learned from school and applying to the game engine experiment I had. And now I have a job smile.png

 

Other than expressing my gratitude towards the community and share my joy of being able to create a rudimentary engine, I'd like to bring this topic to discussion.

 

Is it better to try to follow the new technology? Or is it better to sit back and wait and prepare for the future by strenghthening the basics?

 

Why I prefer the basics

 

Now there are new concepts, new technologies everywhere and every day, new phones, new frameworks, new IDEs almost every month. (okay, I'm exaggerating a bit, but you get the idea). I'm finding it hard to follow. And in reality, I'm a little resistant to these changes because deep down, I think they'll be obsolete by the time I'll need them anyway.

 

Although I know that the (not even general concensus, more of an accepted fact) is that we need to stay current to new technologies. I prefer to stick with the basics.

 

As an example, I didn't even know what design patterns were when I started applying for the jobs, so I just brushed it up before the interviews and forgot all about it when I started working. I didn't even know what the Interfaces were at the time.

 

But once I learned what the interfaces are, it was very easy for me to implement these patterns although I didn't even know I was implementing one. I mean, it simply made sense because I started writing my engine in spagetti code, it became a nightmare to debug, so I naturally started using inheritence (although I still didn't know interface) and proper namespace to organize my project.

It just seemed natural to me, sometimes I even think learning design patterns might limit the possibilities of these uses. Again, as an example of my engine, shortly after my work started, I learned my engine, albeit it used Lua to act as commands (so it was kinda cheating), it was almost an implementation MVVM/MVC pattern (sorry, i still can't quite grasp the difference)

 

Then I learned WCF, which I thought was a pretty awesome technology, but the configurations is a giant pain in the ass. We work with another company and our services would talk through WCF, sometimes it took almost a week just to identify a typo in the interfaces and then there's all these other settings like KnownTypes, Messages, sessions etc...

 

What triggered the discussion was today, I found the book i always wanted to read: MUD Game programming by Ron Penton and started reading it finally. I really enjoy it. But then again, this is OLD OLD technology. On the other hand, new technologies are all relying on these basics, they will change/evolve, but the basics won't.

 

Then I looked at my bookshelf: "Assembly Language for Intel-based computers", "Understanding Telephone Electronics", a book on how to fix cell phones using OLD OLD GSM chips, these are the books I've gotten a long time ago, but were still on my to-read list. I felt like I'm killing my career,lol

 

Now my beef with the new technologies

There are just too many abstractions~~ There are soo many things that are hidden from us it feels more like using an application (like MS Word) rather than writing code.  I love the libraries Microcontroller developers make, they provide the bare minimum to do simple things, so we don't have to go too deep down on protocol level, but we have enough control to know exactly what's going on.

 

But the new frameworks? I've worked with Android for a bit, and thought that was the most annoying framework ever. So often I had to fight just to make it compile because of these rules imposed. I probably didn't learn how to use the UI Thread properly, ended up having to create another Thread inside the UI thread to show a simple text change.....

 

Sure, I could've spent more time on reading how to update the UI properly, but that's exactly the beef I have with these type of new technologies. Too many abstractions.

 

Yet, according to what some manufacturers are saying, programmers WANTED them to ditch WM and move to android, it wasn't the users, it was the Devs who wanted the change.

 

I suspect the real reason why, though, is something like this (using the graphics guy at work's quote):"I hate working with Magentas, why can't them use Alpha channels like a 21st century technology"

 

So, what do you guys think? Is it worth spending the time to try to follow as many new technologies as possible? Or is it better to occasionally taking peeks at some of them but really focusing on the basics?


How commercial games do the packing?

21 July 2012 - 05:52 AM

Hi, all:
Recently I've been learning about unpacking actual game packages.
What I've noticed is that some of them do not need to be packed back (especially the ones where you just rename it to .zip and it will work).

Which is strange to me because as I play the game, the contents are not actually extracted in the file system, although I'm sure it does in memory.
So we might say, sure they are extracted, and we use the path name to find it in memory, but that doesn't explain why it also works if we just leave the contents there without repacking it back.

So I'm wondering, how does that actually work? How is the game able to access these files without actually extracting them in the file system and how are the games able to access those files without repacking them?

Thank you,

SDL multithreading and multicore issue

20 July 2012 - 09:15 AM

Hi all, I've been met wit an interesting problem.
First of all, I'd like to say I successfully rolled out my first game framework, which has been my goal for quite some time. Now if I do want to make a game, I can choose a mature engine with no regret.

(Sure there are problems, but as long as it works on my PC, I'm happy :D)

Anyway, my problem is as follows.
I'm using lua as a script engine. So I exposed a showMsg API to show text on the screen.

So in my script, it runs multiple showMsg commands

They don't seem to be blocking so the text would overlap, which was the reason why I introduced SDL_SemWait and SDL_SemPost

Here's the function that is registered to be called by lua
int l_showMSG(lua_State *l)
{
    //need a messagebox class
    //messagebox class will use a list to contain the messages
    //showMSG should be added to the list
    #ifndef _DEBUG
    printf("showMSG::begin\n");
    #endif
    SDL_SemWait(msgLock);
	 char* fontname = (char*) lua_tostring(mainL,-1); lua_pop(mainL,1);
    wchar_t* txt = (wchar_t *) lua_tostring(mainL,-1);
   // char* ctxt = (char*) lua_tostring(mainL,-1);

    std::wstringstream buf;
    buf << txt;
    lua_pop(mainL,1);

    int x = 30;
    int y = 30;
    if (lua_gettop(mainL)>0)
    {
	    y = lua_tonumber(mainL,-1);lua_pop(mainL,1);
	    x = lua_tonumber(mainL,-1);lua_pop(mainL,1);
    }
    //wstring msg = buf.str();
    //wstring drawmsg = processWide(*msg);
    #ifndef _DEBUG
    printf("showMSG::before RenderText\n");
    #endif
    RenderText::drawText(fontname,buf.str(),x,y,true);
   // delete msg;
    SDL_SemPost(msgLock);
    printf("showMSG::done\n");
    //delete msg;
    return 0;
}

This works perfectly fine on my dual core Lenovo, but when I send it to other people. They sometime would see two showMsg calls overlapping.

So my hunch is still that the two lua calls each obtained the lock and both executed the drawtext code.
I'm wondering if it would be due to multicore multi-cache, and if it is so, how would I proceed to fix it?

Thank you

PlayFirst SDK

20 March 2010 - 12:05 PM

Hi, I just found this casaul game dev suite called PlayFirst SDK Looking at some casual games that was made using playfirst, it seems like it does everything a 2D game requires: tiled maps, sprite animations and etc. Unfortunately I found this AFTER I spent a few years (on and off) on my own engine (At least it does tiled maps and sprite animation properly) And of course, it's obviously way more full fledged than my engine is...I mean it has a windows-friendly GUI whereas my engine uses a console-like GUI for tile placements o.O So, with a bitter feeling, I'm asking the community for opinion or basically any comment towards this SDK. I think my head is already saying to scratch everything and use this SDK, but my heart wouldn't let me because of all those time I spent on the graphical side of my game,lol, it makes me feel like I'm betraying my own work ...but obviously this SDK is way better than what I have so far :( Any thoughts? Feelings? lol https://developer.playfirst.com/ btw, this is their website

NPC management tutorial?[Solved]

31 December 2009 - 08:55 AM

Hi, guys,
I'm spending my little break between school thinking about my game again.

I'm trying to start on NPC management.
But I'm not sure how I would approach this.
To me, the simplest way to approach this to have a thread for each NPC and perform calculations there, but I don't think that would be a good idea for memory reasons. (Especially if you have hundreds of NPCs like a lot of KOEI games)

But I just can't seem to find any other way to do it, I mean, if we use a loop to loop through the NPC list and determine what to do.
For example
NPC[i]->do_move();
So the NPC executes one line in the script
My understanding is we can't just go to the next guy and come back later to execute the next line in the script, unless of course we register each line as a function and send it back to C/C++ (-_-||)
I'm thinking all sorts of crazy things like a table, FSM and etc, I just couldn't really figure out how to do it.

I guess my question is: What's the normal way to do it?
Oh yes, I forgot, the original intent was: Is there any tutorial on how this is achieved? I haven't been able to find much in terms of implementation.
Thanks

[Edited by - polarboy on December 31, 2009 4:08:53 PM]

PARTNERS