Lemma Soft Forums

Supporting creators of visual novels and story-based games since 2003.

Visit our new games list, blog aggregator, IRC channel, and Discord (new).
Activation problem? Email pytom@bishoujo.us.
It is currently Fri Jun 23, 2017 1:02 am

All times are UTC - 5 hours [ DST ]


Forum rules


Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.



Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Sun May 20, 2012 1:36 pm 
Miko-Class Veteran
User avatar

Joined: Mon Dec 13, 2010 9:30 am
Posts: 952
Location: New Brunswick, Canada
I did this as a proof of concept to see if I could create Castle Wolfenstein 3D effects. It is based on the HTML5 tutorial found here: http://dev.opera.com/articles/view/crea ... l-5-can-1/

YouTube Video of it in action: http://youtu.be/RZZlHbyJcdA

Attached is the code I created. I provide it without guarantee and without much explanation.

Susan


Forgot to add that the source is released under GPLv3 http://www.gnu.org/licenses/gpl-3.0.txt
EDIT: updated code! See new video
http://youtu.be/jw7ThWERj2U


Attachments:
Renpystein.zip [442.98 KiB]
Downloaded 277 times

_________________
" It's not at all important to get it right the first time. It's vitally important to get it right the last time. "
— Andrew Hunt and David Thomas


Last edited by SusanTheCat on Sun Aug 19, 2012 3:10 pm, edited 2 times in total.
Top
 Profile Send private message  
 
PostPosted: Sun May 20, 2012 2:01 pm 
Veteran
User avatar

Joined: Mon Jan 30, 2012 7:50 am
Posts: 247
Completed: http://berry-melon.blogspot.co.uk/2016/ ... -2016.html
Projects: Pancake Surprise (2016)
Tumblr: http://bettybooplover.tumblr.com.tumblr.com">http://bettybooplover.tumblr.com
Deviantart: berry-melon
Soundcloud: sweepea-1
Things for visual's & concepts and games sure use many scripts and codes. The video version reminds me of a maze game. The concept reminds me of Duke Numen, only without the guns and shooting. I could think of many things that the concept could do, if it works with Ren'py. Isn't Pseudo another word for fake? or mabey it's just the name of the concept.

_________________
http://berry-melon.blogspot.com
I'm not resting until I find
What would make your eyes
Glisten like mine
With loves divine!

Boo-Boo I couldn't aspire....to anything...
Higher...than to fill that one desire to make it
My own....Bop-Bop-a-Dop-Boop-Oop-a-Doop honey?


Top
 Profile Send private message  
 
PostPosted: Sun May 20, 2012 2:17 pm 
Veteran
User avatar

Joined: Sat Sep 25, 2010 4:50 pm
Posts: 463
Projects: We Are the Hunted, Heart Shard
Twitter: @nuxill
Tumblr: nuxill
itch.io: nuxill
Wow, this is fantastic! I guess one would have to learn a bit about python to be able to use this to it's fullest. Time to hit the books :P

Is it alright to ask how one could make a way to trigger an event when they stepped on a particular part of the map? And how to change the solid colors into images and adding sprites like what's in the second part of the html5 tutorial?


Top
 Profile Send private message  
 
PostPosted: Sun May 20, 2012 6:10 pm 
Miko-Class Veteran
User avatar

Joined: Thu May 14, 2009 8:15 pm
Posts: 636
Projects: Castle of Arhannia
this is rather interesting, if somewhat limited in usefulness. You can now use renpy as a shell for an older than old school fps, which is at least progress over the idea of an fps in renpy being merely an amusing joke. That said, while I congratulate you on your success I have to wonder how much of renpy's functions could be used with this other than just the menu screen.


Top
 Profile Send private message  
 
PostPosted: Sun May 20, 2012 6:39 pm 
Veteran
User avatar

Joined: Sat Sep 25, 2010 4:50 pm
Posts: 463
Projects: We Are the Hunted, Heart Shard
Twitter: @nuxill
Tumblr: nuxill
itch.io: nuxill
KimiYoriBaka wrote:
this is rather interesting, if somewhat limited in usefulness. You can now use renpy as a shell for an older than old school fps, which is at least progress over the idea of an fps in renpy being merely an amusing joke. That said, while I congratulate you on your success I have to wonder how much of renpy's functions could be used with this other than just the menu screen.

Perhaps there would be a way to make the two parts jump between each other? I have no idea if it's possible but if so it could mean the creation of 1st person adventure game with visual novel aspects. Though that would probably need most of the work to be done with pygame instead of renpy.


Top
 Profile Send private message  
 
PostPosted: Sun May 20, 2012 8:46 pm 
Miko-Class Veteran
User avatar

Joined: Mon Dec 13, 2010 9:30 am
Posts: 952
Location: New Brunswick, Canada
This was very much me seeing the code for HTML 5 and wondering if I could do it in Ren'py. I also have a version that does the wall textures but it makes my netbook cry.

It is Pseudo 3D because it does not use a 3D rendering engine. It is faking the whole thing. You can't look up or down.

The screen is split into strips and a coloured bar the appropriate size is filled in.

My thought was to use it as a maze. (You wouldn't have to use gaudy colours!) You could set something up in the player's move function to check to see what square you are on and set a flag. The event function would then return with a value.

I will come up with more of a tutorial. I wanted to get the code out into the wild since I don't think I have optimized it too well for Ren'py.

Susan

_________________
" It's not at all important to get it right the first time. It's vitally important to get it right the last time. "
— Andrew Hunt and David Thomas


Top
 Profile Send private message  
 
PostPosted: Mon May 21, 2012 6:09 pm 
Eileen-Class Veteran
User avatar

Joined: Fri Mar 16, 2012 11:38 am
Posts: 1261
Location: Tokyo, Japan
Projects: Rika
Organization: Solo (for now)
IRC Nick: Trick
Twitter: @CJ_in_Tokyo
It's a very interesting idea. I have a section in my game where this would be useful, so I'll be watching this topic closely.

_________________
"We must teach them through the tools with which they are comfortable."

The #renpy IRC channel is a great place to chat with other devs. Due to the nature of IRC and timezone differences, people probably won't reply right away.

If you'd like to view or use any code from my VN PM me. All code is freely available without restriction, but also without warranty or (much) support.


Top
 Profile Send private message  
 
PostPosted: Sun Aug 19, 2012 7:54 am 
Miko-Class Veteran
User avatar

Joined: Mon Dec 13, 2010 9:30 am
Posts: 952
Location: New Brunswick, Canada
New code! (See first post)



Now with Textures! And punching things!

You are welcome to use the code. It is based on the pythons code Gh0stenstein:
http://code.google.com/p/gh0stenstein/downloads/list
http://www.pygame.org/project-Gh0stenstein+-1882-.html

Susan

_________________
" It's not at all important to get it right the first time. It's vitally important to get it right the last time. "
— Andrew Hunt and David Thomas


Top
 Profile Send private message  
 
PostPosted: Sun Aug 19, 2012 9:22 am 
Veteran
User avatar

Joined: Sat Sep 25, 2010 4:50 pm
Posts: 463
Projects: We Are the Hunted, Heart Shard
Twitter: @nuxill
Tumblr: nuxill
itch.io: nuxill
How exciting, I'll have to try it out right away!
I loved the punching sound effects. Did you make those yourself? :lol:

EDIT: How would you go about making it possible for the exit points to jump to different scenes in a story/different labels? Like if instead of just saying 'Test Exit 3', having it so if the player went to exit three a character in the vn part of the game congratulated them.


Top
 Profile Send private message  
 
PostPosted: Sun Aug 19, 2012 9:42 am 
Miko-Class Veteran
User avatar

Joined: Mon Dec 13, 2010 9:30 am
Posts: 952
Location: New Brunswick, Canada
Nuxill wrote:
How would you go about making it possible for the exit points to jump to different scenes in a story/different labels? Like if instead of just saying 'Test Exit 3', having it so if the player went to exit three a character in the vn part of the game congratulated them.


SusanTheCat wrote:
I provide it without guarantee and without much explanation


That said, all you would need is to have an if statement based on the _return variable.

I currently have it set up to return the text from whatever exit you left by,

Code:
        exits = [
            (1.5,1.5,"eileen"),
            (1.5,22.5,"lucy")
        ]


Like
Code:
$ result = _return
if result == "eileen":
    e "You picked me!"

elif result == "lucy":
    e "It looks like you picked Lucy."


Susan

_________________
" It's not at all important to get it right the first time. It's vitally important to get it right the last time. "
— Andrew Hunt and David Thomas


Top
 Profile Send private message  
 
PostPosted: Sun Aug 19, 2012 10:12 am 
Veteran
User avatar

Joined: Sat Sep 25, 2010 4:50 pm
Posts: 463
Projects: We Are the Hunted, Heart Shard
Twitter: @nuxill
Tumblr: nuxill
itch.io: nuxill
Ah, I feel so dumb! The answer was so obvious! Thank you. :)


Top
 Profile Send private message  
 
PostPosted: Sun Aug 19, 2012 3:15 pm 
Miko-Class Veteran
User avatar

Joined: Mon Dec 13, 2010 9:30 am
Posts: 952
Location: New Brunswick, Canada
The code the new code is derived from is under the GPLv3 Licence.
http://www.gnu.org/licenses/gpl-3.0.txt

And that makes my new code under that licence too.

Susan

_________________
" It's not at all important to get it right the first time. It's vitally important to get it right the last time. "
— Andrew Hunt and David Thomas


Top
 Profile Send private message  
 
PostPosted: Sun Aug 19, 2012 5:21 pm 
Miko-Class Veteran
User avatar

Joined: Thu May 14, 2009 8:15 pm
Posts: 636
Projects: Castle of Arhannia
what an interesting mix of wolfenstein and doom resources


Top
 Profile Send private message  
 
PostPosted: Thu May 01, 2014 10:05 am 
Eileen-Class Veteran
User avatar

Joined: Thu Oct 14, 2010 3:53 am
Posts: 1765
Location: NC, USA
Completed: 14 games released -- and Counting.
Organization: DarkErotica Games
Twitter: @ookamikasumi
Deviantart: OokamiKasumi
It doesn't work anymore. :(

Code:
I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/script.rpy", line 120, in script
  File "renpy/common/000statements.rpy", line 447, in python
  File "game/script.rpy", line 56, in python
  File "game/renpystein.rpy", line 62, in python
  File "game/renpystein.rpy", line 335, in python
TypeError: range() integer end argument expected, got float.

-- Full Traceback ------------------------------------------------------------

Full traceback:
  File "L:\Library\!Kenetic Novels\RenPy\renpy-6.15.5-sdk\renpy\execution.py", line 294, in run
    node.execute()
  File "L:\Library\!Kenetic Novels\RenPy\renpy-6.15.5-sdk\renpy\ast.py", line 1595, in execute
    self.call("execute")
  File "L:\Library\!Kenetic Novels\RenPy\renpy-6.15.5-sdk\renpy\ast.py", line 1613, in call
    renpy.statements.call(method, parsed, *args, **kwargs)
  File "L:\Library\!Kenetic Novels\RenPy\renpy-6.15.5-sdk\renpy\statements.py", line 144, in call
    return method(parsed, *args, **kwargs)
  File "renpy/common/000statements.rpy", line 447, in execute_call_screen
    store._return = renpy.call_screen(name, *args, **kwargs)
  File "L:\Library\!Kenetic Novels\RenPy\renpy-6.15.5-sdk\renpy\exports.py", line 2095, in call_screen
    rv = renpy.ui.interact(mouse="screen", type="screen", roll_forward=roll_forward)
  File "L:\Library\!Kenetic Novels\RenPy\renpy-6.15.5-sdk\renpy\ui.py", line 237, in interact
    rv = renpy.game.interface.interact(roll_forward=roll_forward, **kwargs)
  File "L:\Library\!Kenetic Novels\RenPy\renpy-6.15.5-sdk\renpy\display\core.py", line 2059, in interact
    scene_lists.replace_transient()
  File "L:\Library\!Kenetic Novels\RenPy\renpy-6.15.5-sdk\renpy\display\core.py", line 577, in replace_transient
    self.remove(layer, tag)
  File "L:\Library\!Kenetic Novels\RenPy\renpy-6.15.5-sdk\renpy\display\core.py", line 851, in remove
    self.hide_or_replace(layer, remove_index, "hide")
  File "L:\Library\!Kenetic Novels\RenPy\renpy-6.15.5-sdk\renpy\display\core.py", line 775, in hide_or_replace
    d = oldsle.displayable._hide(now - st, now - at, prefix)
  File "L:\Library\!Kenetic Novels\RenPy\renpy-6.15.5-sdk\renpy\display\screen.py", line 189, in _hide
    hid.update()
  File "L:\Library\!Kenetic Novels\RenPy\renpy-6.15.5-sdk\renpy\display\screen.py", line 270, in update
    self.screen.function(**self.scope)
  File "L:\Library\!Kenetic Novels\RenPy\renpy-6.15.5-sdk\renpy\screenlang.py", line 1236, in __call__
    renpy.python.py_exec_bytecode(self.code.bytecode, locals=scope)
  File "L:\Library\!Kenetic Novels\RenPy\renpy-6.15.5-sdk\renpy\python.py", line 1382, in py_exec_bytecode
    exec bytecode in globals, locals
  File "game/script.rpy", line 56, in <module>
    add Renpystein(600, 400,worldMap,sprite_positions,exits,enemies, 22, 11.5, -1, 0, 0, .66):
  File "game/renpystein.rpy", line 62, in __init__
    self.my_load_image(Image("pics/items/barrel.png"),False),
  File "game/renpystein.rpy", line 335, in my_load_image
    for i in range(width):
  File "L:\Library\!Kenetic Novels\RenPy\renpy-6.15.5-sdk\renpy\python.py", line 558, in revertable_range
    return RevertableList(range(*args))
TypeError: range() integer end argument expected, got float.

Windows-7-6.1.7601-SP1
Ren'Py 6.17.4.409
A Ren'Py Game 0.0


_________________
Ookami Kasumi ~ Purveyor of fine Smut.
Most recent Games Completed:
For ALL my completed games visit: DarkErotica Games

"No amount of great animation will save a bad story." -- John Lasseter of Pixar


Top
 Profile Send private message  
 
PostPosted: Sat May 03, 2014 3:34 pm 
Regular

Joined: Fri Oct 11, 2013 12:46 am
Posts: 47
Attached is a fix for that error, plus I've added a "slide" when you're against walls, adapted from the HTML 5 tutorial.


Attachments:
Renpystein 5314.zip [668.43 KiB]
Downloaded 112 times
Top
 Profile Send private message  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Protected by Anti-Spam ACP
Powered by phpBB® Forum Software © phpBB Group