Real Software Forums
http://forums.realsoftware.com/

Entry for udevgames Competition
http://forums.realsoftware.com/viewtopic.php?f=4&t=25564
Page 1 of 1

Author:  tcIgnatius [ Wed Dec 10, 2008 2:04 am ]
Post subject:  Entry for udevgames Competition

udevgames is a mac game developer competition.
Here's a prototype of my entry for udevgames.com
It can be downloaded from here:
http://www.idevgames.com/forum/showthread.php?t=16310

My entry was made in REALbasic and uses the SuperSpriteSurface framework.
So far its pretty basic. I'd like to see how it runs on other peoples machines and what you all think of the basic concept. (keep in mind I only have 3 months to finish and the contest started last week)

Author:  tcIgnatius [ Sun Dec 21, 2008 1:03 am ]
Post subject:  Re: Entry for udevgames Competition

I also started a development diary. Any newcomers to the SuperSpriteSurface should check it out because I will be giving some examples and sample code that you may find useful.
http://www.udevgames.com/forum/viewthread/15/

Author:  paulg [ Fri Jan 09, 2009 11:28 am ]
Post subject:  Re: Entry for udevgames Competition

I am using a MacBook Core Duo 2.0Ghz. It runs perfect on my system, perfectly smooth and fluid.

As to the concept, I like it and it looks like it will be a fantastic game once you finish. Keep at it and keep us updated so we can see how it progresses.

Thanks,

PaulG

Author:  tcIgnatius [ Fri Jan 09, 2009 5:40 pm ]
Post subject:  Re: Entry for udevgames Competition

Thanks for the feedback Paul.
I'll be sure to keep everyone updated.
I've added a wiki page to my google code account:
http://code.google.com/p/syntropymac/wiki/Introduction
I plan on having another build within the next week.

Author:  paulg [ Sun Jan 11, 2009 3:46 pm ]
Post subject:  Re: Entry for udevgames Competition

:D No Problem! It looks like it is going to be fun. Yeah, let us know when the new build is ready and I'll keep on eye on the wiki and journal too.

Paul

Author:  tcIgnatius [ Fri Jan 23, 2009 4:51 pm ]
Post subject:  Re: Entry for udevgames Competition

No new build, but I did update the developer diary.
http://www.udevgames.com/forum/viewthread/15/

I'm shooting for the end of this week to post a new build.

Author:  Agent [ Sat Jan 24, 2009 9:41 am ]
Post subject:  Re: Entry for udevgames Competition

"Using SSS in RB
ok time for something useful (for some/few who actually use rb and SSS)
You’ll notice that there is no such thing as a pointer in REALbasic. It kinda sucks, and you can fudge a function pointer using a delegate, but for objects it seems like there’s no luck. (at least to my knowledge)
Here is a way I handled an issue which would have been easier with a pointer:

if (not Sprites.Item(TimeIndex) isa HUDText) or Sprites.Item(TimeIndex).GameType<>1 then
//"isa" is a nice command, and returns a boolean from checking if an object is an instance of a class
for i = 0 to Sprites.z_spriteUbound
//This can be fairly expensive, but the condition above makes it ok in my book
if Sprites.Item(i) isa HUDText and Sprites.Item(i).GameType = 1 then
TimeIndex = i
exit //speeds things up a bit
End if
next
End if


The code above looks for the timer text on the HUD, then assigns the TimerIndex to that object’s place in the array, which is then used for:

HUDText(Sprites.Item(TimeIndex)).Text = Format(World.Time, "000")

Using the name of the class, you can access specific attributes of an object inherited from an array of super objects. (scope)
Because the sprite surface item array is dynamic I can’t just assume the position of the HUD’s timer isn’t going to change. So my method is no pointer, but it kinda fudges one."

Ehm, what? This seems to be an awfully expensive way of doing something simple. When you create your HUDText object, just assign it to a variable in a module or something like that. When you want to change your HUDText object, just use that variable in that module.
For example:
//creation of the HUDText
Dim HUDTimer as HUDText //just a local variable
HUDTimer = New HUDText //create the object
HUD.Timer = HUDTimer //in a module called HUD, the variable Timer (which is a HUDText) is assigned as a reference to the object

//somewhere else, in your update code for the timer
HUD.Timer.Text = Format(World.Time, "000")


Or is there something I am missing about your implementation?

Author:  tcIgnatius [ Sat Jan 24, 2009 7:31 pm ]
Post subject:  Re: Entry for udevgames Competition

Quote:
Or is there something I am missing about your implementation?

Unfortunately, yes. I probably should have made it more clear that HUDText is a SuperSprite object, and that the SuperSpriteSurface only updates the sprites appended to its SpriteGroup. When I create a global object and change its properties the object that's appended to the SpriteGroup doesn't update. That's why I said it would be a lot easier if rb could do pointers because then I could just do something like:
//In HUD module
*Timer = new HUDText

//For its initialization
HUDTimer = new HUDText
HUD.Timer = &HUDTimer

//Then when its updated elsewhere
*HUD.Timer = Format(World.Time, "000")


:P Wouldn't that be nice...
My problem is that there's an object in an array that gets moved around every so often because sprites are being removed/added. So its position in the array is going from 6 to 12 to 20 to 8... and so on. (keep in mind it doesn't change its position very often) Also, I can't take it out of the array because then its image won't be updated by the surface as I mentioned. So its a wonky situation.

Quote:
This seems to be an awfully expensive way of doing something simple.

Well, it is only when it gets called after stuff is moved around within the array, which doesn't happen a lot. (only when you go to a new level or go from the title menu to the game screen) its checking the boolean condition every frame, so its really not that bad. The only thing I can think of that might be less expensive is to create a cursor that follows it around, but that would be less convenient to code and not really worth it IMO.

Author:  timhare [ Sat Jan 24, 2009 7:49 pm ]
Post subject:  Re: Entry for udevgames Competition

So you're saying that if you append a SuperSprite object to a SpriteGroup that it makes a copy of the object in the spritegroup? That's very unusual. Most of the time in RB, it would just copy the reference, so your pointer would still be valid. Are you sure you're not missing something here?

Tim

Author:  tcIgnatius [ Sun Jan 25, 2009 1:41 pm ]
Post subject:  Re: Entry for udevgames Competition

Quote:
So you're saying that if you append a SuperSprite object to a SpriteGroup that it makes a copy of the object in the spritegroup? That's very unusual.

You're right, after further investigation of the SSS framework I realize that the append method doesn't copy it.... really stupid of me. :oops:
I got confused because it removes objects from their parent SpriteGroup arrays before appending to the surface's SpriteGroup. It also crashes when I try to append individual elements of a global array.

So my apologies to Agent/EraZer. I had tried the global object method earlier and it didn't work, but that was because I was forgetting to update it. (doh!) :oops:

Well, shit, I guess this is good news, but now I'm gonna have to change my dev diary. :x

Author:  tcIgnatius [ Sun Feb 01, 2009 2:20 am ]
Post subject:  Re: Entry for udevgames Competition

Updated with a level editor, as well as info on some of the enemies from my game.
http://www.udevgames.com/forum/viewthread/15/

Author:  tcIgnatius [ Sun Feb 15, 2009 1:51 pm ]
Post subject:  Re: Entry for udevgames Competition

Another update:
http://www.udevgames.com/forum/viewthread/15/
A link to the progress video:
http://www.youtube.com/watch?v=a3L_C49qoyE

Author:  tcIgnatius [ Tue Mar 03, 2009 2:07 am ]
Post subject:  Re: Entry for udevgames Competition

Well, I wasn't able to completely finish it by the contest deadline, I have released an alpha version with one playable level:
Download----> http://syntropymac.googlecode.com/files/Syntropy.dmg

Keep in mind the requirements are pretty steep. To run it smoothly, its recommended you have an intel based machine. It can run on OSX 10.3.9 and up though. I tested it on my powerbook and its dreadfully slow. :(

Oh well, I'm going to continue working on it, until its finished.

Author:  tcIgnatius [ Wed Mar 11, 2009 6:31 pm ]
Post subject:  Re: Entry for udevgames Competition

Well my final build (for competition) is up!
http://syntropymac.googlecode.com/files ... py_uDG.dmg

please vote! (even though there is like 23 hours left) and check out the other entries as well!
udevgames.com/vote

Let me know what you guys think.

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/