Menu

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.

Show posts Menu

Messages - Wretched

#141
Easy3D script module - Create 3D games using the AGS editor. And add 3D parallax areas to normal 2D rooms.

All the rooms in the game are built in AGS as normal playable 2D rooms, with objects, characters, hotspots, walkable areas, and regions as normal. Then by initiating the module, with just one function call, the display switches to 3D and the same room can be played in 3D. The module also provides 3D parallax areas that can be added to standard 2D rooms.
It is very processor intensive so at least a 2GHz computer is recommended!

To give you an idea of what the effect looks like, here's an ingame screenshot of Bog's Adventure in Easy3D that uses this module:



Download Easy3D Module here (Requires AGS v2.71 and up)

or Download Easy3D Module here (Requires AGS v3.1 and up)

Here's the source code to a cut down version of Bog's Adventure in Easy3D to show how to use Easy3D:
Demo Game for AGS v2.71 (4 Mb)

or Demo Game for AGS v3.1 (10 Mb)

Revision History ---------------------------
1.04 Added flipped character sprites
#142
Thanks for the comments everyone.

I had a travesty this morning when I accidently removed the module from the AGS editor but didn't realise I had to export it! so I couldn't get it back and it wasn't in the games backup file. I did the golden rule of not touching anything and had a cup of tea while my shaking and cursing stopped and decided to switch off the computer and hope AGS would reload with the module. It did, so it's still alive. Phew.

Splat44 - I've added individual character scaling so the wizard can get through the door!
lakerz - Underworld adventure just needs some beta testing. So hopefully very soon.
#143
2 Reasons for using a function.
1) The code becomes 'readable' so it is clear exactly what is happening.
2) Suppose at a future date you want to change all the attack percentages to make the game easier or harder, with a function you can do this by changing just one line of code.
#144
Ashen, Yes, I'll release the module once I've got a stable API figured out.

IceMan, Thanks, and I hope so.

ManicMatt, The aim is to make it functionally the same, and to provide a way of writing 3D adventure without any 3D knowledge. This is the outside in AGS

It's playable as a 2D level. Shadows are drawn onto the background. The sky is just another background. Background walls can be built by drawing a line in the Region Area, then a simple function call lets you map a sprite texture onto the wall, or you can select an area of the background (behind the camera) as the texture, so you can then put hotspots onto the walls.
#145
 Suggestion that characters have a SpeechOffsetX and SpeechOffsetY value. I know there is a SayAt() function but this doesn't work for dialogs and background speech. I often have characters that are quite large and don't necessarly have their heads centrally placed. Also in my new Easy3D module I have to keep switching the players between two positions depending on whether they are walking or talking as these two types of event happen in different parts of the room.
#146
 This is just a short (7 rooms) game to test out (okay, I admit it, show off!) my Easy3D module, inspired by the fabled WMGS engine. All the rooms in the game are built in AGS as normal playable 2D rooms, with objects, characters, hotspots, walkable areas, and regions as normal. Then by initiating the module, with just one function call, the display switches to 3D and the same room can be played in 3D. The module also provides 3D parallax areas that can be added to standard 2D rooms. Anyway check it out. It is very processor intensive so at least a 2Ghz computer is recommended.

(by the way, 'Bog's Adventures in the Underworld' is finished and just needs some hardened beta-testers, so drop please drop me a pm if you are up for it)

This IS an ingame screenshot.


Download (7Mb)
#147
 Well it's odd because object[0].ManualScaling=true; compiles and the ManualScaling appears in the auto complete but you get the error

Script link failed: Runtime error: unresolved import 'Object::get_ManualScaling'

when you try to run.
#148
I tend to want to use ^= quite a lot as a quick toggle, don't forget that one. Also float versions where applicable.

While I'm here, I've noticed that the crossfade between rooms, esp. in beta 6, is now so fast it looks like an instant change.Ã, 

And I can't get Object.ManualScaling to work, complains about not being able to import the function. Maybe this is wip.
#149
Hints & Tips / Re: Wheres My Hat Ma?
Thu 06/04/2006 20:00:25
c20,
Spoiler
Use the plank on the narrow part of the river, a few clicks should find the spot.
[close]
#150
Something like this maybe.
You can change the 0.1's to adjust the speed it follows the player.
You'll also probably need to write a initialization function for when a player enter a room.

Top of Global script
Code: ags

bool AutoScroll=true;
float AutoScrollX;
float AutoScrollY;


in function repeatedly_execute_always() , you might have to add this function to the global script as it's not there by default.
Code: ags

Ã,  if (AutoScroll)
Ã,  {
Ã,  Ã,  float X;
Ã,  Ã,  float Y;
Ã,  Ã,  X=IntToFloat(player.x)-160.0;
Ã,  Ã,  Y=IntToFloat(player.y)-120.0;
Ã,  Ã,  AutoScrollX=AutoScrollX+(X-AutoScrollX)*0.1;
Ã,  Ã,  AutoScrollY=AutoScrollY+(Y-AutoScrollY)*0.1;
Ã,  Ã,  
Ã,  Ã,  SetViewport(FloatToInt(AutoScrollX,eRoundNearest), FloatToInt(AutoScrollY,eRoundNearest));
Ã,  }
Ã, 
#151
Just delete the corresponding assfntX.ttf in the game folder, then you can reimport.
#152
Gui names should start with a little 'g', what is your GUI called? Code should be more like

gMyGuiName.BackgroundGraphic=108;

#153
General Discussion / Re: Content advisor
Wed 29/03/2006 16:44:47
ProgZmax, Nice stuff, but I think we might need a content advisor for your content advisors.
#154
Hints & Tips / Re: Stuck in Sky Adventure
Tue 28/03/2006 15:40:48
Lyaer,
Spoiler
When in tower there is something in your inventory that will let you get even higher.
[close]
#155
Sorry, I forgot to mention this is in repeatedly_execute. As far as I can tell, objects make their own cached version of their current sprite. Since the Dynamic Sprite will keep getting assigned the same graphic value, the object doesn't know that the sprite is actually changing, as it only checks the graphic value. Hence the option for a dirty flag on dynamic sprite generated sprites. Should be internally controlled. Though, as I said, I can get around this by alternating dynamic sprites so that the graphic value changes each frame. And yes, I do delete the DynamicSprite on leaving the room.
#156
Is there a way to tell an object its graphic has changed?
This code doesn't work as oReflection seems to think its graphic is not changing from frame to frame. I've got a work-around using two alternating dynamic sprites, but just thought I'd point it out as a possible bug.

in repeatedly_execute
Code: ags

if (DS!=null)
{
  DS.Delete();
}

ViewFrame *frame = Game.GetViewFrame(player.View, player.Loop, player.Frame);

DS=DynamicSprite.CreateFromExistingSprite(frame.Graphic);
DS.Resize(DS.Width*player.Scaling/100, DS.Height*player.Scaling/100);
DS.Flip(eFlipUpsideDown);
oReflection.Graphic=DS.Graphic;


Edit by strazer: it's -> its

Edit by Wretched: Award for most pedantic edit ever -> strazer

Edit by Gilbert: Edited because he's amused that a moderator actually did this kind of edit. :=
#157
You need to post mags games in the MAGS competition thread, looks like you might be a bit late though.
#158
Competitions & Activities / Re: March MAGS
Mon 27/03/2006 18:04:06
Was Sky adventure too late then ?
#159

Just crashed...
Spoiler
Used open sardine can on bushes near tap.
[close]

in Global script (line 61)

Error: MoveCharacter: character not in current room

#160
Thanks, SSH, the subtle difference is that I was using a background with (255,0,255) already on it which does not give transparent. If I use a rawdrawrectangle with (255,0,255) ,colour then it does act as transparent.
So problem solved.
SMF spam blocked by CleanTalk